-
Notifications
You must be signed in to change notification settings - Fork 33
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
QUESTION: Rationale for classifiers taking precedence over license info #523
Comments
@elrayle This will be a good topic to discuss in our next community meeting. Historically, license was only parsed from classifiers. This commit adds the functionality to extract license from info.license. To avoid any breaking changes, extracting from info.license is added as a fallback if no valid license is parsed from classifiers. |
Another case: https://clearlydefined.io/definitions/pypi/pypi/-/UpSetPlot/0.9.0.
|
Reading through Pypi meta data description, license field seems to be more specific. Shall we give precedence to the license field over classifier in the meta data? @ariel11 @capfei @jeffwilcox @bduranc @Jeffrey-Luszcz @@sgustafsson Any thoughts? |
@capfei Thanks for your feedback! Our email discussion quoted below.
|
During testing my PR, I found some cases that classifier has more detailed information:
I have updated the precedence to prioritize the license field, unless the classifier has the version and the license field does not. I'm excited to hear your thoughts. Additionally, I have included 10 new test cases in my PR. Hopefully, this will help reduce the number of cases for curation. |
Description
It appears that for pypi, classifiers take precedence over the license field when extracting the license information. It is clear from the code how this is happening. I'm wondering about the rationale for this approach. Also if it is determined that one is correct and the other is not, is there a process for updating the license or the classifier as needed?
Test
Fixture Data
classifiers
license
Expected
With a specific license given in
info.license
, I would expect the license to be eitherLGPL-2.0-or-later
orLGPL-2.1-only
.Actual
Precedence is given to classifiers in function _extractDeclaredLicense, which produces license
LGPL-2.0-only
.The text was updated successfully, but these errors were encountered: