Skip to content

bids-standard/python-validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

687 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

.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

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors