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

Uploaded Python 2Python 3Windows x86-64

bids_validator_deno-2.0.10-py2.py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (43.9 MB view details)

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

bids_validator_deno-2.0.10-py2.py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (42.8 MB view details)

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

bids_validator_deno-2.0.10-py2.py3-none-macosx_11_0_arm64.whl (41.2 MB view details)

Uploaded Python 2Python 3macOS 11.0+ ARM64

bids_validator_deno-2.0.10-py2.py3-none-macosx_10_12_x86_64.whl (41.9 MB view details)

Uploaded Python 2Python 3macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: bids_validator_deno-2.0.10.tar.gz
  • Upload date:
  • Size: 67.4 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.10.tar.gz
Algorithm Hash digest
SHA256 164ac37a226d9e07b15b8a970a075fc02b451d1311516ece40a84c1667c857de
MD5 a79264624da6ab20fd6c98ca95748788
BLAKE2b-256 9683f43352f63fee609b27fa13bb00f8a75c73cd622de35932118800730497de

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for bids_validator_deno-2.0.10-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 d803747cb236096899a21acda5b06046a0660f621996b7b7a19b7be1639742f4
MD5 6f38a70f0182def05083414363608fd1
BLAKE2b-256 6ce78b980c073d5e97a98bfd54b39efc9a9753822654d7d22b05f75068a90fcd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for bids_validator_deno-2.0.10-py2.py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a5a532b9d28292b762bb0cae5f063039d933eea65077e2fccc25c11b3abf1499
MD5 b5fccf2dbd1778b46f325282dc4879cd
BLAKE2b-256 2e779784494b62a14b9b7003b0563598800520eb318918b73a0454887cb40358

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for bids_validator_deno-2.0.10-py2.py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 68be2926edb15c32c59e75e02e9dfc0ad565f6ec8532cb2963c72f47a945190c
MD5 be0734017fbf7672886c7dc35ddc3b1a
BLAKE2b-256 4383ee7dda39f1e6bdea245b15946c96fdcfa1892bbc2b222cbaaaed2c0953ec

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for bids_validator_deno-2.0.10-py2.py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4c6f39e523a13f3a96a5359529fd6f0a071734fd8ea4b4924ecc3753baa13329
MD5 28f552a1932f74c659d7c7bd8860283a
BLAKE2b-256 631c6681bc40a8967da6b0631dc2f72b1b32cdcf8ab408d9ec63e91b74b3522f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for bids_validator_deno-2.0.10-py2.py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 e2e673c10ca8f49e4a5202fa3abbe08cf4d4429ff3941a1ad2d194028477ec0d
MD5 cf22d469ce48523938b3979a7e19abcc
BLAKE2b-256 57d0c0db3b8df918208633b470ac6ceadd6c81b6cb4f734c14b43dde9df922a2

See more details on using hashes here.

Provenance

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