Skip to content
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 validator.yml to fix maintenance issues (dependencies, disk space, error throwing) #168

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

joshuacwnewton
Copy link
Member

@joshuacwnewton joshuacwnewton commented Jun 27, 2024

Fixes #167.

From the issue description:

  • The code is unnecessarily slow to run (because it re-runs many calls to pybids, in particular)
  • It's still pinned to the very much EOL python 3.7
  • Some of its dependencies are not backwards compatible
  • It relies on an old file naming scheme that we've since changed
  • It may be running out of disk space on the github actions runner? But there's a code comment somewhere in the workflow files about how to get more space?
  • Some of the checks that it does seem... wrong? Like, a missing abs() around a comparison of two floating point numbers for approximate equality, for example
  • It also looks like the return code of the checker is just ignored by the workflow file? But it doesn't even install anymore, and that results in a workflow failure
  • No automatic retries on failed gets (with -J8)

In summary: I've fixed everything I can within validator.yml itself, and now the checks run (and subsequently throw quite a lot of warnings, which I've escalated to errors). See https:/joshuacwnewton/data-multi-subject/actions/runs/9690897116/job/26741501317 for a sample run on my fork.

But, I haven't yet done anything to actually address those errors (e.g. by setting bids-validator ignore configs for specific warnings, fixing warnings in the repo, or updating the spine-generic scripts upstream to avoid throwing erroneous warnings/errors). That could be done here, or perhaps in a separate PR.

@joshuacwnewton joshuacwnewton added the bug Something isn't working label Jun 27, 2024
@joshuacwnewton joshuacwnewton self-assigned this Jun 27, 2024
Comment on lines 80 to +101
- name: Checking BIDS compliance
run: bids-validator --verbose ./
if: always()
run: |
bids-validator --verbose ./ | tee bids.txt
printf "\nShort summary:\n\n"
# FIXME: This should be replaced with bids-validator settings: A) throw error on warning or B) warning ignores
! grep "\[WARN\]\|\[ERR\]" bids.txt # ! -> Reverse error code so "found == error thrown"

- name: Checking acquisition parameters
run: sg_params_checker -path-in ./
if: always()
run: |
sg_params_checker -path-in ./ | tee params.txt
# FIXME: Checking the output like this should be replaced with SG throwing actual errors
! grep "WARNING" params.txt # ! -> Reverse error code so "found == error thrown"

- name: Checking data consistency
run: sg_check_data_consistency -path-in ./
if: always()
run: |
sg_check_data_consistency -path-in ./ | tee consistency.txt
# FIXME: Checking the output like this should be replaced with SG throwing actual errors
! grep "Warning\|Missing" consistency.txt
grep "all good" consistency.txt
Copy link
Member Author

@joshuacwnewton joshuacwnewton Jun 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: The failures on this PR are to be expected, because all 3 of these checks throw warnings/errors:

  • BIDS validation: Link
    • ERR: code 1 - NOT_INCLUDED
    • WARNING: code 38 - INCONSISTENT_SUBJECTS
    • WARNING: code 39 - INCONSISTENT_PARAMETERS
    • WARNING: code 101 - README_FILE_MISSING
  • Acquisition parameters: Link
    • WARNING: Incorrect RepetitionTime
    • WARNING: Incorrect FlipAngle
    • WARNING: Model 'MAGNETOM Vida' not present
    • WARNING: Missing 'Manufacturer' key in json sidecar
  • Data consistency: Link
    • WARNING: Missing jsonSidecar
    • WARNING: Invalid number of columns. The schema specifies 13, but the data frame has 15

We should brainstorm on how to best fix these issues! Or, if they don't need to be fixed, we should explicitly add ignore rules for them so that they don't get thrown in the first place.

Copy link
Member Author

@joshuacwnewton joshuacwnewton Jun 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BIDS: The WARNINGs can be ignored. (README can be fixed.) ERR should be fixed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated testing was done right before a conference, just for demo purposes, so these warnings aren't actually taken into account for acquisition parameters/data consistency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI workflow file (validator.yml) is in need of maintenance (dependency versions, disk space, speed)
1 participant