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: Select function in segmentation resampling workflow #450

Merged
merged 5 commits into from
Aug 21, 2024

Conversation

mgxd
Copy link
Collaborator

@mgxd mgxd commented Aug 20, 2024

The segmentation selection code was a bit convoluted, this addresses the following:

  • Adding a mapping for common replacements
  • Avoiding string iteration
  • Stopping iteration over files upon the first match
  • Raising FileNotFoundError, rather than an unclear IndexError, if no matches are found.

Copy link

codecov bot commented Aug 20, 2024

Codecov Report

Attention: Patch coverage is 93.75000% with 1 line in your changes missing coverage. Please review.

Project coverage is 66.71%. Comparing base (f368a28) to head (4738420).
Report is 6 commits behind head on master.

Files Patch % Lines
smriprep/workflows/surfaces.py 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #450      +/-   ##
==========================================
+ Coverage   66.36%   66.71%   +0.35%     
==========================================
  Files          31       31              
  Lines        2072     2076       +4     
  Branches      249      246       -3     
==========================================
+ Hits         1375     1385      +10     
+ Misses        696      690       -6     
  Partials        1        1              

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

@mgxd
Copy link
Collaborator Author

mgxd commented Aug 21, 2024

@effigies can we sneak this into a patch release, or will it require a new minor?

@effigies
Copy link
Member

I'm okay with a patch release. The workflow cache invalidation is straightforward here.

@mgxd mgxd merged commit 60f26d2 into master Aug 21, 2024
17 checks passed
@mgxd mgxd deleted the fix/aparc-select branch August 21, 2024 14:30
mgxd added a commit that referenced this pull request Aug 26, 2024
0.16.1 (August 26, 2024)

A bug-fix release that reworks selection within the
FreeSurfer to native segmentation resampling workflow.

* FIX: Select function in segmentation resampling workflow (#450)
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.

2 participants