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

Uploaded Python 2Python 3Windows x86-64

bids_validator_deno-2.2.10-py2.py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (44.3 MB view details)

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

bids_validator_deno-2.2.10-py2.py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (43.0 MB view details)

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

bids_validator_deno-2.2.10-py2.py3-none-macosx_11_0_arm64.whl (40.6 MB view details)

Uploaded Python 2Python 3macOS 11.0+ ARM64

bids_validator_deno-2.2.10-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.10.tar.gz.

File metadata

  • Download URL: bids_validator_deno-2.2.10.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.10.tar.gz
Algorithm Hash digest
SHA256 7a421a794900c64b4f32c2b5a9680a0e190004605d92980eeb59360292e7acfc
MD5 31ab00b6919ade05b1f84703e06bfb57
BLAKE2b-256 8773e40cc4d1a95d719428337c0376f947ad600edf4a928cd406c0e8a8e7efa2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for bids_validator_deno-2.2.10-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 e927fb4ed61520739c8445e3faebef081800fe8c88c4d4ffc6d124f12efa2ae8
MD5 188a7a82e675b4374ab8b157af11a83c
BLAKE2b-256 be500a0e59f491fdc3517c328c354928a1fbd218f34eeb7194ce2c641cd5aa7c

See more details on using hashes here.

Provenance

The following attestation bundles were made for bids_validator_deno-2.2.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.2.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.2.10-py2.py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 292e482281df52b0b80bf21b30fc0186689668b89166e676a5916c313ece452e
MD5 10f8c6e2e61790d9eeafaa2efe516744
BLAKE2b-256 798ee1a9aef82e0ba90b46022b7f2293ff8ffe950c1fc1df5e643e786985fc9f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for bids_validator_deno-2.2.10-py2.py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ef4baaf9a67011cb892fc8571e6dbf18a88ce0854c6ddca80718ee910aecffd7
MD5 4361a8fff6de90b47537657e88f96c4c
BLAKE2b-256 a85015c0a6d78ab1887a02f5ab2cc73e3de6b544973714e1728e8f86a3510029

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for bids_validator_deno-2.2.10-py2.py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 18ca532909452f668cbc7642e5b0b6cfc7a43a5cbd8c66d965759f8c488049d6
MD5 a9a3a598e72c641f42f0734b0f885353
BLAKE2b-256 add22503076540f6478ce9ad0e26c969257fade264c1ae1a3be39d773c49dcf8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for bids_validator_deno-2.2.10-py2.py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 48981b619e4811f32e58abd70dde34d78bcc448f6125437e9fb90a8d5978b7de
MD5 1aa302d52fb2e5c3164387d2b8539264
BLAKE2b-256 6d9390565d485ef5e0449e85c6b1bfc6505d4187acdcb8552178e6383226d0a5

See more details on using hashes here.

Provenance

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