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

Create an extension for scancode #474

Closed
nishakm opened this issue Oct 17, 2019 · 3 comments · Fixed by #481
Closed

Create an extension for scancode #474

nishakm opened this issue Oct 17, 2019 · 3 comments · Fixed by #481
Assignees
Milestone

Comments

@nishakm
Copy link
Contributor

nishakm commented Oct 17, 2019

Description
Create an extension for scancode: https://github.com/nexB/scancode-toolkit

To Do

  1. Find an output format that can is parsable (json or yaml preferred)
  2. Create the plugin and test to see if it can store the output into analyzed_output property

Super Issues
#284

@nishakm nishakm added this to the Release 1.0.0 milestone Oct 17, 2019
@nishakm nishakm self-assigned this Oct 17, 2019
@nishakm
Copy link
Contributor Author

nishakm commented Oct 18, 2019

This requires a new class called File. The SPDX spec has a good model of what a File is: https://spdx.org/sites/cpstandard/files/pages/files/spdxversion2.1.pdf.
Scancode's data model: https://github.com/nexB/aboutcode/blob/master/docs/source/aboutcode-data/abcd.rst
Also affects #271

@nishakm
Copy link
Contributor Author

nishakm commented Oct 22, 2019

Decided to pull the basic plugin creation part into Release 1.0.0 but do the data formatting in the next release.

@nishakm nishakm modified the milestones: Near Future, Release 1.0.0 Oct 22, 2019
@nishakm
Copy link
Contributor Author

nishakm commented Oct 22, 2019

Scancode's pip package that supports python3 has some issues with it: aboutcode-org/scancode-toolkit#1780
However, it still works from source. So I will go ahead and integrate based on the assumption that we are working from source.

nishakm pushed a commit to nishakm/tern that referenced this issue Oct 23, 2019
scancode-toolkit is a python project that does file level scanning
for licenses. This change introduces an extension for this tool.
At the time of this change, scancode's pip package was not installing
due to a missing dependency. While the project figures out a fix, we
will assume that we are working from the root of the git repo within
a python3 virtual environment. Once the fix is in, we will assume
that we are using the python3 pip package.

The executor just runs the appropriate cli command to get licenses,
packages, copyright info and project urls in a pure json object that
gets stored in each ImageLayer object's analyzed_output property.
We then parse the json object and print out the file paths that have
a list of licenses associated with them. This implementation
puts in place the extension without filling in the required metadata
so reporting and multiple formats are not supported here.

Resolves tern-tools#474

Signed-off-by: Nisha K <[email protected]>
rnjudge pushed a commit that referenced this issue Oct 23, 2019
scancode-toolkit is a python project that does file level scanning
for licenses. This change introduces an extension for this tool.
At the time of this change, scancode's pip package was not installing
due to a missing dependency. While the project figures out a fix, we
will assume that we are working from the root of the git repo within
a python3 virtual environment. Once the fix is in, we will assume
that we are using the python3 pip package.

The executor just runs the appropriate cli command to get licenses,
packages, copyright info and project urls in a pure json object that
gets stored in each ImageLayer object's analyzed_output property.
We then parse the json object and print out the file paths that have
a list of licenses associated with them. This implementation
puts in place the extension without filling in the required metadata
so reporting and multiple formats are not supported here.

Resolves #474

Signed-off-by: Nisha K <[email protected]>
rnjudge pushed a commit to rnjudge/tern that referenced this issue Jun 5, 2020
scancode-toolkit is a python project that does file level scanning
for licenses. This change introduces an extension for this tool.
At the time of this change, scancode's pip package was not installing
due to a missing dependency. While the project figures out a fix, we
will assume that we are working from the root of the git repo within
a python3 virtual environment. Once the fix is in, we will assume
that we are using the python3 pip package.

The executor just runs the appropriate cli command to get licenses,
packages, copyright info and project urls in a pure json object that
gets stored in each ImageLayer object's analyzed_output property.
We then parse the json object and print out the file paths that have
a list of licenses associated with them. This implementation
puts in place the extension without filling in the required metadata
so reporting and multiple formats are not supported here.

Resolves tern-tools#474

Signed-off-by: Nisha K <[email protected]>
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 a pull request may close this issue.

1 participant