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

Uploaded Python 2Python 3Windows x86-64

bids_validator_deno-2.0.6-py2.py3-none-manylinux_2_24_x86_64.whl (42.3 MB view details)

Uploaded Python 2Python 3manylinux: glibc 2.24+ x86-64

bids_validator_deno-2.0.6-py2.py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl (41.1 MB view details)

Uploaded Python 2Python 3manylinux: glibc 2.17+ ARM64manylinux: glibc 2.24+ ARM64

bids_validator_deno-2.0.6-py2.py3-none-macosx_11_0_arm64.whl (39.8 MB view details)

Uploaded Python 2Python 3macOS 11.0+ ARM64

bids_validator_deno-2.0.6-py2.py3-none-macosx_10_12_x86_64.whl (40.5 MB view details)

Uploaded Python 2Python 3macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for bids_validator_deno-2.0.6.tar.gz
Algorithm Hash digest
SHA256 d93b835786a325bd74d3be583a2a3bd8682183c378fe1c0daba658902389b318
MD5 e1ad092511c6fd3666dba52d10aef298
BLAKE2b-256 0685b5419688f5aa7098b0f87d9fe4629fb43d11a2deaed9afc4c984a66fc92b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for bids_validator_deno-2.0.6-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 19ae5e101f2f30bc33c3488d76376fc9f82bf094a528cfa2d374c32d752f7904
MD5 41e8da2c4c6648b019010ede52faed53
BLAKE2b-256 676fbb44d38f1790aeb678bd088b908a171a13c77778ae9d5635f73bf7115f23

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for bids_validator_deno-2.0.6-py2.py3-none-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 dc58172eac4188a86331b0a351917fb3712be34609715d118293e7c46b2dac29
MD5 9a8b1a4e45fac38d337c9627ef50e272
BLAKE2b-256 697fd143bf0fdc6bbae5cba04ad7fba2e4ed7e2f5435527d88c82a64d175205c

See more details on using hashes here.

Provenance

The following attestation bundles were made for bids_validator_deno-2.0.6-py2.py3-none-manylinux_2_24_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.0.6-py2.py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl.

File metadata

File hashes

Hashes for bids_validator_deno-2.0.6-py2.py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl
Algorithm Hash digest
SHA256 49ee2befb588d0382532d3c444eb34031aa22fbc8ef9a8fa2328a349dc71a16c
MD5 2e313c3a4cb08655a5557bff72dda2fc
BLAKE2b-256 cc9e56cc947111bc676247f8ce2070fcddcd2a64568c32898ca97de90c77cf32

See more details on using hashes here.

Provenance

The following attestation bundles were made for bids_validator_deno-2.0.6-py2.py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_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.0.6-py2.py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for bids_validator_deno-2.0.6-py2.py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b58f31a4808b5577417e3fef53208ded7178b6fa82e0bd9ba94e8096eac81507
MD5 25b9384e4a4b1255a1c6a2c1a17e6a25
BLAKE2b-256 3248807c985122a66268462a998e789a7f56724fa0b7d8870c42a4db2789e4a3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for bids_validator_deno-2.0.6-py2.py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 3d33ccaaf6a8d809b797f6231c8194eb42c04047564b622ca98ac2a1e213042f
MD5 041ca8708139dfa60aa042cab0a9c96d
BLAKE2b-256 bab5f62c567db55b4822f33b4b4739859b26424b125e48ce94bd988eef16c93b

See more details on using hashes here.

Provenance

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