Skip to content

v3.0 — BIDS nomenclature alignment & parser hardening

Latest

Choose a tag to compare

@gdevenyi gdevenyi released this 11 Jun 17:15
44fa25f

Aligns the library with official BIDS nomenclature (#21), resyncs the entity/suffix/datatype lists from schema.json, and hardens the filename parser.

⚠️ Breaking changes

  • data_type column renamed to datatype (BIDS uses one word). Update any scripts that filter on or access data_type.
  • Custom-entity config fields renamed in custom/*.json: namekey (short filename token), display_namename (column header). pattern unchanged.

Added

  • 4 entities now recognized: template (tpl), cohort, atlas, scale (31 → 35), in canonical BIDS order.
  • Datatype emg — previously emg files parsed as datatype=NA.
  • Suffixes description, emg, physioevents.
  • generate_entity_patterns.sh now regenerates every schema-derived block (entity patterns, key/name order, suffixes, extensions, datatype regex) from schema.json — single source of truth.

Fixed

  • Datatype substring false-match: a path like study_func_proj/sub-01/anat/… was reported as datatype=func instead of anat. Detection is now anchored to the file's parent directory as a whole path component.
  • Derivatives false-match: a directory such as myderivatives/ was treated as a derivatives dataset; extraction is now anchored to (^|/)derivatives/.
  • SIGPIPE fallback: grep … | head -1 || echo "NA" could silently yield NA under set -o pipefail. Replaced with subshell-free, pipe-free bash regex.

Docs / nomenclature

  • Code and docs now use the correct BIDS distinction: entity key (sub, schema .name) vs entity name (subject, the column header) vs display name (Subject). Dropped the "display name" misnomer for column headers.
  • Fixed docstring examples that passed entity keys ("sub,ses") which silently fail the column matcher.

Tests

  • Regression coverage for the substring false-match, emg detection, missing-datatype NA, derivatives extraction, and the myderivatives non-match. Suite: 9/9.

Merged via #27, #28, #29. Resolves #21.