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:
-
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. -
bids-core/src/configs/—bids.jsonandderivatives.jsonconfig files containing entity regex patterns and path-building templates. These areinclude_str!’d at compile time.
All other crates pull their spec knowledge from these two sources rather than hardcoding it.
Structs§
- Bids
Version - A parsed BIDS specification version (SemVer).
- Spec
Change - 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-rstargets.
Functions§
- changes_
between - Get all spec changes between two versions (exclusive of
from, inclusive ofto). - 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.