Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Fetch templates during workflow construction #418

Merged
merged 7 commits into from
Mar 7, 2024

Conversation

mgxd
Copy link
Collaborator

@mgxd mgxd commented Mar 6, 2024

This addresses nipreps/fmriprep#3240, a few changes were necessary:

  • Fetch templates during workflow creation - without this, I was still observing race conditions causing the T1w/brain mask files to be empty (not yet gotten through templateflow.api.get())
  • Add sloppy parameter to init_template_iterator_wf, since the T1w/brain mask's resolution (used in SpatialNormalization) depends on this parameter as well.

I stripped out most of the logic in TemplateFlowSelect to avoid duplicating the behavior, since it is essentially linked.

@mgxd mgxd requested a review from effigies March 6, 2024 19:55
@mgxd mgxd mentioned this pull request Mar 6, 2024
Copy link

codecov bot commented Mar 6, 2024

Codecov Report

Attention: Patch coverage is 89.18919% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 78.59%. Comparing base (2355035) to head (9f13a86).
Report is 5 commits behind head on master.

Files Patch % Lines
smriprep/interfaces/templateflow.py 92.00% 2 Missing ⚠️
smriprep/workflows/outputs.py 81.81% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master     #418       +/-   ##
===========================================
+ Coverage   62.91%   78.59%   +15.67%     
===========================================
  Files          24       30        +6     
  Lines        1912     2088      +176     
  Branches      242      248        +6     
===========================================
+ Hits         1203     1641      +438     
+ Misses        676      415      -261     
+ Partials       33       32        -1     
Flag Coverage Δ
ds005 ∅ <ø> (?)
ds054 46.28% <67.56%> (?)
pytest 68.29% <89.18%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@mgxd mgxd marked this pull request as ready for review March 7, 2024 16:50
smriprep/workflows/outputs.py Outdated Show resolved Hide resolved
smriprep/workflows/outputs.py Outdated Show resolved Hide resolved
@mgxd mgxd merged commit cc52a47 into nipreps:master Mar 7, 2024
17 checks passed
@mgxd mgxd deleted the fix/sloppy-template-res branch March 7, 2024 20:33
mgxd added a commit to nipreps/fmriprep that referenced this pull request Mar 7, 2024
Ensures the proper resolution templates are fetched following
nipreps/smriprep#418
effigies added a commit that referenced this pull request Mar 20, 2024
0.14.0 (March 11, 2024)

New feature release in the 0.14.x series.

This release restores correct handling of cohort identifiers in templates.
A feature release is warranted due to changes in the workflow structure.

* FIX: Fetch templates during workflow construction (#418)
* FIX: Re-add cohort identifier to template name (#416)
* FIX: Repair FreeSurfer Dependency in Dockerfile (tcsh) (#404)
* FIX: Invert result of skull-strip check in auto mode (#402)
* STY: Adopt ruff for linting and formatting (#397)
* CHORE: Update ruff, ignore certain rules (#419)
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.

None yet

2 participants