Skip to content

Conversation

@mgxd
Copy link
Contributor

@mgxd mgxd commented May 1, 2025

This PR lays some of the groundwork for fMRIPrep extensions.

splice_workflow splices a constructed workflow, allowing developers to swap in alternative processing workflows. This works by finding all tagged Node/Workflow in a graph, and substituting the matching replacements workflow. This will require some work in the NiPreps to encapsulate each processing step, likely with a heavy dosing of buffernodes for input and output fields.

Additionally, the @tag decorator can be used on any init_...wf() factory to facilitate adding the _tag attribute.

@mgxd mgxd requested review from effigies and oesteban May 1, 2025 18:57
@codecov
Copy link

codecov bot commented May 1, 2025

Codecov Report

Attention: Patch coverage is 91.48936% with 12 lines in your changes missing coverage. Please review.

Project coverage is 71.45%. Comparing base (d2fda2a) to head (336f998).
Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
niworkflows/engine/splicer.py 90.27% 4 Missing and 3 partials ⚠️
niworkflows/engine/tests/test_splicer.py 92.64% 3 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #938      +/-   ##
==========================================
+ Coverage   71.12%   71.45%   +0.33%     
==========================================
  Files          87       89       +2     
  Lines        8477     8618     +141     
  Branches     1057     1072      +15     
==========================================
+ Hits         6029     6158     +129     
- Misses       2220     2227       +7     
- Partials      228      233       +5     

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

@oesteban oesteban left a comment

Choose a reason for hiding this comment

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

Trying to wrap my head around this. I left a couple of comments.

@mgxd mgxd marked this pull request as ready for review May 1, 2025 20:13
@effigies effigies merged commit c55c945 into nipreps:master May 2, 2025
22 checks passed
effigies added a commit that referenced this pull request May 8, 2025
1.13.1 (May 02, 2025)

Patch release in the 1.13.x series.

This release adds the ``niworkflows.engine.splicer`` module, to facilitate sugery on wworkflows.

* FIX: Allow passing arguments through tag decorator (#939)
* ENH: Workflow splicer module (#938)
* MNT: Bump astral-sh/setup-uv from 5 to 6 (#937)
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.

3 participants