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

Generate standard JSON files from SCIO-DB #45

Closed
mjherzog opened this issue Nov 12, 2020 · 1 comment
Closed

Generate standard JSON files from SCIO-DB #45

mjherzog opened this issue Nov 12, 2020 · 1 comment
Assignees
Milestone

Comments

@mjherzog
Copy link
Member

mjherzog commented Nov 12, 2020

When you use ScanPipe to analyze a codebase and load the Scan data into the SCIO-DB, you should also be able to extract the Scan data from the SCIO-DB according to any combination of the basic ScanCode runtime parameters:
--info
--copyright
--license
--package
--email
--url
The primary output format should be standard SCTK JSON.
I am not sure what we should put in the output file header, but we would at least want to know what version of SCTK was used for the original Scan. In any case this JSON file must be compatible with ScanCode Workbench since the primary use case is to view Scan data there.

tdruez added a commit that referenced this issue Nov 16, 2020
Signed-off-by: Thomas Druez <tdruez@nexb.com>
tdruez added a commit that referenced this issue Nov 16, 2020
Signed-off-by: Thomas Druez <tdruez@nexb.com>
tdruez added a commit that referenced this issue Nov 16, 2020
Signed-off-by: Thomas Druez <tdruez@nexb.com>
@tdruez
Copy link
Contributor

tdruez commented Nov 16, 2020

@mjherzog Those JSON results are already available and can be generated/gathered from the following places:


Notes: The JSON file content is standard ScanCode format and is fully compatible with ScanCode Workbench. The tool_version entry is included in the headers.

@tdruez tdruez added this to the 1.1 milestone Nov 17, 2020
tdruez added a commit that referenced this issue Nov 17, 2020
https://docs.djangoproject.com/en/3.1/ref/models/querysets/#prefetch-related
> Note that if you use iterator() to run the query, prefetch_related() calls will be ignored since these two optimizations do not make sense together.

Signed-off-by: Thomas Druez <tdruez@nexb.com>
tdruez added a commit that referenced this issue Nov 17, 2020
This is the preferred method to craft outputs filename for consistency.
The current date and time string is included in the filename.

Signed-off-by: Thomas Druez <tdruez@nexb.com>
tdruez added a commit that referenced this issue Nov 17, 2020
Signed-off-by: Thomas Druez <tdruez@nexb.com>
@tdruez tdruez closed this as completed Nov 23, 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

No branches or pull requests

2 participants