Skip to main content

Deno build Web validator Documentation Status DOI

The BIDS Validator

The BIDS Validator is a web application, command-line utility, and Javascript/Typescript library for assessing compliance with the Brain Imaging Data Structure (BIDS) standard.

Getting Started

In most cases, the simplest way to use the validator is to browse to the BIDS Validator web page:

The web interface to the BIDS Validator with the "Select Dataset Files" button highlighted. (Dark theme) The web interface to the BIDS Validator with the "Select Dataset Files" button highlighted. (Light theme)

The web validator runs in-browser, and does not transfer data to any remote server.

In some contexts, such as when working on a remote server, it may be easier to use the command-line. The BIDS Validator can be run with the Deno runtime (see Deno - Installation for detailed installation instructions):

deno run -ERWN jsr:@bids/validator

Deno by default sandboxes applications like a web browser. -E, -R, -W, and -N allow the validator to read environment variables, read/write local files, and read network locations.

A pre-compiled binary is published to PyPI and may be installed with:

pip install bids-validator-deno
bids-validator-deno --help

Configuration file

The schema validator accepts a JSON configuration file that reclassifies issues as warnings, errors or ignored.

{
  "ignore": [
    { "code": "JSON_KEY_RECOMMENDED", "location": "/T1w.json" }
  ],
  "warning": [],
  "error": [
    { "code": "NO_AUTHORS" }
  ]
}

The issues are partial matches of the issues that the validator accumulates. Pass the --json flag to see the issues in detail.

Development tools

From the repository root, use ./local-run to run with all permissions enabled by default:

# Run from within the /bids-validator directory
cd bids-validator
# Run validator:
./local-run path/to/dataset

Schema validator test suite

# Run tests:
deno test --allow-env --allow-read --allow-write src/

This test suite includes running expected output from bids-examples and may throw some expected failures for bids-examples datasets where either the schema or validator are misaligned with the example dataset while under development.

Modifying and building a new schema

To modify the schema a clone of bids-standard/bids-specification will need to be made. README and schema itself live here https://github.com/bids-standard/bids-specification/tree/master/src/schema.

After changes to the schema have been made to a local copy the dereferenced single json file used by the validator will need to be built. The bidsschematools python package does this. It can be installed from pypi via pip or a local installation can be made. It lives in the specification repository here https://github.com/bids-standard/bids-specification/tree/master/tools/schemacode

The command to compile a dereferenced schema is bst -v export --schema src/schema --output src/schema.json (this assumes you are in the root of the bids-specification repo). Once compiled it can be passed to the validator via the -s flag, ./bids-validator-deno -s <path to schema> <path to dataset>

Documentation

The BIDS validator documentation is available on Read the Docs.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bids_validator_deno-3.0.0.tar.gz (137.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bids_validator_deno-3.0.0-py3-none-any.whl (4.4 MB view details)

Uploaded Python 3

File details

Details for the file bids_validator_deno-3.0.0.tar.gz.

File metadata

  • Download URL: bids_validator_deno-3.0.0.tar.gz
  • Upload date:
  • Size: 137.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for bids_validator_deno-3.0.0.tar.gz
Algorithm Hash digest
SHA256 427f12c97fdc5f90195ae57b98d3d89b22ad1aaf245036d0e140224a0838bee8
MD5 1e78ffe0f2b590b2db08d5fddfebe354
BLAKE2b-256 30eae8d4bf1dec0a26b9f2a6f64094bce6392a50c9ee4587ae58cf552c03d763

See more details on using hashes here.

Provenance

The following attestation bundles were made for bids_validator_deno-3.0.0.tar.gz:

Publisher: wheels.yml on bids-standard/bids-validator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bids_validator_deno-3.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for bids_validator_deno-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1df679142c90b5b1be7c75fda4429163768d3132fd3112ce2e493362e5a77069
MD5 027933d60e9c6262e1f01288ce41d21f
BLAKE2b-256 3edfe74a3d660820e22e3ec5ee4874ed717c6395589da6aa690d1db56f5b4d02

See more details on using hashes here.

Provenance

The following attestation bundles were made for bids_validator_deno-3.0.0-py3-none-any.whl:

Publisher: wheels.yml on bids-standard/bids-validator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page