Skip to content
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

Clean lazy_loader from module namespace #15

Merged
merged 5 commits into from
Sep 21, 2024
Merged

Conversation

kushaangupta
Copy link
Collaborator

Closes #14

@kushaangupta
Copy link
Collaborator Author

I didn't realize the size calculation function was parsing all nested modules using a breadth first search, hence loading all the modules. Writing a test for memory is not practical apparently since we're dealing with pointers here.

@kushaangupta kushaangupta changed the title Add lazy loader unit test & clean namespace Clean lazy_loader from module namespace Sep 16, 2024
@ryanharvey1
Copy link
Owner

The memory test didn't work as expected, but could we add a test similar to what they did at mne-python?

https://github.com/mne-tools/mne-python/blob/main/mne/tests/test_import_nesting.py#L230

@kushaangupta
Copy link
Collaborator Author

That was helpful! I've added a meaningful test case for lazy loading.

@ryanharvey1 ryanharvey1 merged commit e11cbee into main Sep 21, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use underscore prefix for lazy loader import & add unit test to test out lazy loading
2 participants