Skip to main content

Module version

Module version 

Source
Expand description

BIDS specification version tracking and compatibility checking.

This module provides the infrastructure for pinning bids-rs to a specific BIDS specification version, detecting version mismatches, and planning migration paths when the spec evolves.

§Design

The BIDS specification is versioned using SemVer. Each release of bids-rs targets a specific spec version, declared in SUPPORTED_BIDS_VERSION. When loading a dataset whose dataset_description.json declares a different BIDSVersion, the library can warn or error depending on the compatibility policy.

§How spec updates flow through the codebase

All spec-derived knowledge is concentrated in two places:

  1. bids-schema — Entity definitions, valid datatypes/suffixes/extensions, and filename validation patterns. When the BIDS spec adds a new entity or datatype, only this crate needs updating.

  2. bids-core/src/configs/bids.json and derivatives.json config files containing entity regex patterns and path-building templates. These are include_str!’d at compile time.

All other crates pull their spec knowledge from these two sources rather than hardcoding it.

Structs§

BidsVersion
A parsed BIDS specification version (SemVer).
SpecChange
Structured record of what changed between two BIDS spec versions.

Enums§

Compatibility
Result of checking a dataset’s BIDS version against the library’s supported version.

Constants§

CHANGELOG
Registry of known spec changes.
MIN_COMPATIBLE_VERSION
The minimum BIDS version that this release can read without data loss.
SUPPORTED_BIDS_VERSION
The BIDS specification version that this release of bids-rs targets.

Functions§

changes_between
Get all spec changes between two versions (exclusive of from, inclusive of to).
datatypes_added_since
Get all datatypes that were added after a given version.
entities_added_since
Get all entities that were added after a given version.