-
Notifications
You must be signed in to change notification settings - Fork 26
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 <[email protected]>
Signed-off-by: Jono Yang <[email protected]>
* Create functions that loads a Licensing object with SPDX licenses Signed-off-by: Jono Yang <[email protected]>
* Refactor validate() to call parse() rather than using the code from parse() Signed-off-by: Jono Yang <[email protected]>
* Return license validation results in ExpressionInfo object Signed-off-by: Jono Yang <[email protected]>
Signed-off-by: Jono Yang <[email protected]>
* Make helper functions for loading license keys Signed-off-by: Jono Yang <[email protected]>
* Add test for get_license_key_info Signed-off-by: Jono Yang <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
Signed-off-by: Jono Yang <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* Add new test that uses license exception as normal license key Signed-off-by: Jono Yang <[email protected]>
* We keep track of invalid license symbols from syntax errors Signed-off-by: Jono Yang <[email protected]>
Signed-off-by: Philippe Ombredanne <[email protected]>
Improve documentation strings and code format. Signed-off-by: Philippe Ombredanne <[email protected]>
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: