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] rename contrast_type
to stat_type
#4191
Conversation
👋 @Remi-Gau 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 ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #4191 +/- ##
=======================================
Coverage 92.10% 92.11%
=======================================
Files 144 144
Lines 16358 16366 +8
Branches 3423 3426 +3
=======================================
+ Hits 15067 15075 +8
Misses 752 752
Partials 539 539
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
We'll have to go through deprecation cycles for that one... |
@rename_parameters( | ||
replacement_params={"contrast_type": "stat_type"}, end_version="0.13.0" | ||
) |
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.
This decorator should take care of the deprecation cycle.
Will add a test to make sure of it.
@bthirion nilearn/nilearn/glm/contrasts.py Line 178 in cfc4c03
What do you think? |
Indeed, the idea is to have a uniform naming across classes and functions. |
contrast_type
to stat_type
@@ -986,6 +986,7 @@ def first_level_from_bids( | |||
sub_labels : :obj:`list` of :obj:`str`, optional | |||
Specifies the subset of subject labels to model. | |||
If 'None', will model all subjects in the dataset. | |||
|
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.
This is unrelated but came across a directive that did not render in the doc.
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 @Remi-Gau ! The changes LGTM
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:
contrast_type
bystat_type
in the functioncompute_contrast
, see https://github.com/nilearn/nilearn/blob/cfc4c03f/nilearn/glm/contrasts.py#L66contrast_type
bystat_type
the Contrast class