-
Notifications
You must be signed in to change notification settings - Fork 24
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
Provide built-in support for SPDX and scancode license expression validation #56
Comments
Some example:
|
@pombredanne When we are parsing a license expression using |
@JonoYang I think the new validation feature should be explicit about which license list is used as a base and there should be no guessing there about whether an expression is from scancode or from SPDX. |
In addition to validation, could you also provide a normalized (whitespace, case, parens) version of the string passed in? |
* Index SPDX license keys instead of scancode license keys * Modify code to do lookups using SPDX license keys Signed-off-by: Jono Yang <jyang@nexb.com>
Signed-off-by: Jono Yang <jyang@nexb.com>
* Create functions that loads a Licensing object with SPDX licenses Signed-off-by: Jono Yang <jyang@nexb.com>
* Refactor validate() to call parse() rather than using the code from parse() Signed-off-by: Jono Yang <jyang@nexb.com>
* Return license validation results in ExpressionInfo object Signed-off-by: Jono Yang <jyang@nexb.com>
Signed-off-by: Jono Yang <jyang@nexb.com>
* Make helper functions for loading license keys Signed-off-by: Jono Yang <jyang@nexb.com>
* Add test for get_license_key_info Signed-off-by: Jono Yang <jyang@nexb.com>
* Set original license expression in ExpressionInfo * Set vendored licensedb info location as a global * Create function that loads license index json * Update tests Signed-off-by: Jono Yang <jyang@nexb.com>
* Set original license expression in ExpressionInfo * Set vendored licensedb info location as a global * Create function that loads license index json * Update tests Signed-off-by: Jono Yang <jyang@nexb.com>
Signed-off-by: Jono Yang <jyang@nexb.com>
* Add repr to ExpressionInfo class * Remove valid_symbols and valid_exception_symbols from ExpressionInfo * Update vendored licensedb index * Avoid indexing deprecated licenses * Update tests Signed-off-by: Jono Yang <jyang@nexb.com>
* Add repr to ExpressionInfo class * Remove valid_symbols and valid_exception_symbols from ExpressionInfo * Update vendored licensedb index * Avoid indexing deprecated licenses * Update tests Signed-off-by: Jono Yang <jyang@nexb.com>
* Add repr to ExpressionInfo class * Remove valid_symbols and valid_exception_symbols from ExpressionInfo * Update vendored licensedb index * Avoid indexing deprecated licenses * Update tests Signed-off-by: Jono Yang <jyang@nexb.com>
* Add repr to ExpressionInfo class * Remove valid_symbols and valid_exception_symbols from ExpressionInfo * Update vendored licensedb index * Avoid indexing deprecated licenses * Update tests Signed-off-by: Jono Yang <jyang@nexb.com>
* Add repr to ExpressionInfo class * Remove valid_symbols and valid_exception_symbols from ExpressionInfo * Update vendored licensedb index * Avoid indexing deprecated licenses * Update tests Signed-off-by: Jono Yang <jyang@nexb.com>
* Add repr to ExpressionInfo class * Remove valid_symbols and valid_exception_symbols from ExpressionInfo * Update vendored licensedb index * Avoid indexing deprecated licenses * Update tests Signed-off-by: Jono Yang <jyang@nexb.com>
* Add new test that uses license exception as normal license key Signed-off-by: Jono Yang <jyang@nexb.com>
* We keep track of invalid license symbols from syntax errors Signed-off-by: Jono Yang <jyang@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Improve documentation strings and code format. Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Add black codestyle test for skeleton
I would like to have a function that takes an expression string as an argument and validates this expression. It could be build from Licensing.parse() but I would prefer having it return some object that tells me everything about the expression validity:
This function should be taking either the ScanCode license DB as an input for license symbols ( https://scancode-licensedb.aboutcode.org ) or some list of symbols. It should bundle an up-to-date licenses list from ScanCode and SPDX for easy bootstrapping. For this we need aboutcode-org/scancode-licensedb#7
In addition it should also support and accept arbitrary
LicenseRef-
(and possiblyDocumentRef-
) in SPDX mode.The text was updated successfully, but these errors were encountered: