bids-standard / bids-specification

Brain Imaging Data Structure (BIDS) Specification
https://bids-specification.readthedocs.io/
Creative Commons Attribution 4.0 International
267 stars 154 forks source link

ENH: Add CLI tool for filename validation for use in pre-receive hooks #1700

Open effigies opened 5 months ago

effigies commented 5 months ago

This is a basic validator that accepts a .bidsignore list and a list of files. The use case is to quickly determine if a git push should be accepted by a server.

Todo:

effigies commented 4 months ago

@nellh What would be a good format for dataset_description? Right now it's:

ignore-entry1
ignore-entry2
...
ignore-entryN
0001
file1
file2
...
fileN

We could do:

{
  ...
}
0000
ignore-entry1
ignore-entry2
...
ignore-entryN
0001
file1
file2
...
fileN

This would be kinda backwards compatible, as the 0001 will continue to separate ignore and file listing, and then we could look for 0000\n in the ignore list. But I'm not sure if we care about backwards compatibility, and if there might be something better.

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 1.47059% with 67 lines in your changes are missing coverage. Please review.

Project coverage is 83.89%. Comparing base (bd08602) to head (087ccb4).

:exclamation: Current head 087ccb4 differs from pull request most recent head ec42201. Consider uploading reports for the commit ec42201 to get more accurate results

Files Patch % Lines
tools/schemacode/bidsschematools/__main__.py 0.00% 67 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1700 +/- ## ========================================== - Coverage 87.93% 83.89% -4.04% ========================================== Files 16 16 Lines 1351 1416 +65 ========================================== Hits 1188 1188 - Misses 163 228 +65 ```

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