Skip to content

Add OSI License Key Mappings - #1868

Merged
pombredanne merged 5 commits into
aboutcode-org:developfrom
gaupeng:develop
Jan 29, 2020
Merged

Add OSI License Key Mappings#1868
pombredanne merged 5 commits into
aboutcode-org:developfrom
gaupeng:develop

Conversation

@gaupeng

@gaupeng gaupeng commented Dec 23, 2019

Copy link
Copy Markdown
Contributor

Signed-off-by: Gaupeng gaurang.r.rao@gmail.com

Fixes #1627

  • Maps OSI License Keys to existing Scancode Keys.
  • Modified License Model to have an osi_license_key attribute.
  • Retrieves Scancode Licenses with a corresponding OSI Key for modification.

Tasks

  • Reviewed contribution guidelines
  • PR is descriptively titled 📑 and links the original issue above 🔗
  • Tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR
    Run tests locally to check for errors.
  • Commits are in uniquely-named feature branch and has no merge conflicts 📁

Signed-off-by: Gaupeng <gaurang.r.rao@gmail.com>
@codecov

codecov Bot commented Dec 23, 2019

Copy link
Copy Markdown

Codecov Report

Merging #1868 into develop will decrease coverage by 0.26%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1868      +/-   ##
===========================================
- Coverage    78.64%   78.38%   -0.27%     
===========================================
  Files          131      131              
  Lines        16809    16925     +116     
===========================================
+ Hits         13219    13266      +47     
- Misses        3590     3659      +69
Impacted Files Coverage Δ
src/licensedcode/models.py 82.39% <100%> (+0.02%) ⬆️
src/commoncode/codec.py 74.35% <0%> (-20.52%) ⬇️
src/formattedcode/output_jsonlines.py 78.26% <0%> (-13.05%) ⬇️
src/commoncode/command.py 79.57% <0%> (-7.05%) ⬇️
src/commoncode/functional.py 93.54% <0%> (-6.46%) ⬇️
src/formattedcode/output_json.py 75.3% <0%> (-6.18%) ⬇️
src/extractcode/uncompress.py 90.27% <0%> (-4.17%) ⬇️
src/commoncode/fileutils.py 79.14% <0%> (-3.69%) ⬇️
src/typecode/entropy.py 92.85% <0%> (-3.58%) ⬇️
src/scancode/api.py 94.26% <0%> (-3.19%) ⬇️
... and 24 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ff2c839...817db18. Read the comment docs.

@pombredanne pombredanne left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks... I made a few comments ... (and I know this is still a draft.)

Comment thread etc/scripts/osikeys.py Outdated
Comment thread etc/scripts/osikeys.py Outdated
Comment thread etc/scripts/osikeys.py
Comment thread etc/scripts/osikeys.py Outdated
Comment thread etc/scripts/osikeys.py
Comment thread etc/scripts/osikeys.py Outdated
Signed-off-by: Gaupeng <gaurang.r.rao@gmail.com>
@gaupeng

gaupeng commented Jan 1, 2020

Copy link
Copy Markdown
Contributor Author

@pombredanne I have updated OSI License Keys for the Licenses that have them. Is this fine?

Signed-off-by: Gaupeng <gaurang.r.rao@gmail.com>
@gaupeng
gaupeng marked this pull request as ready for review January 1, 2020 08:28
@gaupeng
gaupeng requested a review from pombredanne January 1, 2020 08:57
Signed-off-by: Gaupeng <gaurang.r.rao@gmail.com>

@pombredanne pombredanne left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking quite good... I have just a few nit pickings for your review

Comment thread src/licensedcode/data/licenses/adapt-1.0.yml Outdated
Comment thread src/licensedcode/data/licenses/apache-2.0.yml Outdated
Comment thread etc/scripts/osikeys.py Outdated
@@ -0,0 +1,51 @@
import urllib.request
import licensedcode.index

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not used. Also we like to sort the imports

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll do the sorting, however, I do use urllib.request to use the OSI APIs to derive the license keys. Also, when I remove the licensedcode.index import, I get a NameError: name 'licensedcode' is not defined error. Should I leave this in?

@pombredanne

Copy link
Copy Markdown
Member

may be some checking by hand of all the "keys" seen in https://www.google.com/search?q=site:https://opensource.org/licenses may help too?

Signed-off-by: Gaupeng <gaurang.r.rao@gmail.com>

@pombredanne pombredanne left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking all good tome!
Thank you ++

@pombredanne
pombredanne merged commit 1637711 into aboutcode-org:develop Jan 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

License ID mapping to Opensource.org

2 participants