-
-
Notifications
You must be signed in to change notification settings - Fork 642
Use version-tagged URLs for license/rule references #4634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Use version-tagged URLs for license/rule references #4634
Conversation
Signed-off-by: uttam282005 <[email protected]>
Signed-off-by: uttam282005 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
|
hi. @AyanSinhaMahapatra can you review this pr pls? |
Signed-off-by: uttam282005 <[email protected]>
Signed-off-by: uttam282005 <[email protected]>
|
Having the current version in the expected data files sounds like a large amount of work to do for each new release. |
|
@stefan6419846 I think we could automate generating new expected files as part of the existing release workflow. It would run tests with What do you think of this approach? I'm happy to implement it if you think versioned URLs are worth the added automation step. Alternatively, if you prefer to keep things simpler, I can close this PR and we can stick with |
|
I honestly do not think that updating large amount of files during a release workflow is a good idea. This just bloats the diff. Thus I proposed some placeholder or automated replacement approach in the affected test implementations, while ensuring that one dynamic Python-only test still exists to check that the correct values are written. The final decision is with the maintainers.
I am the reporter of the original linked issue, thus I am of course still interested in a proper maintainable solution. |
|
Let's wait for the maintainers before doing significant rework, but I think your approach is much cleaner than mass file updates. |
Fixes #3808
Description
This PR changes the URL format for license and rule references in scan outputs from using the hardcoded
developbranch to version-tagged URLs.Changes Made
Code Changes:
src/scancode/api.pyto usev{scancode_version}inSCANCODE_DATA_BASE_URLinstead of hardcodeddevelopbranchrule_urlandlicense_urlfields in scan outputs point to the exact version of license/rule data that matches the installed ScanCode versionTest Updates:
tree/developtotree/v32.4.1Documentation:
docs/intentionally kept usingdevelopbranch links to remain evergreen and show current stateMotivation
Using version-tagged URLs provides:
Example Output Change
Before:
After:
Tasks
Run tests locally to check for errors.