Registry / data / bids-validator

bids-validator

JSON →
library1.14.7.post0pypypi✓ verified 85d ago

The BIDS Validator checks that a dataset directory conforms to the Brain Imaging Data Structure (BIDS) specification. It reports errors, warnings, and suggestions. The current PyPI version is 1.14.7.post0 (a legacy version); the actively developed JavaScript/Node version is 2.4.1. The Python package is a wrapper around the Node.js validator and is in maintenance mode. Release cadence is irregular.

pip install bids-validator
INSTALL
IMPORT
SIG · BIDS-VALIDATOR
B
bids-validator
datapythonv1.14.7.post0
Install
2.0s avg
Import
46ms
Disk
21MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.14.7.post0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.048s · 22.3MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.0s · import 0.044s · 23MB
21MB installed
● package 21MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

BIDSValidator
from bids_validator import BIDSValidator
The Python module is 'bids_validator', not 'bids-validator'.

Validate a BIDS dataset and print all issues.

from bids_validator import BIDSValidator validator = BIDSValidator() # Validate a dataset directory result = validator.validate('/path/to/dataset') # Iterate over issues for issue in result['issues']: print(issue['severity'], issue['key'], issue['message'])
bids-validator --version
Debug
Known issues
deprecatedThe Python package (PyPI) is a legacy wrapper around an older version of the Node.js validator. The actively developed version is the Node.js package (npm). New features and schema updates are only available in the Node.js version.
fix
Use the Node.js validator by running 'bids-validator' via npx or install the npm package. For Python-only workflows, consider using the 'bids-validator' command-line tool installed with pip, but expect limited updates.
affects: >=1.0.0, <2.0.0
gotchaThe Python package 'bids-validator' is imported as 'bids_validator' (underscore), not the hypenated name. Many users mistakenly try 'from bids-validator import ...' which causes a syntax error.
fix
Use 'from bids_validator import BIDSValidator'.
affects: all
gotchaThe Python package requires Node.js to be installed. If Node.js is missing, the validator will fail with an obscure error or silently not work.
fix
Install Node.js (>=12) from https://nodejs.org/ or via your package manager.
affects: all
breakingBetween version 1.x and 2.x of the node package (which the Python wrapper does not match), the API changed significantly. The Python package is pinned to an older schema version and may not validate datasets following newer BIDS specification versions.
fix
Use the Node.js version for full BIDS schema support (v1.11.x). For Python, consider other tools like 'pybids' for programmatic access.
affects: 1.x (Python)
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'bids-validator'
Attempting to import with a hyphen instead of an underscore.
fix
Run 'import bids_validator' (or 'from bids_validator import BIDSValidator').
bids-validator: command not found
The pip install does not install an executable named 'bids-validator' on all platforms, or the PATH is not set properly.
fix
After pip install, try 'python -m bids_validator' or install the Node.js version via npm.
Error: Cannot find module 'bids-validator'
The Node.js validator is not installed when using the Python package, or the wrong version is installed.
fix
Ensure Node.js is installed and run 'npx bids-validator' or 'npm install -g bids-validator'.
Upgrade
Version history
1.14.7.post0latest on PyPI · released Aug 6, 2024
Audit
Dependencies
noderequiredThe Python package requires Node.js to run the actual validator.
Agent activity
20 hits · last 30 days
node
16
Amazon
1
OpenAI (training)
1
Resources
bids-validator — pip install bids-validator · libregistry