Skip to content
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

Solve KeyError Issues #4

Merged
merged 1 commit into from
Jul 9, 2020

Conversation

AyanSinhaMahapatra
Copy link
Collaborator

Solves issue - #3
Adds schema assertion, only allowing Scancode 3.2.2 and extracts other info
from path and saves to file. Also handles keyerror arising from packages
with zero license detections. Modifies .ipynb files to reflect changes.

Signed-off-by: Ayan Sinha Mahapatra ayansmahapatra@gmail.com

Solves issue - aboutcode-org#3
Adds schema assertion, only allowing Scancode 3.2.2 and extracts other info
from path and saves to file. Also handles keyerror arising from packages
with zero license detections. Modifies .ipynb files to reflect changes.

Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
@AyanSinhaMahapatra
Copy link
Collaborator Author

AyanSinhaMahapatra commented Jul 5, 2020

So These KeyErrors came from two issues,

  1. A lot of these scans (the database dump provided by @MaJuRG) was performed by older scancode versions, so they have very different schema, resulting in KeyErrors. Counts of Different Schema which were there out of 4099 package scans -
2.10.2.json     191
2.2.1.json        1
2.9.1.json       10
2.9.2.json      171
3.1.2.json        1
3.2.2.json     3725

Out of all these only, the 3.2.2 is kept, others dropped, as @pombredanne suggested in Gitter chat.

that's OK to ignore any scancode version before 3.0.x ... this is too old

  1. Some packages don't have any license information in any of the files, so this not accounted for, and was creating some KeyErrors, as all rows were deleted in DataFrames.

Also, all .ipynb files have been updated, and can be run in Google Colab.

Copy link
Contributor

@steven-esser steven-esser left a comment

Choose a reason for hiding this comment

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

@AyanSinhaMahapatra I think this is ready to merge, no?

@AyanSinhaMahapatra
Copy link
Collaborator Author

@MaJuRG Yes!

@steven-esser steven-esser merged commit b5d9c76 into aboutcode-org:master Jul 9, 2020
AyanSinhaMahapatra added a commit that referenced this pull request May 5, 2022
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
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.

2 participants