-
Notifications
You must be signed in to change notification settings - Fork 95
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
load_inventory pipeline does not work with SCIO JSON output #609
Comments
Signed-off-by: Thomas Druez <[email protected]>
@JonoYang I've try an implementation based on your suggestion @ https://github.com/nexB/scancode.io/compare/609-load-inventory-scio |
@tdruez LGTM! I fetched your branch and I am able to load both scancode.io and scancode-toolkit scans using the load_inventory pipeline |
Signed-off-by: Thomas Druez <[email protected]>
Signed-off-by: Thomas Druez <[email protected]>
Signed-off-by: Thomas Druez <[email protected]>
#636) Signed-off-by: Thomas Druez <[email protected]>
Added in #636 |
The load_inventory pipeline loads the JSON scan into a VirtualCodebase object, where the JSON scan data is mapped to a Codebase and Resource objects. VirtualCodebase requires that a root Resource be present in the scan in order for it to be created. When a Codebase is created from a scancode.io Project inputs, we strip the root from the paths of the Resources created, so the root Resource is not created. This is the main reason why the existing scan import code doesn't work.
A solution may be to have some functions that iterate through the JSON and create Packages and Resources as they appear in the scan and avoid using code that's specific to VirtualCodebase.
The text was updated successfully, but these errors were encountered: