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

Uploaded Python 2Python 3Windows x86-64

bids_validator_deno-2.0.9-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.9-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.9-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.9-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.9.tar.gz.

File metadata

  • Download URL: bids_validator_deno-2.0.9.tar.gz
  • Upload date:
  • Size: 66.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.9.tar.gz
Algorithm Hash digest
SHA256 8766e2cb0e53479453f05e4782a9e8cd41e9df18018d8639fff54dd6a3ad4a7b
MD5 ff5f883c9f2ba6e253a8d7e4cb87fb24
BLAKE2b-256 ad547dc11b657122ea4afc9b58e3c33d388bd81f5a821585e6e3f8dd77ae6311

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for bids_validator_deno-2.0.9-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 e5f51338083901ab34a5bdcee55647d8bf83a911342b8851de78c564ab8d497c
MD5 634e5a0b1a9a99e3fdc9c1f95fda8e34
BLAKE2b-256 fe8008e7efb84e77838ffc132033bf230fe24fa291fcb52e311f00d04e8138a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for bids_validator_deno-2.0.9-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.9-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.9-py2.py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e5ad3ec33b15b294cc9fc78ae6f4cc0c86172301f9e78d668f0e0fe66e0ee333
MD5 f2a1c59a3c46e3e4840cfdc5e0c47f03
BLAKE2b-256 fb98925f0ff7bbe55dc1a962fe239bbe08472b0e64469dc693ec6871f37fde1d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for bids_validator_deno-2.0.9-py2.py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 2155c2167f33166fe3ca3ae3c51d1dd6217983977e5c53a9234a366555337d97
MD5 46960343c3e57216c8ee3b7422440597
BLAKE2b-256 f61e1175b6afdfc30e9ff7c54c6e1a2a8cbd803c87253cc178412688ab735e37

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for bids_validator_deno-2.0.9-py2.py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 21476745736e26d0358327d8f649efe2c66b3dee93592cd5e92b348e7271f1bf
MD5 3f1cc39ba8b1547dd561acdc227553d2
BLAKE2b-256 e477db6e32f86359710a07f882770f5ec70f6da29d4fca7fc844c309538f3b20

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for bids_validator_deno-2.0.9-py2.py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 5576d6517a38f5d8cda218e90a4993c67ab4d6afb32f4ca209f14fe14180bc96
MD5 8e6dc960f5e979d8f0be561c6659aba9
BLAKE2b-256 ff0a8590480bdf77f7eecce334f28483c9cb28f17cbdafd2e2cb14787f4f2fdf

See more details on using hashes here.

Provenance

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