bids-standard / legacy-validator

Validator for the Brain Imaging Data Structure
https://bids-standard.github.io/legacy-validator/
MIT License
186 stars 111 forks source link

feat(eval): Distinguish JSON rules from sidecar rules #2031

Closed effigies closed 4 months ago

effigies commented 4 months ago

We currently duplicate a lot of sidecar errors for both the data file and the sidecar. This PR skips sidecar checks for sidecar files, avoids loading sidecar data for JSON files, and creates separate issue codes for missing keys in standalone JSON files (dataset_description.json, *_coordsystem.json, etc.) vs sidecar files.

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 82.85714% with 6 lines in your changes missing coverage. Please review.

Project coverage is 87.09%. Comparing base (796133c) to head (4fa9c76).

Files Patch % Lines
bids-validator/src/schema/applyRules.ts 72.72% 6 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2031 +/- ## ========================================== + Coverage 85.75% 87.09% +1.33% ========================================== Files 91 136 +45 Lines 3785 6449 +2664 Branches 1218 1550 +332 ========================================== + Hits 3246 5617 +2371 - Misses 453 742 +289 - Partials 86 90 +4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

effigies commented 4 months ago

This needs https://github.com/bids-standard/bids-specification/pull/1878. Not filling in context.sidecar for JSON files helped catch some checks that were triggered on sidecar files as well as their data files.