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

Uploaded Python 2Python 3Windows x86-64

bids_validator_deno-2.4.0-py2.py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (44.7 MB view details)

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

bids_validator_deno-2.4.0-py2.py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (43.5 MB view details)

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

bids_validator_deno-2.4.0-py2.py3-none-macosx_11_0_arm64.whl (41.1 MB view details)

Uploaded Python 2Python 3macOS 11.0+ ARM64

bids_validator_deno-2.4.0-py2.py3-none-macosx_10_12_x86_64.whl (43.2 MB view details)

Uploaded Python 2Python 3macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: bids_validator_deno-2.4.0.tar.gz
  • Upload date:
  • Size: 83.5 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.4.0.tar.gz
Algorithm Hash digest
SHA256 78cd6bc4d43aa6b17555185181c74b22e2ccaea8c3494175b6524807b467aa94
MD5 1e9bcb8c208233006340cc2d2ea63cae
BLAKE2b-256 7e362ab666d2277469c47ba6e8171cd2bbf3791201e8793e717a79e4544d545f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for bids_validator_deno-2.4.0-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 181cc80b792523970a134962e1f65ec0539b455fa5aaeef1d1e3a1b20a29c5eb
MD5 f53c211475877bfffeb2ceaae2a20455
BLAKE2b-256 382af5a15654795fe1010a7a51a14231c815840aa930b1a1f85dfd395dd83172

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for bids_validator_deno-2.4.0-py2.py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b6a7000b926323d25c6122ea4f92579eb7cd13790d5a2d90eb22fa069837a530
MD5 8fd0859203c276fff69b78a44be9cd9b
BLAKE2b-256 6cc0a73e362dfe68d6b7fb2507d4d513685a07f745bfc86624d2788f27f001cd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for bids_validator_deno-2.4.0-py2.py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b4fdf1267c1da17402d143d6b4f963cf54117dec1525e9f68437f6ace3518219
MD5 ad98e7d99448035da896d4c3e3f02126
BLAKE2b-256 c4c64ad8cdc2128d323c23933aa9d453b17bbd8a8632fad3c0fd2a5358749091

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for bids_validator_deno-2.4.0-py2.py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a35622e2b0f5772fe08ba309e3eac9a3ad47cc4aecc37c4a6e93aea2b72f2849
MD5 dbbc9c81965b41931a298651bf0afb8a
BLAKE2b-256 6aee88190e9bc2c747217601ad625462eebc22642cacd0b0864b966655efd71a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for bids_validator_deno-2.4.0-py2.py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b9018593f9f768c0912001fb724374eff1034128374512e0da08ff727920c604
MD5 bdf760e5a23214db5c53b11ecb06f97f
BLAKE2b-256 8c4b66f13d9875214815540c80e86048c34d9c2e14a8b1b9f35c0e0eaf37757a

See more details on using hashes here.

Provenance

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