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.1.1.tar.gz (73.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.1.1-py2.py3-none-win_amd64.whl (43.8 MB view details)

Uploaded Python 2Python 3Windows x86-64

bids_validator_deno-2.1.1-py2.py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (44.4 MB view details)

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

bids_validator_deno-2.1.1-py2.py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (43.3 MB view details)

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

bids_validator_deno-2.1.1-py2.py3-none-macosx_11_0_arm64.whl (41.7 MB view details)

Uploaded Python 2Python 3macOS 11.0+ ARM64

bids_validator_deno-2.1.1-py2.py3-none-macosx_10_12_x86_64.whl (42.4 MB view details)

Uploaded Python 2Python 3macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: bids_validator_deno-2.1.1.tar.gz
  • Upload date:
  • Size: 73.3 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.1.1.tar.gz
Algorithm Hash digest
SHA256 1add452625548607d357c018a5ac1365809dcabf612624e71f5bdbb3d2ec081c
MD5 fffd97e5e34e3ad5f78e2ba5f5fec9f0
BLAKE2b-256 7aae2045dacd02307997b612d7dd0c61092c2b6875d72cad3873d7af26dd7f3a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for bids_validator_deno-2.1.1-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 b163ed4976ece0cf21f94f6293281687633110e8bd2e8966064f2f0e2ed88302
MD5 70b8f3f434d75a443dc109777c047d81
BLAKE2b-256 3bb40f9b960ef336426df7f2db4920a99d10c6f57a29001696a93854aa3da0bf

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for bids_validator_deno-2.1.1-py2.py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 538914e927fe38c6cd80458acf31a5a4e3ff52020b5b2dfdea42d3bc49aac5e7
MD5 125523648acaa89f190e8c21f6cbe100
BLAKE2b-256 a8cf92cd8c6507068745c55afa0cad60a6ac85d1bd0a17dec41b93f1eab55a5b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for bids_validator_deno-2.1.1-py2.py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 06a06a27b07a237bcb4eecd09bf656fd8eafb61c77d0f4ae311807db0ac6dba5
MD5 8357c9e0e2a54e8e7794cacb9dc685c4
BLAKE2b-256 15447c8ad5a37d77db13985508aa04d4ee006df4adde8414921760ecd4b642c5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for bids_validator_deno-2.1.1-py2.py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6082c69cdf4382df0ca82be7591d22444e65b2e2a72d06fb7d87a6e131d6e920
MD5 84bec99625cb48adc712f7dc3882171e
BLAKE2b-256 184dd98fc4e6c3ed73de84f7af84c695d676e086678f9e4ec3e2fc66c54b0d78

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for bids_validator_deno-2.1.1-py2.py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ac27e7070229fb45a80ff04b61de0a37551da751ab3d893a45cbd672daed220e
MD5 d85b1e1de7875624c99ec0cf3b7b3359
BLAKE2b-256 30080ca16cac7c2ad7ed8846691ab4ee4997a1d936d5c29509f3cec71f36a778

See more details on using hashes here.

Provenance

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