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.7.tar.gz (82.1 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.7-py2.py3-none-win_amd64.whl (43.4 MB view details)

Uploaded Python 2Python 3Windows x86-64

bids_validator_deno-2.2.7-py2.py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (44.2 MB view details)

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

bids_validator_deno-2.2.7-py2.py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (42.9 MB view details)

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

bids_validator_deno-2.2.7-py2.py3-none-macosx_11_0_arm64.whl (40.5 MB view details)

Uploaded Python 2Python 3macOS 11.0+ ARM64

bids_validator_deno-2.2.7-py2.py3-none-macosx_10_12_x86_64.whl (42.7 MB view details)

Uploaded Python 2Python 3macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: bids_validator_deno-2.2.7.tar.gz
  • Upload date:
  • Size: 82.1 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.7.tar.gz
Algorithm Hash digest
SHA256 9422973ceeb53c47e6652e0f1c7ec02994a56b001748061c5e610f209ec71fe0
MD5 08eeba0dd381f9b9d212ca5f49f1b915
BLAKE2b-256 b24914f9a525b6867456f5977e7131e06532dbae27f5288075dec602fbbc848f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for bids_validator_deno-2.2.7-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 6490368c4afda7e6563185fde3919ca9862ebe19ae35a9ba84f6a37c67a8bc9a
MD5 b08de9e507d4a8f5130fe5124b6888b1
BLAKE2b-256 859b8654e5776c9921dfdde555607754706c541c547de5e4d0e475042a9335b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for bids_validator_deno-2.2.7-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.7-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.7-py2.py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7a2d8e1a8a8c82c6f4896c1c8c45b1b39d0aadbce8d45ccc63d97b1a9a2441a0
MD5 4462ddb5affe0e1b8ca0665497152367
BLAKE2b-256 6b1e95289a37d66d20911011310771be4752436b3a18c91faea17c9e93ccc984

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for bids_validator_deno-2.2.7-py2.py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 530b3c38a6b2dc3799564bec327b414b832d8b4463d36c38ecb729d604e7c6b4
MD5 394d5527dcfb21bb1b4455740baa4b9f
BLAKE2b-256 d758cad161f634330f3f93a0ddd09c734cce4946461a9930e2d6a5318c3dc725

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for bids_validator_deno-2.2.7-py2.py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d369db0cf91f9fd3fd12e083f0bee8e352c882be0e75196aed6750db57dce7d4
MD5 afe06d881581b0266009c02e62e1c574
BLAKE2b-256 d1e659e9532a169e093290e2d8f879d3edcf94487cc19c8aca440848a65bd599

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for bids_validator_deno-2.2.7-py2.py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 5f82512fffa50da9792469245b3935163cb520d4420b4f6445a1223950dc896d
MD5 fb4272ca957fedb52c2c0f3f91f6e686
BLAKE2b-256 54cdbe714d19981c16334928a52b0b7aab46f3e7d5d7b96f7ec50f1ba4d9b2f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for bids_validator_deno-2.2.7-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