Skip to main content

Typescript implementation of the BIDS validator

Project description

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.

Project details


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-2.2.4.tar.gz (79.2 kB view details)

Uploaded Source

Built Distributions

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

bids_validator_deno-2.2.4-py2.py3-none-win_amd64.whl (42.2 MB view details)

Uploaded Python 2Python 3Windows x86-64

bids_validator_deno-2.2.4-py2.py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (43.0 MB view details)

Uploaded Python 2Python 3manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

bids_validator_deno-2.2.4-py2.py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (41.8 MB view details)

Uploaded Python 2Python 3manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

bids_validator_deno-2.2.4-py2.py3-none-macosx_11_0_arm64.whl (39.9 MB view details)

Uploaded Python 2Python 3macOS 11.0+ ARM64

bids_validator_deno-2.2.4-py2.py3-none-macosx_10_12_x86_64.whl (40.8 MB view details)

Uploaded Python 2Python 3macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for bids_validator_deno-2.2.4.tar.gz
Algorithm Hash digest
SHA256 9896795f69b7edfb062d73c8d0139dfd6ef5f020396df7ad07bb120fc45431a5
MD5 cb5d3fca4ba00ba5c98f9d396a3a931f
BLAKE2b-256 ecc72816b8f2ad9c753e53c5278f9bb14bd6676d1ea6ac6c71ecfb5de90b1d9a

See more details on using hashes here.

Provenance

The following attestation bundles were made for bids_validator_deno-2.2.4.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-2.2.4-py2.py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for bids_validator_deno-2.2.4-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 85a9df4e0e00041eb39269559e854b6b989e192a39b508d3fc15ce37dbda739d
MD5 959c7e8c3fee2742ffb245b596c29f3f
BLAKE2b-256 9d22a343884bc00d84ead482c4a0e48e607e4203a1dbbc1b4568e31eeb269693

See more details on using hashes here.

Provenance

The following attestation bundles were made for bids_validator_deno-2.2.4-py2.py3-none-win_amd64.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.

File details

Details for the file bids_validator_deno-2.2.4-py2.py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for bids_validator_deno-2.2.4-py2.py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 236b58251ae3ce1e7ebd3a96e7023eb567d7c9674e6d08b7a8ee98be83a8fdae
MD5 7b9a8b7c1f93e94b5b6b16fa4881b096
BLAKE2b-256 23c32bb8e091a0299a1afcfafbdbdc010ab8533128cf2868f06372e236dfb0a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for bids_validator_deno-2.2.4-py2.py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.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.

File details

Details for the file bids_validator_deno-2.2.4-py2.py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for bids_validator_deno-2.2.4-py2.py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ba32d9ab579b1cf7c7d93191122d598ec69326a5c69d0c4f8694b86bae45ce60
MD5 5d36d284e01c7653e61101809826cb8c
BLAKE2b-256 5c8513d6691bb14fbfee4d4453bd1fc1d9024b534930b2d74e407e7c461f6d49

See more details on using hashes here.

Provenance

The following attestation bundles were made for bids_validator_deno-2.2.4-py2.py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.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.

File details

Details for the file bids_validator_deno-2.2.4-py2.py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for bids_validator_deno-2.2.4-py2.py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 046fb38e175ba93e1adca9bdd7dfc9e12f9f1f0cd77a57c792a02f550f51b00c
MD5 20e38ad8c22b55c880561e1b70385b13
BLAKE2b-256 bee34042560cb5391b3102a1dca1d588ddc7ec1a4c24d17f07bb9de85a39ad0a

See more details on using hashes here.

Provenance

The following attestation bundles were made for bids_validator_deno-2.2.4-py2.py3-none-macosx_11_0_arm64.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.

File details

Details for the file bids_validator_deno-2.2.4-py2.py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for bids_validator_deno-2.2.4-py2.py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 4ee9dc4c9cdf6fb2a8faab7f689d630f595e9a470e1bc30e3135aa6ab2e24cc6
MD5 519222e676d16810989377cf800a78bc
BLAKE2b-256 ee4f9ccff8bd982cf19e860afd8ad2dab24c7ca061abe110bcd74807b2778e5b

See more details on using hashes here.

Provenance

The following attestation bundles were made for bids_validator_deno-2.2.4-py2.py3-none-macosx_10_12_x86_64.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 Pingdom Monitoring Sentry Error logging StatusPage Status page