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
Implement lazy module importing for all public submodules #2816
Conversation
you'll need to add back all of the non-module exports too, like |
Gah, fix incoming. LOL |
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.
lovely! thanks
# to be imported early. | ||
# see: https://github.com/napari/napari/issues/925 | ||
# see: https://github.com/napari/napari/issues/1347 | ||
from scipy import stats # noqa: F401 |
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.
What is this about?
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.
Read the comments just above it. It's weird. 😂
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.
yeah, we honestly still don't know... the relationship with scipy.stats was first observed in #925 (comment)... tried to take it out in #1250, and then #1347 popped up again. would be thrilled if you had any insighty
Please keep an eye on the skimage PR; I may still improve that implementation, but it should then be as simple as copying the file here. |
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! Can merge after all tests pass, thanks all!!
Codecov Report
@@ Coverage Diff @@
## master #2816 +/- ##
==========================================
- Coverage 81.67% 81.67% -0.01%
==========================================
Files 493 494 +1
Lines 41280 41295 +15
==========================================
+ Hits 33717 33727 +10
- Misses 7563 7568 +5
Continue to review full report at Codecov.
|
Description
Fixes #2810
Many thanks to @stefanv and scikit-image/scikit-image#5101 for the precedent.