-
-
Notifications
You must be signed in to change notification settings - Fork 563
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
Add license dump option #3100
Add license dump option #3100
Conversation
Signed-off-by: Thomas Druez <[email protected]>
Signed-off-by: Thomas Druez <[email protected]>
Signed-off-by: Thomas Druez <[email protected]>
Signed-off-by: Thomas Druez <[email protected]>
Signed-off-by: Thomas Druez <[email protected]>
Signed-off-by: Thomas Druez <[email protected]>
Signed-off-by: Thomas Druez <[email protected]>
* Expose spdx_license_key, other_spdx_license_keys, and is_exception Signed-off-by: Jono Yang <[email protected]>
Expose SPDX license info in index.json #7
Signed-off-by: tdruez <[email protected]>
Signed-off-by: tdruez <[email protected]>
Signed-off-by: tdruez <[email protected]>
Signed-off-by: Jono Yang <[email protected]>
Expose is_deprecated in index.json
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
This commit ends the process of merging .RULE and .yml files into a single .RULE file which has YAML frontmatter storing the rule metadata present in the .yml file previously. This renaming and merging has been done to preserve line-history for both the files. Reference: #3049 Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
* Import and use functions/classes from frontmatter * Copy and modify class to use saneyaml * Copy and modify load/parse functions * Add .ABOUT and LICENSE files. Signed-off-by: AyanSinhaMahapatra <[email protected]>
Reference: aboutcode-org/scancode-licensedb#25 Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
719fabb
to
84f8a01
Compare
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
84f8a01
to
a7cc2d5
Compare
Regen test expectations for this and also fix another test. Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
6843a32
to
8a8fba0
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.
LGTM... Please do one last check wrt. spaces:
from licensedcode.models import *
gpl=db["gpl-2.0"]
bottom = gpl.text.strip("\n") + "\n"
top = saneyaml.dump(gpl.to_dict())
fm=f"---\n{top}\n---\n{bottom}"
IMHO redumping all licenses as frontmatter this way should be to help that we are not damaging space-based formatting. In particualr watch out for the GPL -2.0.
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
8b1d58e
to
093b8b4
Compare
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
093b8b4
to
bc6d6a5
Compare
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
@pombredanne post your approval I've pushed the following changes:
Should I go ahead and merge? |
Some scripts need update but I opened an issue: #3138 to track that separately to not block this anymore. |
Note that the command line option was later renamed from |
ScanCode 32.0.0 started to prepend its `*.LICENSE` files with YAML-encoded metadata, see [1]. This is a hot fix to remove this header, if present, from the license files. A better solution will be implemented later as part of a larger refactoring of license providers. Different ScanCode versions also differ in whether license files come with a final newline or not. Align on not having a final newline to make tests pass either way. [1]: aboutcode-org/scancode-toolkit#3100 Signed-off-by: Sebastian Schuberth <[email protected]>
ScanCode 32.0.0 started to prepend its `*.LICENSE` files with YAML-encoded metadata, see [1]. This is a hot fix to remove this header, if present, from the license files. A better solution will be implemented later as part of a larger refactoring of license providers. Different ScanCode versions also differ in whether license files come with a final newline or not. Align on not having a final newline to make tests pass either way. [1]: aboutcode-org/scancode-toolkit#3100 Signed-off-by: Sebastian Schuberth <[email protected]>
ScanCode 32.0.0 started to prepend its `*.LICENSE` files with YAML-encoded metadata, see [1]. This is a hot fix to remove this header, if present, from the license files. A better solution will be implemented later as part of a larger refactoring of license providers. Different ScanCode versions also differ in whether license files come with a final newline or not. Align on not having a final newline to make tests pass either way. [1]: aboutcode-org/scancode-toolkit#3100 Signed-off-by: Sebastian Schuberth <[email protected]>
ScanCode 32.0.0 started to prepend its `*.LICENSE` files with YAML-encoded metadata, see [1]. This is a hot fix to remove this header, if present, from the license files. A better solution will be implemented later as part of a larger refactoring of license providers. Different ScanCode versions also differ in whether license files come with a final newline or not. Align on not having a final newline to make tests pass either way. [1]: aboutcode-org/scancode-toolkit#3100 Signed-off-by: Sebastian Schuberth <[email protected]>
--get-license-data
to:This is reusing code originally located at:
https://github.com/nexB/scancode-licensedb
Reference: #2738
Reference: #3049
This also contains PR: #3063 btw.
Tasks
Run tests locally to check for errors.