-
Notifications
You must be signed in to change notification settings - Fork 40
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 spdx names to licenses #54
Conversation
Looks good to me. 👍 |
Sounds sensible enough to me. Probably we should use it if we ever create a Meta 3.0. |
Here is some input data that could be used for a more extensive testsuite: https://github.com/OpenSourceOrg/licenses/blob/master/licenses/spdx/spdx.json (related to #52) |
Good! I'll use that input data to improve the testsuite.
…On Feb 3, 2017 1:32 PM, "Olivier Mengué" ***@***.***> wrote:
Here is some input data that could be used for a more extensive testsuite:
https://github.com/OpenSourceOrg/licenses/blob/
master/licenses/spdx/spdx.json (related to #52
<#52>)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#54 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAd9gBkkwE2JQpjDse_QUwaCnogpbGD5ks5rYx5dgaJpZM4LqMIK>
.
|
I've extended the tests to cover all I think it would be useful a method to get the license via spdx name, I mean: my $license_object = Software::LicenseUtils->new_from_spdx_name( {
spdx_name => 'MPL-2.0',
holder => 'X. Ample'
}) ; So I've added this method dc677bc @dolmen is ok the testsuite? |
I think it's more sensible to think in terms of spdx expressions than in names, especially because the most commonly used license is such an expression. |
Thanks for your comment! You're right, the term "name" is not a good option. I've looked up in The Software Package Data Exchange web, and they use the terms:
The GitHub repo spdx/license-list-data uses in JSON files the key 'licenseId' licenses.json The term 'identifier' is consistent with the OpenSourceOrg/api. (and Perl client) So I'm going to change the term "spdx_name" to "spdx_identifier". Please let me know if there is something wrong with "spdx_identifier". |
I think that is useful for |
Oh good point! Then I'll change the Ok? |
That sounds good. |
Now |
I think it's more helpful to not return anything than guess something that's almost but not quite correct. Eg for |
Yes, I totally agree. I've changed that. Now the method |
This is now part of Software-License 0.103014 :-) |
SPDX project defines a set of identifiers for licenses. This pull request just add a method to get that identifier.
In CPAN there is License::Syntax but doesn't offer an API to get the spdx name, nor the mapping between Software::License name. Although there is a file with a list of licenses and the spdx name and identifier.