-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update nwbinspector validation workflow #122
Conversation
nwbinspector nwb_files --threshold BEST_PRACTICE_VIOLATION | ||
nwbinspector nwb_files --threshold BEST_PRACTICE_VIOLATION --json-file-path out.txt | ||
if ! grep -q '"messages": \[\]' out.txt; then | ||
echo "NWBInspector found issues in the NWB files" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to also print the contents of the out.txt file to the command-line to make it easy to see the issues found in the GitHub Action directly. I would also rename out.txt to out.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to also print the contents of the out.txt file to the command-line to make it easy to see the issues found in the GitHub Action directly.
The report summary should be printed out and formatted automatically by running nwbinspector (see the Install pynwb and run validation step here), in this action there are 0 issues found but otherwise it will print the issues in the GitHub Action.
I would also rename out.txt to out.json
Will do!
.github/workflows/tests.yml
Outdated
nwbinspector nwb_files --threshold BEST_PRACTICE_VIOLATION --json-file-path out.txt | ||
if ! grep -q '"messages": \[\]' out.txt; then | ||
echo "NWBInspector found issues in the NWB files" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nwbinspector nwb_files --threshold BEST_PRACTICE_VIOLATION --json-file-path out.txt | |
if ! grep -q '"messages": \[\]' out.txt; then | |
echo "NWBInspector found issues in the NWB files" | |
nwbinspector nwb_files --threshold BEST_PRACTICE_VIOLATION --json-file-path out.json | |
if ! grep -q '"messages": \[\]' out.json; then | |
echo "NWBInspector found issues in the NWB files" | |
cat out.json |
Fix #96.
The validation job will now fail if NWBInspector finds issues at or above the BEST_PRACTICE_VIOLATION importance level in the NWB files generated by the tests.