-
-
Notifications
You must be signed in to change notification settings - Fork 562
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
Improve License Clarity at Top Package Level #3792
base: develop
Are you sure you want to change the base?
Conversation
Signed-off-by: swastik <swastkk@gmail.com>
Signed-off-by: swastik <swastkk@gmail.com>
Signed-off-by: swastik <swastkk@gmail.com>
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.
@swastkk you are regenerating all the tests with useless churn. This adds more things to review and is not ideal. Let's do things differently. You can delete your last commit and push regenerated test fixtures for only the tests which were failing.
...agedcode/data/alpine/apkbuild-problems/alpine14/community/ksshaskpass/APKBUILD-expected.json
Outdated
Show resolved
Hide resolved
c5791ba
to
fa8fcfc
Compare
Signed-off-by: swastik <swastkk@gmail.com>
fa8fcfc
to
64957ec
Compare
@swastkk this is not correct atm:
This new plugin could be there in |
Signed-off-by: swastik <swastkk@gmail.com>
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.
Does this make sure the license_clarity_score
attribute is added only on using the --summary-package command line option? No. Look at your test regenerations, none of these tests have this option enabled, still have this attribute added.
You have to pass the package_summary
option like we have the package_only
CLI option here: https://github.com/nexB/scancode-toolkit/blob/develop/src/packagedcode/plugin_package.py#L203, then further pass it down to create_package_and_deps
at https://github.com/nexB/scancode-toolkit/blob/develop/src/packagedcode/plugin_package.py#L263 and further to package.to_dict()
at https://github.com/nexB/scancode-toolkit/blob/develop/src/packagedcode/plugin_package.py#L367 to actually be able to correctly set the attribute package_summary
at https://github.com/swastkk/scancode-toolkit/blob/improve-license-clarity/src/packagedcode/models.py#L1544 you added thorugh this PR. Otherwise it's always set to one value.
…mary as Postscan Plugin Signed-off-by: swastik <swastkk@gmail.com>
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.
More changes required.
Please merge latest develop afterwards.
...an/copyright/debian-slim-2021-04-07/usr/share/doc/gcc-9-base/copyright-detailed.expected.yml
Outdated
Show resolved
Hide resolved
tests/summarycode/data/package_summary/basic-plugin-testing/codebase/src/a.py
Outdated
Show resolved
Hide resolved
tests/summarycode/data/package_summary/basic-plugin-testing/expected.json
Outdated
Show resolved
Hide resolved
…inor changes Signed-off-by: swastik <swastkk@gmail.com>
Signed-off-by: swastik <swastkk@gmail.com>
Signed-off-by: swastik <swastkk@gmail.com>
eb60d58
to
9da7f6e
Compare
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.
See comments above. And sup on populating license clarity and other attributes?
...kage_summary/change-case-change-case-5.4.4.zip-extract/change-case-change-case-5.4.4/LICENSE
Outdated
Show resolved
Hide resolved
...e-change-case-5.4.4.zip-extract/change-case-change-case-5.4.4/packages/change-case/README.md
Outdated
Show resolved
Hide resolved
...change-case-5.4.4.zip-extract/change-case-change-case-5.4.4/packages/change-case/src/keys.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: swastik <swastkk@gmail.com>
Signed-off-by: swastik <swastkk@gmail.com>
…utcode-org#3817 Signed-off-by: swastik <swastkk@gmail.com>
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.
Couple more nits.
Signed-off-by: swastik <swastkk@gmail.com>
…arity_score aboutcode-org#3817 Signed-off-by: swastik <swastkk@gmail.com>
…e(Without other_license_detections) Signed-off-by: swastik <swastkk@gmail.com>
Signed-off-by: swastik <swastkk@gmail.com>
Signed-off-by: swastik <swastkk@gmail.com>
Signed-off-by: swastik <swastkk@gmail.com>
Signed-off-by: swastik <swastkk@gmail.com>
Signed-off-by: swastik <swastkk@gmail.com>
…de-org#3889 Signed-off-by: swastik <swastkk@gmail.com>
…de-org#3889 Signed-off-by: swastik <swastkk@gmail.com>
Signed-off-by: swastik <swastkk@gmail.com>
Signed-off-by: swastik <swastkk@gmail.com>
Signed-off-by: swastik <swastkk@gmail.com>
Signed-off-by: swastik <swastkk@gmail.com>
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.
@swastkk See comments and another comment I made above which is still unresolved.
Signed-off-by: swastik <swastkk@gmail.com>
… license-clarity-score plugins Signed-off-by: swastik <swastkk@gmail.com>
Signed-off-by: swastik <swastkk@gmail.com>
Signed-off-by: swastik <swastkk@gmail.com>
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.
@swastkk you've made changes to the get_field_values_from_resources
to send a resources
list and not codebase object correctly, but note that we are still not sending anything in score.py: https://github.com/swastkk/scancode-toolkit/blob/improve-license-clarity/src/summarycode/score.py#L78 which would not work effectively if we run only the score option without summary.
You seem to be failing the tests for the same reason, please fix this part. You should be passing all tests to make sure no previous functionality is breaking in this refactor of the compute_license_score
to suit the new plugin you're writing.
One minor thing:
The get_codebase_resources
seems okay in summarizer.py but we are using dicts: https://github.com/swastkk/scancode-toolkit/blob/improve-license-clarity/src/summarycode/summarizer.py#L323, we should use resource objects here, and also in get_field_values_from_resources we should use resource objects, not list of resource dicts (this means wherever we have resource dicts, we should convert them to Resource objects first and then send in these functions)
Signed-off-by: swastik <swastkk@gmail.com>
Signed-off-by: swastik <swastkk@gmail.com>
Signed-off-by: swastik <swastkk@gmail.com>
Signed-off-by: swastik <swastkk@gmail.com>
Fixes #3802
Tasks
Run tests locally to check for errors.
Signed-off-by: swastkk swastkk@gmail.com