Skip to content

bids-standard/python-validator

Repository files navigation

.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.


Adam Li

πŸ’» ⚠️ πŸ““ πŸ›

Adam Thomas

πŸ“–

Alexander Jones

πŸ’» ⚠️ πŸ€”

Ben Beasley

πŸ“¦

Chris Gorgolewski

πŸ› πŸ’» πŸ”£ πŸ“– πŸ’‘ πŸ€” πŸš‡ 🚧 πŸ§‘β€πŸ« πŸ’¬ πŸ‘€ ⚠️ βœ… πŸ“’ πŸ““

Chris Holdgraf

πŸ’»

Chris Markiewicz

πŸ’» ⚠️ πŸ€” πŸ› πŸ’¬ πŸ”§ 🚧

David Nishikawa

πŸ’» ⚠️

Dimitri Papadopoulos Orfanos

πŸ’»

Duncan Macleod

πŸš‡

Franklin Feingold

πŸ“–

Gregory noack

πŸ’» ⚠️

Horea Christian

πŸ’»

Jakub Kaczmarzyk

πŸš‡

Joke Durnez

πŸ’»

Mainak Jas

πŸ’» ⚠️ πŸ€” πŸ‘€ πŸ““

Marco Castellaro

πŸ’» ⚠️

Max

πŸ’» πŸ›

Michael Hanke

πŸ“–

Mikael Naveau

πŸ’»

Nell Hardcastle

πŸ’» πŸ€” πŸš‡ πŸ’¬ πŸ‘€

Nicolas Traut

πŸ’»

Parul Sethi

πŸ’» ⚠️

Patricia Clement

πŸ’»

Remi Gau

πŸ’» πŸ“– πŸ““

Richard HΓΆchenberger

πŸ’» πŸ““ ⚠️ πŸ›

Robert Oostenveld

πŸ’» πŸ€” πŸ› ⚠️

Rohan Goyal

πŸ’»

Ross Blair

🚧 πŸ€” πŸ’» πŸ› πŸš‡ πŸ“† πŸ’¬ πŸ‘€ πŸ”§ ⚠️

Russ Poldrack

πŸ’» πŸ’΅ πŸ”

Soichi Hayashi

πŸ›

Stefan Appelhoff

πŸ› πŸ’» πŸ”£ πŸ“– πŸ’‘ πŸ€” πŸš‡ 🚧 πŸ§‘β€πŸ« πŸ’¬ πŸ‘€ ⚠️ βœ… πŸ“’ πŸ““

Suyash

πŸ’»

Taylor Salo

πŸ’»

Teal Hobson-Lowther

πŸ’» ⚠️

Travis Riddle

πŸ›

VisLab

πŸ€” πŸ’»

Wazeer Zulfikar

πŸ“–

Yaroslav Halchenko

πŸ€” πŸ’» πŸ“– πŸ““

constellates

πŸ’» ⚠️

dewarrn1

πŸ’»

dkp

πŸ’»

goldmund

πŸ’» ⚠️

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published