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
[ENH] Raise error when negative or non-integer ROI values are passed to plot_surf_roi
#4131
Conversation
👋 @michellewang Thanks for creating a PR! Until this PR is ready for review, you can include the [WIP] tag in its title, or leave it as a github draft. Please make sure it is compliant with our contributing guidelines. In particular, be sure it checks the boxes listed below.
For new features:
For bug fixes:
We will review it as quick as possible, feel free to ping us with questions if needed. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4131 +/- ##
==========================================
- Coverage 91.90% 91.83% -0.07%
==========================================
Files 145 145
Lines 16330 16335 +5
Branches 3404 3406 +2
==========================================
- Hits 15008 15002 -6
- Misses 778 792 +14
+ Partials 544 541 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
LGTM so far, but we probably need to add a deprecation cycle. |
Ok I replaced the errors by deprecation warnings. Do we usually specify the future version of Nilearn where deprecated features will be removed? If so, which version would we want to name? |
Thx. I guess that removal will be in 0.13. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx @michellewang !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thx !
Changes proposed in this pull request:
ValueError
inplot_surf_roi
ifroi_map
has negative or non-integer valuesroi
array to integer, then comparing with the originalroi
array. Not sure if there's a better way to do thisValueError
is raised ifroi
is not one-dimensional (there wasn't a test for that)If we want a deprecation cycle (see #4104 (comment)) I can add that as well.