fairtracks / fairtracks_standard

FAIRtracks is a JSON Schema defining a minimal standard for genomic track metadata.
https://fairtracks.net
Creative Commons Attribution 4.0 International
7 stars 2 forks source link

Update github checks code to correspond with validator changes #68

Open sveinugu opened 4 years ago

sveinugu commented 4 years ago

Not really a bug (there was a bug, but it was fixed in https://github.com/fairtracks/fairtracks_standard/pull/67/commits/178dc2e125b44db319c9cafc439fc1879256fc31), but some recent changes to the validator (https://github.com/fairtracks/fairtracks_validator/commit/f4146d7995192485f5aa5b5c719d5c2cf7ef0d1e) have implemented a JSON output and exit codes for the python script, just as we initially wanted for the GitHub validation checks. I patched the checks so that they now work, but they still parse the verbose output. A better option is to go back and add parsing of the JSON results, as I did in my original one-liner:

python3 -c "import json, re; print(*['']+[' [{}] {}'.format(*u) for u in enumerate(sorted(set(re.sub('/\d+/', '/X/', e['description']) for e in json.load(open('validate_results.json'))['errors'])))]+[''], sep='\n\n')"

No hurry, though, as the current implementation works.