Skip to content

[FIX] Entity order for derivatives data sink#1020

Open
bendhouseart wants to merge 7 commits into
nipreps:masterfrom
bendhouseart:1018-update-entity-order-for-DerivativesDataSink-object
Open

[FIX] Entity order for derivatives data sink#1020
bendhouseart wants to merge 7 commits into
nipreps:masterfrom
bendhouseart:1018-update-entity-order-for-DerivativesDataSink-object

Conversation

@bendhouseart

Copy link
Copy Markdown

Closes issue #1018, this is the easier path to fix this. Only updates the entities touched by petprep. Please feel free to request/push changes to update other file name templates.

@codecov

codecov Bot commented Jan 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.13%. Comparing base (9e18356) to head (436e22f).
⚠️ Report is 32 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1020      +/-   ##
==========================================
- Coverage   71.77%   67.13%   -4.65%     
==========================================
  Files          91       54      -37     
  Lines        8755     6849    -1906     
  Branches      936      852      -84     
==========================================
- Hits         6284     4598    -1686     
+ Misses       2238     2036     -202     
+ Partials      233      215      -18     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

"sub-{subject}[/ses-{session}]/{datatype<anat>|anat}/sub-{subject}[_ses-{session}][_hash-{hash}][_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_run-{run}][_space-{space}][_cohort-{cohort}][_res-{resolution}]_label-{label}[_desc-{desc}]_{suffix<probseg>|probseg}{extension<.nii|.nii.gz|.json>|.nii.gz}",
"sub-{subject}[/ses-{session}]/{datatype<anat>|anat}/sub-{subject}[_ses-{session}][_hash-{hash}][_desc-{desc}]_{suffix<dseg>}{extension<.tsv|.json>|.tsv}",
"sub-{subject}[/ses-{session}]/{datatype<anat>|anat}/sub-{subject}[_ses-{session}][_hash-{hash}][_label-{label}][_desc-{desc}]_{suffix<morph>}{extension<.tsv|.json>|.tsv}",
"sub-{subject}[/ses-{session}]/{datatype<anat>|anat}/sub-{subject}[_ses-{session}][_hash-{hash}][_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_run-{run}]_hemi-{hemi<L|R>}[_space-{space}][_cohort-{cohort}][_den-{density}]_desc-{desc}_{suffix<mask>|mask}{extension<.label.gii|.json>|.label.gii}",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this removal intended?

Comment thread niworkflows/data/nipreps.json
@oesteban oesteban changed the title 1018 update entity order for derivatives data sink object FIX: Entity order for derivatives data sink Feb 22, 2026
@bendhouseart bendhouseart changed the title FIX: Entity order for derivatives data sink [Draft][FIX] Entity order for derivatives data sink Feb 23, 2026
@bendhouseart
bendhouseart marked this pull request as draft February 23, 2026 14:16
@bendhouseart
bendhouseart marked this pull request as ready for review February 24, 2026 16:24
@bendhouseart bendhouseart changed the title [Draft][FIX] Entity order for derivatives data sink [FIX] Entity order for derivatives data sink Feb 24, 2026
@bendhouseart

Copy link
Copy Markdown
Author

Okay, it think it could use 1 more sort according to schema.rules.entities, but before I do that, where should hash go? Is has used for anything beyond differentiating outputs between multiple steps/runs @oesteban @mnoergaard?

If not then I think it would best belong before description, curious as to what your thoughts are.

Also, efforts are underway with pybids to help avoid ever having to do this manually again.

@effigies

effigies commented Mar 3, 2026

Copy link
Copy Markdown
Member

hash should stay where it is, after session. @mgxd added it to allow for use in a BIDS-adjacent database context, so we should not mess with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants