Skip to content

add apiurl option to fs command#212

Merged
mscasso-scanoss merged 3 commits into
mainfrom
mscasso/chore/add-api-option-to-fs-command
Jun 4, 2026
Merged

add apiurl option to fs command#212
mscasso-scanoss merged 3 commits into
mainfrom
mscasso/chore/add-api-option-to-fs-command

Conversation

@mscasso-scanoss

@mscasso-scanoss mscasso-scanoss commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Added a --apiurl option to folder-scan to allow a custom SCANOSS API base URL.
  • Changed

    • Adjusted default rank threshold used by folder scanning from 5 to 9.
  • Documentation

    • Updated help and changelog to document the new --apiurl option and show example usage.

@mscasso-scanoss mscasso-scanoss self-assigned this Jun 4, 2026
@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@matiasdaloia, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 31 minutes and 30 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: bba94b3a-f697-4212-9b5a-5bc0ba010894

📥 Commits

Reviewing files that changed from the base of the PR and between ad23ad7 and 753a445.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • docs/source/index.rst
📝 Walkthrough

Walkthrough

Adds a --apiurl CLI option to folder-scan, updates gRPC URL selection to prefer args.apiurl, raises DEFAULT_HFH_RANK_THRESHOLD from 5 to 9, and updates help text and CHANGELOG accordingly.

Changes

Extend --apiurl option to folder-scan & bump HFH threshold

Layer / File(s) Summary
CLI wiring and URL configuration logic
src/scanoss/cli.py, src/scanoss/scanossgrpc.py
folder-scan parser now receives the --apiurl argument. create_grpc_config_from_args() sets GrpcConfig.url to args.apiurl if present, otherwise args.api2url, otherwise DEFAULT_URL.
Docs, changelog, and HFH threshold
CHANGELOG.md, CLIENT_HELP.md, src/scanoss/constants.py, src/scanoss/scanners/scanner_hfh.py
CLIENT_HELP.md documents --apiurl for folder-scan and adds a usage example. CHANGELOG.md records the added option and the default --rank-threshold change. DEFAULT_HFH_RANK_THRESHOLD updated from 59; ScannerHFH.__init__ docstring updated to reflect default 9.

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • scanoss/scanoss.py#193: Implements similar --apiurl CLI wiring in src/scanoss/cli.py, extending API URL support to other subcommands.
  • scanoss/scanoss.py#141: Changes related to HFH/default rank_threshold and its wiring affecting folder-scan and ScannerHFH behavior.

Suggested labels

enhancement

Suggested reviewers

  • agustingroh

Poem

🐰 I hopped through flags and docs today,
A new --apiurl lights the way,
gRPC listens to what you say,
Thresholds climb from five to nine,
Small hops make the whole tool fine. 🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'add apiurl option to fs command' accurately captures the primary change: adding the --apiurl option to the folder-scan (fs) subcommand, as evidenced by modifications to CLI argument setup and documentation.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch mscasso/chore/add-api-option-to-fs-command

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

SCANOSS SCAN Completed 🚀

  • Detected components: 2
  • Undeclared components: 0
  • Declared components: 2
  • Detected files: 112
  • Detected files undeclared: 0
  • Detected files declared: 112
  • Licenses detected: 1
  • Licenses detected with copyleft: 0
  • Policies: ✅ 1 pass (1 total)

View more details on SCANOSS Action Summary

@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown

Caution

Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted.

