Skip to content

Merge cohort entity into space entity in derivatives#524

Merged
mgxd merged 7 commits intonipreps:masterfrom
tsalo:rm-cohort-entity
Feb 19, 2026
Merged

Merge cohort entity into space entity in derivatives#524
mgxd merged 7 commits intonipreps:masterfrom
tsalo:rm-cohort-entity

Conversation

@tsalo
Copy link
Contributor

@tsalo tsalo commented Feb 16, 2026

Closes #501.

Changes proposed:

  • Combine space and cohort entities in the form space-<space>+<cohort> in derivatives. This matches how transforms are written out, and shouldn't impact potential derivatives with the template entity (which can have the cohort entity in the filename).

@codecov
Copy link

codecov bot commented Feb 16, 2026

Codecov Report

❌ Patch coverage is 10.00000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.14%. Comparing base (23c6af6) to head (9996fd4).
⚠️ Report is 10 commits behind head on master.

Files with missing lines Patch % Lines
nibabies/utils/bids.py 12.50% 7 Missing ⚠️
nibabies/workflows/anatomical/outputs.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #524      +/-   ##
==========================================
- Coverage   57.21%   57.14%   -0.07%     
==========================================
  Files          72       72              
  Lines        6977     6987      +10     
  Branches      860      863       +3     
==========================================
+ Hits         3992     3993       +1     
- Misses       2763     2772       +9     
  Partials      222      222              

☔ 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.

Copy link
Collaborator

@mgxd mgxd left a comment

Choose a reason for hiding this comment

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

we should bump the pyproject.toml to build off smriprep master, I feel like a lot of this was covered in your smriprep PR.

btw, error was buried in CI (and not being detected..)

260216-19:15:51,604 nipype.workflow ERROR:
         Node combine_space.a0 failed to run on host f2d3c5784311.
260216-19:15:51,604 nipype.workflow ERROR:
         Saving crash info to /out/sub-01/ses-1mo/log/20260216-191536_2073aff4-1f47-44ef-b8e6-dcb171c8ba2c/crash-20260216-191551-UID1001-combine_space.a0-a91c9796-7a77-4a05-8709-35716e403122.txt
Traceback (most recent call last):
  File "/opt/conda/envs/nibabies/lib/python3.12/site-packages/nipype/pipeline/plugins/multiproc.py", line 389, in _send_procs_to_workers
    self.procs[jobid].run(updatehash=updatehash)
  File "/opt/conda/envs/nibabies/lib/python3.12/site-packages/nipype/pipeline/engine/nodes.py", line 525, in run
    result = self._run_interface(execute=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/nibabies/lib/python3.12/site-packages/nipype/pipeline/engine/nodes.py", line 643, in _run_interface
    return self._run_command(execute)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/nibabies/lib/python3.12/site-packages/nipype/pipeline/engine/nodes.py", line 733, in _run_command
    result.outputs = clean_working_directory(
                     ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/nibabies/lib/python3.12/site-packages/nipype/pipeline/engine/utils.py", line 1445, in clean_working_directory
    output_files.extend(walk_outputs(outputdict[output]))
                                     ~~~~~~~~~~^^^^^^^^
KeyError: 'space'

Copy link
Collaborator

@mgxd mgxd left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@mgxd mgxd merged commit 55cdb10 into nipreps:master Feb 19, 2026
18 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove cohort entity from derivatives and use combined version

2 participants