aboutcode-org / aboutcode-org/scancode.io

npm-health: Implement data collection and metrics computation pipeline(s)

Open
#2,154 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
215
Forks
203
Avg merge
4d 8h
Merged PRs (30d)
6

Description

I want to collect specific data in ScanCode.io using GrimoireLab using a ScanCode.io pipeline.

The outcome should be new ScanCode.io pipeline(s) to download and/or clone code and collect metrics, by orchestrating the execution of AboutCode, GrimoireLab, and other open source tools. Collected data is stored for further metric computations.

The high level flow would be:
1. Through a PurlDB API endpoint, the user requests metric scoring for a PURL
2. If the the package has been analyzed already, the data should be retrieved from the PurlDB DB and returned
3. Otherwise, PurlDB queues (or run) a scancode.io data collection/metric computation scoring pipeline
4. The pipeline collects the source/binary/git repos for the PURL
5. Then does it magic in GrimoireLab
6. The GrimoireLab analysis is returned somehow (webhook? polling? direct code integration in SCIO?)
7. PurlDB gets the data back, saves it in its DB and return the results

I suggest we implement a middle out strategy, starting with Grimoire, to ScanCode.io, to PurlDB:
- [x] https://github.com/aboutcode-org/scancode.io/issues/2168
- [ ] https://github.com/aboutcode-org/scancode.io/issues/2167
- [ ] https://github.com/aboutcode-org/purldb/issues/869

Questions:
- is the PurlDB API call returning immediately (and run in the background) or wait synchronously? (NB: We have similar pattern for the on-demand scancode scans in the API already)
- what if the analysis is stale and 3 months old?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.