Error details
{"name":"HttpError","status":500,"request":{"method":"PATCH","url":"https://api.github.com/repos/scanoss/scanoss.py/issues/comments/4621607690","headers":{"accept":"application/vnd.github.v3+json","user-agent":"octokit.js/0.0.0-development octokit-core.js/7.0.6 Node.js/24","authorization":"token [REDACTED]","content-type":"application/json; charset=utf-8"},"body":{"body":"<!-- This is an auto-generated comment: summarize by coderabbit.ai -->\n<!-- review_stack_entry_start -->\n\n[![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/scanoss/scanoss.py/pull/212?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)\n\n<!-- review_stack_entry_end -->\n<!-- This is an auto-generated comment: review in progress by coderabbit.ai -->\n\n> [!NOTE]\n> Currently processing new changes in this PR. This may take a few minutes, please wait...\n> \n> <details>\n> <summary>⚙️ Run configuration</summary>\n> \n> **Configuration used**: defaults\n> \n> **Review profile**: CHILL\n> \n> **Plan**: Pro\n> \n> **Run ID**: `5b98f329-1f95-4289-8580-296ff99791cc`\n> \n> </details>\n> \n> <details>\n> <summary>📥 Commits</summary>\n> \n> Reviewing files that changed from the base of the PR and between d24f64af4f97f698286d6df31a637c2195d9db6c and 380ec71f80d99af18e89792e0ee8f73ca078fb92.\n> \n> </details>\n> \n> <details>\n> <summary>📒 Files selected for processing (4)</summary>\n> \n> * `CHANGELOG.md`\n> * `CLIENT_HELP.md`\n> * `src/scanoss/cli.py`\n> * `src/scanoss/scanossgrpc.py`\n> \n> </details>\n> \n> ```ascii\n>  __________________________________\n> < Software is hard. - Donald Knuth >\n>  ----------------------------------\n>   \\\n>    \\   (\\__/)\n>        (•ㅅ•)\n>        /   づ\n> ```\n\n<!-- end of auto-generated comment: review in progress by coderabbit.ai -->\n\n<!-- finishing_touch_checkbox_start -->\n\n<details>\n<summary>✨ Finishing Touches</summary>\n\n<details>\n<summary>📝 Generate docstrings</summary>\n\n- [ ] <!-- {\"checkboxId\": \"7962f53c-55bc-4827-bfbf-6a18da830691\"} --> Create stacked PR\n- [ ] <!-- {\"checkboxId\": \"3e1879ae-f29b-4d0d-8e06-d12b7ba33d98\"} --> Commit on current branch\n\n</details>\n<details>\n<summary>🧪 Generate unit tests (beta)</summary>\n\n- [ ] <!-- {\"checkboxId\": \"f47ac10b-58cc-4372-a567-0e02b2c3d479\", \"radioGroupId\": \"utg-output-choice-group-unknown_comment_id\"} -->   Create PR with unit tests\n- [ ] <!-- {\"checkboxId\": \"6ba7b810-9dad-11d1-80b4-00c04fd430c8\", \"radioGroupId\": \"utg-output-choice-group-unknown_comment_id\"} -->   Commit unit tests in branch `mscasso/chore/add-api-option-to-fs-command`\n\n</details>\n\n</details>\n\n<!-- finishing_touch_checkbox_end -->\n<!-- tips_start -->\n\n---\n\nThanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=scanoss/scanoss.py&utm_content=212)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.\n\n<details>\n<summary>❤️ Share</summary>\n\n- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)\n- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)\n- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)\n- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)\n\n</details>\n\n\n<sub>Comment `@coderabbitai help` to get the list of available commands and usage tips.</sub>\n\n<!-- tips_end -->"},"request":{"retryCount":3,"signal":{},"retries":3,"retryAfter":16}}}

Comment thread CHANGELOG.md
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remember to change the new release version and add the new release to the bottom of this file

@agustingroh agustingroh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Please update the the version inside the src/scanoss/init.py file

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

SCANOSS SCAN Completed 🚀

  • Detected components: 2
  • Undeclared components: 0
  • Declared components: 2
  • Detected files: 112
  • Detected files undeclared: 0
  • Detected files declared: 112
  • Licenses detected: 1
  • Licenses detected with copyleft: 0
  • Policies: ✅ 1 pass (1 total)

View more details on SCANOSS Action Summary

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

SCANOSS SCAN Completed 🚀

  • Detected components: 2
  • Undeclared components: 0
  • Declared components: 2
  • Detected files: 112
  • Detected files undeclared: 0
  • Detected files declared: 112
  • Licenses detected: 1
  • Licenses detected with copyleft: 0
  • Policies: ✅ 1 pass (1 total)

View more details on SCANOSS Action Summary

@mscasso-scanoss mscasso-scanoss merged commit d7dabbe into main Jun 4, 2026
6 checks passed
@mscasso-scanoss mscasso-scanoss deleted the mscasso/chore/add-api-option-to-fs-command branch June 4, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants