-
Notifications
You must be signed in to change notification settings - Fork 6
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
Creates stats file of all repos #35
Comments
The yaml file can be parsed with https://www.npmjs.com/package/js-yaml which should already be listed as a dep in package.json. As we are using Typescript we probably also need to add |
We should have unit test for different results like
|
Maybe something like this? [{
"fair-software": [{
"fairtally": {
"files": 1,
"dependencies": 17,
"detected": 12,
"unresolved": 9,
"issues": 0
}
}, {
"howfairis": {
"files": 1,
"dependencies": 17,
"detected": 12,
"unresolved": 9,
"issues": 0
}
}],
"tortellini-tools": [{
"action": {
"files": 1,
"dependencies": 17,
"detected": 12,
"unresolved": 9,
"issues": 0
}
}]
}]
|
Changed my mind, I now prefer to have a flat structure schema: {
"items": {
"additionalProperties": false,
"properties": {
"dependencies": {
"type": "number"
},
"detected": {
"type": "number"
},
"files": {
"type": "number"
},
"issues": {
"type": "number"
},
"owner": {
"type": "string"
},
"repo": {
"type": "string"
},
"report": {
"type": "string"
},
"unresolved": {
"type": "number"
},
"url": {
"type": "string"
}
},
"type": "object",
"required": [
"dependencies",
"detected",
"files",
"issues",
"owner",
"repo",
"unresolved",
"url",
"report"
]
},
"minItems": 1
} example data: [{
"dependencies": 1,
"detected": 1,
"files": 4,
"issues": 4,
"owner": "afasfa",
"repo": "afasfasdfadsa",
"url": "https://234234.com/d",
"report": "https://tortellini-bkt2-5uk3-fbnr.s3.eu-central-1.amazonaws.com/.tortellini/out/3D-e-Chem/knime-kripodb/scan-report-web-app.html",
"unresolved": 5
},
{
"dependencies": 1,
"detected": 1,
"files": 4,
"issues": 4,
"owner": "afasfa",
"repo": "afasfasdfadsa",
"url": "https://234234.com/d",
"report": "https://tortellini-bkt2-5uk3-fbnr.s3.eu-central-1.amazonaws.com/.tortellini/out/3D-e-Chem/knime-kripodb/scan-report-web-app.html",
"unresolved": 3
}
] |
Example node script to use encoded data to get statistics. |
Instead yaml use the html file and parse the blob using some html parsing package and use #35 (comment) snippet to parse blob |
See https://github.com/oss-review-toolkit/ort/blob/edbb46cb1dab1529d5ffb81cba18d365b98ef23e/reporter-web-app/src/sagas/index.js#L29-L51 how to get the blob from the HTML dom tree and parse it. |
The data we decoded from the HTML file looks like We could use https://github.com/oss-review-toolkit/ort/blob/master/reporter/src/funTest/assets/evaluated-model-reporter-test-expected-output.json as input for a unit test. |
Is the url is the repository url which was given in of the lines of the repositories input file? The action does not know where its output will be hosted so instead of using a full URL in |
url: yes it's the full repo url that the user supplied. it gets here via gitrepo:GitRepo |
The PR #126 has been merged giving a overview page showing statistics (nr of violations, deps, licenses, etc.) for each repo. However the json files as described in this issue have not been created, because for mvp the index.html with JSON data inside was enough. |
Write a Typescript function that can parse
out/*/*/evaluation-result.yml
and stores in JSON inindex-<timestamp>.json
with the following info:Would be nice to also include a link to
out/*/*/scan-report-web-app.html
report for each repo.The file should also be stored as
index-latest.json
so Vue app always shows latest stats (#36)The text was updated successfully, but these errors were encountered: