close
Skip to content

bids-standard/python-validator

.github/workflows/build-test-deploy.yml codecov DOI PyPI version Conda version

Python BIDS-Validator

This is a library of helper functions written in Python, for use with BIDS compliant applications written in this language.

The main function determines if a file path is compliant with the BIDS specification.

Installation

To install with pip:

python -m pip install bids_validator

To install with conda:

conda install bids-validator

Quickstart

  1. Open a Python terminal and type: python
  2. Import the BIDS Validator package from bids_validator import BIDSValidator
  3. Check if a file is BIDS compatible BIDSValidator().is_bids('/relative/path/to/a/bids/file')
  4. Note, the file path must be relative to the root of the BIDS dataset, and a leading forward slash / must be added to the file path.

Example

from bids_validator import BIDSValidator

validator = BIDSValidator()

filepaths = ["/sub-01/anat/sub-01_rec-CSD_T1w.nii.gz", "/sub-01/anat/sub-01_acq-23_rec-CSD_T1w.exe"]
for filepath in filepaths:
    print(validator.is_bids(filepath))  # will print True, and then False

Note, the file path must be relative to the root of the BIDS dataset, and a leading forward slash / must be added to the file path.

Acknowledgments

Many contributions to the bids-validator were done by members of the BIDS community. See the list of contributors.

A large part of the initial development of bids-validator was done by Squishymedia, who are in turn financed through different grants offered for the general development of BIDS. See the list below.

Development and contributions were supported through the following federally funded projects/grants:

Maintainers and Contributors

All Contributors

This project follows the all-contributors specification. Contributions of any kind are welcome!

The project is maintained by @rwblair with the help of many contributors listed below. (The emoji key is indicating the kind of contribution)

Please also see Acknowledgments.

Image
Adam Li

💻 ⚠️ 📓 🐛
Image
Adam Thomas

📖
Image
Alexander Jones

💻 ⚠️ 🤔
Image
Ben Beasley

📦
Image
Chris Gorgolewski

🐛 💻 🔣 📖 💡 🤔 🚇 🚧 🧑‍🏫 💬 👀 ⚠️ 📢 📓
Image
Chris Holdgraf

💻
Image
Chris Markiewicz

💻 ⚠️ 🤔 🐛 💬 🔧 🚧
Image
David Nishikawa

💻 ⚠️
Image
Dimitri Papadopoulos Orfanos

💻
Image
Duncan Macleod

🚇
Image
Franklin Feingold

📖
Image
Gregory noack

💻 ⚠️
Image
Horea Christian

💻
Image
Jakub Kaczmarzyk

🚇
Image
Joke Durnez

💻
Image
Mainak Jas

💻 ⚠️ 🤔 👀 📓
Image
Marco Castellaro

💻 ⚠️
Image
Max

💻 🐛
Image
Michael Hanke

📖
Image
Mikael Naveau

💻
Image
Nell Hardcastle

💻 🤔 🚇 💬 👀
Image
Nicolas Traut

💻
Image
Parul Sethi

💻 ⚠️
Image
Patricia Clement

💻
Image
Remi Gau

💻 📖 📓
Image
Richard Höchenberger

💻 📓 ⚠️ 🐛
Image
Robert Oostenveld

💻 🤔 🐛 ⚠️
Image
Rohan Goyal

💻
Image
Ross Blair

🚧 🤔 💻 🐛 🚇 📆 💬 👀 🔧 ⚠️
Image
Russ Poldrack

💻 💵 🔍
Image
Soichi Hayashi

🐛
Image
Stefan Appelhoff

🐛 💻 🔣 📖 💡 🤔 🚇 🚧 🧑‍🏫 💬 👀 ⚠️ 📢 📓
Image
Suyash

💻
Image
Taylor Salo

💻
Image
Teal Hobson-Lowther

💻 ⚠️
Image
Travis Riddle

🐛
Image
VisLab

🤔 💻
Image
Wazeer Zulfikar

📖
Image
Yaroslav Halchenko

🤔 💻 📖 📓
Image
constellates

💻 ⚠️
Image
dewarrn1

💻
Image
dkp

💻
Image
goldmund

💻 ⚠️

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors