Below, we note down some helpful information for contributors.
A maintainer of a dataset is responsible for keeping the dataset up to date, and making sure that all updates are mirrored between the dataset with full size raw data (for example, as hosted on OpenNeuro), and the bids-example dataset with 0kb size (empty) raw data.
Typically an update to a BIDS dataset may be required, if the bids-validator is updated and gets an increased coverage of BIDS aspects to validated. In such cases, the new validator may reveal bugs that have gone undetected in the previous validation.
The datasets in the bids-examples repository are intended for lightweight testing purposes only. Keeping the data volume low allows for fast download times and a low memory footprint in the tests these data are used for.
Admittedly, these advantages come at the expense of reduced testing functionality. Because the tests cannot go beyond very basic checks of filenames and directory structures.
To provide a remedy for that, we provide some datasets with intact data headers, see the Dataset Index Table.
You can always write a custom script in your favourite programming language,
but if you need a quick and simple way and have access to a unix based machine
(e.g., OSX, Linux), you can use the find
command line tool:
find <path_to_ds> -type f -name '*.fif' -exec truncate -s 0 {} +
which means:
- in this directory
<path_to_ds>
- ... find everything of type "file" (or specify
d
for directory, ...) - [optional] ... use
-name
with wildcard*
to match to particular file types - ... for each file, execute something
- ... namely, truncate the file
- ... to size 0
{}
is where a file name is put automatically (do not modify it)+
means, this is performed not file-wise but with a bunch of files at once. Could also be\;
to have it one after the other
Note that these steps must be executed whenever a new dataset is added to the repository.
- Edit the
dataset_listing.tsv
file to add or update datasets from the table. - Install all the necessary dependencies:
pip install -r tools/requirements.txt
- Then run the script:
python tools/print_dataset_listing.py
- Finally,
git commit
all changes andgit push
them to your remote (for example when you are working on a Pull Request)
We release bids-examples
in sync with bids-specification
.
- Make sure your local repository is up to date:
git fetch upstream
(this assumes you have thebids-standard/bids-examples
repository configured as a git remote called "upstream") - Tag the
master
branch:git tag -a -m "X.X.X" X.X.X upstream/master
(replaceX.X.X
with the version to be released) - Push the tag upstream:
git push upstream X.X.X
- Create a GitHub release using the new tag. Fill the title of the release
with the name of the tag. Fill the description of the release with a sentence like
"Microscopy" BEP was merged into BIDS-specification (2022-02-15).
- You are done!