[ENH]: Simplify Preprocess interface #473

Merged
synchon merged 13 commits from refactor/preprocessor into main 2025-11-07 11:56:59 +00:00
synchon commented 2025-10-31 13:11:16 +00:00 (Migrated from github.com)
  • description of feature/fix
  • tests added/passed
  • add an entry for the latest changes

This PR refactors the Preprocess interface to simplify implementation logic.

* [x] description of feature/fix * [x] tests added/passed * [x] add an entry for the latest changes This PR refactors the `Preprocess` interface to simplify implementation logic.
codecov[bot] commented 2025-10-31 13:11:39 +00:00 (Migrated from github.com)

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.60%. Comparing base (0f459e2) to head (5b51d11).
⚠️ Report is 14 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #473      +/-   ##
==========================================
- Coverage   91.60%   91.60%   -0.01%     
==========================================
  Files         146      146              
  Lines        5956     5919      -37     
  Branches      951      950       -1     
==========================================
- Hits         5456     5422      -34     
+ Misses        324      321       -3     
  Partials      176      176              
Flag Coverage Δ
docs 100.00% <ø> (ø)

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

Files with missing lines Coverage Δ
junifer/preprocess/_temporal_filter.py 100.00% <ø> (ø)
junifer/preprocess/_temporal_slicer.py 98.24% <ø> (-0.17%) ⬇️
junifer/preprocess/base.py 90.00% <ø> (+2.24%) ⬆️
.../preprocess/confounds/fmriprep_confound_remover.py 99.45% <ø> (-0.02%) ⬇️
junifer/preprocess/smoothing/smoothing.py 89.28% <ø> (-1.63%) ⬇️
junifer/preprocess/warping/space_warper.py 100.00% <ø> (+3.57%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
## [Codecov](https://app.codecov.io/gh/juaml/junifer/pull/473?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) Report :white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 91.60%. Comparing base ([`0f459e2`](https://app.codecov.io/gh/juaml/junifer/commit/0f459e23f7ec29d0d8c3e7f7b3678302038272eb?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml)) to head ([`5b51d11`](https://app.codecov.io/gh/juaml/junifer/commit/5b51d11be617e030078218355b1f034abced4017?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml)). :warning: Report is 14 commits behind head on main. <details><summary>Additional details and impacted files</summary> [![Impacted file tree graph](https://app.codecov.io/gh/juaml/junifer/pull/473/graphs/tree.svg?width=650&height=150&src=pr&token=5H21JuZXMw&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml)](https://app.codecov.io/gh/juaml/junifer/pull/473?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) ```diff @@ Coverage Diff @@ ## main #473 +/- ## ========================================== - Coverage 91.60% 91.60% -0.01% ========================================== Files 146 146 Lines 5956 5919 -37 Branches 951 950 -1 ========================================== - Hits 5456 5422 -34 + Misses 324 321 -3 Partials 176 176 ``` | [Flag](https://app.codecov.io/gh/juaml/junifer/pull/473/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) | Coverage Δ | | |---|---|---| | [docs](https://app.codecov.io/gh/juaml/junifer/pull/473/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) | `100.00% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files with missing lines](https://app.codecov.io/gh/juaml/junifer/pull/473?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) | Coverage Δ | | |---|---|---| | [junifer/preprocess/\_temporal\_filter.py](https://app.codecov.io/gh/juaml/junifer/pull/473?src=pr&el=tree&filepath=junifer%2Fpreprocess%2F_temporal_filter.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci9wcmVwcm9jZXNzL190ZW1wb3JhbF9maWx0ZXIucHk=) | `100.00% <ø> (ø)` | | | [junifer/preprocess/\_temporal\_slicer.py](https://app.codecov.io/gh/juaml/junifer/pull/473?src=pr&el=tree&filepath=junifer%2Fpreprocess%2F_temporal_slicer.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci9wcmVwcm9jZXNzL190ZW1wb3JhbF9zbGljZXIucHk=) | `98.24% <ø> (-0.17%)` | :arrow_down: | | [junifer/preprocess/base.py](https://app.codecov.io/gh/juaml/junifer/pull/473?src=pr&el=tree&filepath=junifer%2Fpreprocess%2Fbase.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci9wcmVwcm9jZXNzL2Jhc2UucHk=) | `90.00% <ø> (+2.24%)` | :arrow_up: | | [.../preprocess/confounds/fmriprep\_confound\_remover.py](https://app.codecov.io/gh/juaml/junifer/pull/473?src=pr&el=tree&filepath=junifer%2Fpreprocess%2Fconfounds%2Ffmriprep_confound_remover.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci9wcmVwcm9jZXNzL2NvbmZvdW5kcy9mbXJpcHJlcF9jb25mb3VuZF9yZW1vdmVyLnB5) | `99.45% <ø> (-0.02%)` | :arrow_down: | | [junifer/preprocess/smoothing/smoothing.py](https://app.codecov.io/gh/juaml/junifer/pull/473?src=pr&el=tree&filepath=junifer%2Fpreprocess%2Fsmoothing%2Fsmoothing.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci9wcmVwcm9jZXNzL3Ntb290aGluZy9zbW9vdGhpbmcucHk=) | `89.28% <ø> (-1.63%)` | :arrow_down: | | [junifer/preprocess/warping/space\_warper.py](https://app.codecov.io/gh/juaml/junifer/pull/473?src=pr&el=tree&filepath=junifer%2Fpreprocess%2Fwarping%2Fspace_warper.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci9wcmVwcm9jZXNzL3dhcnBpbmcvc3BhY2Vfd2FycGVyLnB5) | `100.00% <ø> (+3.57%)` | :arrow_up: | </details> <details><summary> :rocket: New features to boost your workflow: </summary> - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems. </details>
github-actions[bot] commented 2025-10-31 14:03:23 +00:00 (Migrated from github.com)
PR Preview Action v1.6.2
Preview removed because the pull request was closed.
2025-11-07 12:48 UTC
[PR Preview Action](https://github.com/rossjrw/pr-preview-action) v1.6.2 :---: Preview removed because the pull request was closed. 2025-11-07 12:48 UTC <!-- Sticky Pull Request Commentpr-preview -->
synchon commented 2025-10-31 14:20:50 +00:00 (Migrated from github.com)

CI passes on juseless.

CI passes on juseless.
fraimondo (Migrated from github.com) approved these changes 2025-11-06 12:48:54 +00:00
fraimondo (Migrated from github.com) commented 2025-11-06 12:48:23 +00:00

There was a reason why the preprocess had the extra_input updated too. Though I can't remember why. You think this was wrongly coded from the beginning?

There was a reason why the `preprocess` had the extra_input updated too. Though I can't remember why. You think this was wrongly coded from the beginning?
synchon (Migrated from github.com) reviewed 2025-11-06 15:57:59 +00:00
synchon (Migrated from github.com) commented 2025-11-06 15:57:59 +00:00

I had added the extra output to be able to add "extra types" to the data object, like confounds when it used be to named like "BOLD_confounds". After we introduced "nested types", it doesn't serve any purpose as one can just add it to the data type directly, for example, adding confounds to BOLD would be now "BOLD.confounds".

I had added the extra output to be able to add "extra types" to the data object, like confounds when it used be to named like "BOLD_confounds". After we introduced "nested types", it doesn't serve any purpose as one can just add it to the data type directly, for example, adding confounds to BOLD would be now "BOLD.confounds".
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
juaml/junifer!473
No description provided.