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
[MAINT] move user facing functions out of private modules #4166
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 ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4166 +/- ##
==========================================
+ Coverage 92.00% 92.02% +0.01%
==========================================
Files 145 144 -1
Lines 16378 16374 -4
Branches 3431 3427 -4
==========================================
- Hits 15069 15068 -1
+ Misses 768 766 -2
+ Partials 541 540 -1 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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, aside codecov complaints
will add a test for the deprecation warning to help the coverage |
nilearn/doc/changes/latest.rst Lines 48 to 50 in 8b0657b
Technically users should not be importing from those private modules and there is a warning if they do but I think it can be nice to mention it in the changelog
|
Yes, put it in the changelog. |
nilearn/_utils/tests/test_niimg.py
Outdated
def test_copy_warning(img_3d_zeros_eye): | ||
with pytest.warns( | ||
DeprecationWarning, | ||
match="Import this function from 'nilearn.image.copy_img'", | ||
): | ||
niimg.copy_img(img_3d_zeros_eye) |
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 you just forgot to remove this test
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.
If I had to pay for every extra ci workflows that has to run because of my absent mindedness... I'd be coding from under a bridge most of the time...
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, aside the test to be removed. Thx !
Changes proposed in this pull request: