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] make __all__
and API doc more consistent
#4157
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. |
@@ -2,7 +2,6 @@ | |||
check_design_matrix, | |||
make_first_level_design_matrix, | |||
) | |||
from nilearn.glm.first_level.experimental_paradigm import check_events |
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.
check_events not in API doc
nilearn/image/__init__.py
Outdated
# TODO move copy_img out of nilearn._utils..niimg | ||
from .._utils.niimg import copy_img | ||
|
||
# TODO move concat_niimgs out of nilearn._utils.niimg_conversions | ||
from .._utils.niimg_conversions import concat_niimgs as concat_imgs |
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.
Tempted to say that things that are part of the user facing API should NOT be in a part of the package that is private.
@@ -1,6 +1,5 @@ | |||
"""The :mod:`nilearn.maskers` contains masker objects.""" | |||
|
|||
from ._utils import compute_middle_image |
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.
compute_middle_image not in the API doc
nilearn/reporting/__init__.py
Outdated
# TODO consider making _get_clusters_table module public? | ||
from nilearn.reporting._get_clusters_table import get_clusters_table |
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.
User facing function comes from a private module
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4157 +/- ##
==========================================
+ Coverage 91.71% 91.92% +0.20%
==========================================
Files 145 145
Lines 16337 16337
Branches 3407 3407
==========================================
+ Hits 14983 15017 +34
+ Misses 810 777 -33
+ Partials 544 543 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
] | ||
|
||
|
||
class _MaskWarning(UserWarning): |
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.
Warning not used outside of this module
"first_level", | ||
"second_level", |
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.
note that those were duplicated.
__all__
and API doc more consistent
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.
I think you just need to adjust the number in test_number_public_classes
thanks!!! 🤗 should be fixed now |
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
Modules should explicitly declare the names in their public API using the
__all__
attribute but that we have some things in the__all__
that is not in the API doc.This PR fixes some issues:
__all__
alphabetically to make this comparison easier in the future