Replace nipreps.json with schema-driven config generation#1023
Draft
astewartau wants to merge 7 commits intonipreps:masterfrom
Draft
Replace nipreps.json with schema-driven config generation#1023astewartau wants to merge 7 commits intonipreps:masterfrom
astewartau wants to merge 7 commits intonipreps:masterfrom
Conversation
0c52365 to
f68145b
Compare
Entity definitions are now generated from the BIDS schema via pybids' generate_extended_config(). NiPreps-specific entities (hash, fmapid, pvc) and the figures datatype are layered on via ConfigExtension. Path patterns are defined inline as they all use NiPreps-specific entities and suffixes. The reports module now receives the generated config dict directly via add_config_paths(). nipreps.json is no longer needed and has been removed.
c15526f to
20c5456
Compare
Convert 28 monolithic pattern strings to compact rule dicts that specify only datatypes, suffixes, extensions, and entity deviations. Entity ordering and standard derivative entities are inherited from the BIDS schema. Figures patterns remain as literal strings due to their non-standard directory layout.
f8198cb to
df574cd
Compare
for more information, see https://pre-commit.ci
…ules Schema splits .json into sidecar patterns, but DerivativesDataSink outputs .nii + .json together as multi-file, requiring a single pattern with all extensions. Document this and other reasons for apparent redundancy.
…a_rules With sidecar_split=False, schema derivative patterns include all extensions in a single pattern, so extra_rules no longer need to duplicate schema-known suffixes for multi-file output. Remove 22 redundant suffixes from 3 rules: - anat: keep only MTw, TSE (removed 16 schema suffixes) - func: keep only boldref, boldmap (removed 4 schema suffixes) - dwi: keep only dwiref, epiref, lowb (removed 2 schema suffixes)
- Extract _SURFACE_SUFFIXES, _SCALAR_SUFFIXES, _CIFTI_EXTENSIONS constants - Merge xfm rules for anat/func/dwi into one multi-datatype rule - Merge fmap fieldmap + mask into one rule - Rename _PET_EXTRA_ENTITIES -> _PET_ENTITIES, _PERF_EXTRA_ENTITIES -> _PERF_ENTITIES - Reorganize rules by category (transforms, surfaces, CIFTI, then per-datatype) 28 rules -> 25 rules, -95 lines net.
for more information, see https://pre-commit.ci
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
nipreps.jsonconfig with schema-driven config generation from pybidsrule_groups=["deriv"]) with NiPreps-specifichashentity injectionextra_rulesdicts that declare only datatypes, suffixes, extensions, and entity deviations—entity ordering and standard entities are inherited from the schemadescription→desc,hemisphere→hemi, etc.)Depends on bids-standard/pybids#1215
Test plan