aboutcode-org / aboutcode-org/tracecode-toolkit

Output format design

Open
#3 3 comments 0 reactions 1 assignee Claimed by @licodeli View on GitHub
Dominant language
Python
Stars
5
Forks
5
PR merge metrics
No merged PRs in 30d

Description

We are relating development codebase paths (aka. "source code") to deployed/deployment codebase paths (aka. "binaries") .

A simple design for the output is to reuse exactly the ScanCode format and add a new attribute to the "files". We could have as a major either the scan for the devel or deploy side.
If we have devel as a major, then the results should be the list of deploy paths that a devel file is `deployed_to` as proposed below. This could be either a simple list of paths, OR a richer list of where we have for each "deployed_to" path we know:
- the matcher that was used to establish the trace, e.g. the devel-to-deploy relationship such as a `path match`, a `strace'd build`, a `checksum/sha1 match`, etc.
- the level of confidence of that match (a sha1 match is super strong and high confidence while a mere file name match is weak and low confidence)

```
"files": [
{
"path": "samples/README",
"type": "file",
"name": "README",
"base_name": "README",
"extension": "",
"size": 236,
"date": "2019-09-10",
"sha1": "2e07e32c52d607204fad196052d70e3d18fb8636",
"md5": "effc6856ef85a9250fb1a470792b3f38",
"mime_type": "text/plain",
"file_type": "ASCII text",
"programming_language": null,
"is_binary": false,
"is_text": true,
"is_archive": false,
"is_media": false,
"is_source": false,
"is_script": false,
"files_count": 0,
"dirs_count": 0,
"size_count": 0,
"scan_errors": []
"deployed_to": [
"samples/screenshot.png",
"samples/screenshot.foo",
"samples/screenshot.baz",
]
... OR ...
"deployed_to": [
{"path": "samples/screenshot.png",
"matcher": "path match",
"confidence": "low"
},
{"path": "samples/screenshot.png",
"matcher": "strace",
"confidence": "perfect"
},
{"path": "samples/screenshot.png",
"matcher": "checksum",
"confidence": "perfect"
},
]
```

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.