bids-validator
bids-validator copied to clipboard
Re-implement testing "units" in BIDS metadata
Addresses #969.
This code has been sitting unused for a long time. Does it need some overhauling or more testing?
Codecov Report
Base: 83.28% // Head: 84.93% // Increases project coverage by +1.64%
:tada:
Coverage data is based on head (
ab7c196
) compared to base (b22aa04
). Patch has no changes to coverable lines.
:exclamation: Current head ab7c196 differs from pull request most recent head c5a55ac. Consider uploading reports for the commit c5a55ac to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## master #1355 +/- ##
==========================================
+ Coverage 83.28% 84.93% +1.64%
==========================================
Files 91 83 -8
Lines 3740 3472 -268
Branches 1143 1037 -106
==========================================
- Hits 3115 2949 -166
+ Misses 527 443 -84
+ Partials 98 80 -18
Impacted Files | Coverage Δ | |
---|---|---|
bids-validator/utils/unit.js | 100.00% <ø> (ø) |
|
bids-validator/validators/tsv/tsv.js | 96.83% <ø> (+2.97%) |
:arrow_up: |
bids-validator/validators/tsv/validate.js | 90.90% <0.00%> (-4.55%) |
:arrow_down: |
bids-validator/utils/files/readNiftiHeader.js | 65.62% <0.00%> (-2.12%) |
:arrow_down: |
...validator/utils/files/generateMergedSidecarDict.js | 90.00% <0.00%> (-0.91%) |
:arrow_down: |
bids-validator/validators/nifti/nii.js | 68.78% <0.00%> (-0.71%) |
:arrow_down: |
bids-validator/utils/consoleFormat.js | 85.91% <0.00%> (-0.58%) |
:arrow_down: |
bids-validator/utils/summary/collectModalities.js | 93.18% <0.00%> (-0.57%) |
:arrow_down: |
bids-validator/cli.js | 80.55% <0.00%> (-0.53%) |
:arrow_down: |
bids-validator/utils/bids_files.js | 90.32% <0.00%> (-0.31%) |
:arrow_down: |
... and 31 more |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Yes, for example:
Evidence: Subunit (uV) of unit uV is invalid.
In example ieeg_epilepsy/sub-01/ses-postimp/ieeg/sub-01_ses-postimp_task-seizure_run-01_channels.tsv
units are uV
(which is the recommended CMIXF-12 form).
One problem was the µ
instead of u
for micro (actually both µ
and u
are valid for backwards compatibility):
https://github.com/bids-standard/bids-validator/blob/abb700c79b6d79683598a394aea5e0573b33412b/bids-validator/utils/unit.js#L92
Another one was the Ω
instead of Ohm
(again both Ω
and Ohm
are valid for backwards compatibility):
https://github.com/bids-standard/bids-validator/blob/abb700c79b6d79683598a394aea5e0573b33412b/bids-validator/utils/unit.js#L37
See instructions here: https://github.com/bids-standard/bids-validator/blob/abb700c79b6d79683598a394aea5e0573b33412b/bids-validator/utils/unit.js#L140-L144
I suspect the ci/circleci: test failure is unrelated to this pull request. In any case the error messages don't make any sense.
See #1358.