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

fix: Load schema with fetch, default to JSR package #2112

Closed effigies closed 3 months ago

effigies commented 3 months ago

The current version emits a more-or-less obligatory error due to the use of import with an https URL. That seems like a thing of Deno past.

Given that we're hosting the schema at the JSR, let's go ahead and default to that. If someone wants to provide a URL, then a fetch can be done and the JSON can be loaded. This means BIDS_SCHEMA pointing to local files will need to use file:///..., but that seems fine.

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 22.22222% with 14 lines in your changes missing coverage. Please review.

Project coverage is 87.58%. Comparing base (b087c35) to head (0d12f90). Report is 3 commits behind head on master.

Files Patch % Lines
bids-validator/src/setup/loadSchema.ts 22.22% 14 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2112 +/- ## ========================================== + Coverage 85.69% 87.58% +1.88% ========================================== Files 91 133 +42 Lines 3782 6973 +3191 Branches 1220 1656 +436 ========================================== + Hits 3241 6107 +2866 - Misses 455 771 +316 - Partials 86 95 +9 ```

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

effigies commented 3 months ago

@nellh Just pushed a commit to remove a default value from the --schema CLI flag, squeezed in after your review.