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

Register mne-python with scientific-python for lazy_loader adoption #12388

Open
bjlittle opened this issue Jan 25, 2024 · 11 comments
Open

Register mne-python with scientific-python for lazy_loader adoption #12388

bjlittle opened this issue Jan 25, 2024 · 11 comments
Labels

Comments

@bjlittle
Copy link

bjlittle commented Jan 25, 2024

Proposed documentation enhancement

@larsoner et al

Just thought I'd suggest that you guys add yourselves to scientific-python/lazy-loader#50, since you're leveraging the awesome benefits of the lazy_loader package 👍

@bjlittle bjlittle added the DOC label Jan 25, 2024
Copy link

welcome bot commented Jan 25, 2024

Hello! 👋 Thanks for opening your first issue here! ❤️ We will try to get back to you soon. 🚴

@drammock
Copy link
Member

Just thought I'd suggest that you guys add yourselves to scientific-python/lazy_loader#50

Sure, feel free to add us there if it's helpful to the lazy loader devs to do so. IIRC we're already listed on the relevant SPEC website as an adopter.

@cbrnr
Copy link
Contributor

cbrnr commented Jan 25, 2024

To be honest, I'm really not convinced that the benefits of this package outweigh its issues. The adoption has been controversial, and I specifically don't like to further encourage other projects to adopt it without any specific reason.

@hoechenberger
Copy link
Member

I'm not sure why this would capture anyone's interest 😅 Since MNE-Python isn't listed as a core project, I'm puzzled about the significance of understanding whether it employs lazy-loading or not, except perhaps for the users of MNE-Python itself.

Not veto-ing an addition to the list; I just don't think it serves any useful purpose.

@drammock
Copy link
Member

@hoechenberger and @cbrnr did you look at the issue that @bjlittle linked to? Its purpose is for lazy loader devs to know who to check with if they are considering API changes. I doubt it will have the effect of encouraging others to adopt it

@bjlittle
Copy link
Author

Thanks guys. It's genuinely interesting to hear the back story here to lazy_loader and your experiences.

If you don't mind, can you summarise the controversy on mne-python surrounding adoption? Even, your general personal objections, or not, would be super useful to know.

Many thanks 👍

@drammock
Copy link
Member

@bjlittle we started with #11838 (but did it a dumb way, without .pyi files). This caused problems with IDE completion hints etc, as discussed in #12059 (that's where all the opinions are aired). The IDE problem was fixed by #12072.

@hoechenberger
Copy link
Member

@drammock Indeed I misunderstood the purpose of this issue – I thought it's to gather a list of projects to be publicized on the website! My bad.

@cbrnr
Copy link
Contributor

cbrnr commented Feb 17, 2025

I just found another problem with lazy loading, which prevents me from creating a standalone installer: https://groups.google.com/g/pyinstaller/c/hzY32N5lZGA (see also cbrnr/mnelab#294)

@larsoner
Copy link
Member

I can't log in to respond there, but is the .pyi file in the right place (/Users/clemens/Desktop/test-pyinstaller-pyi/dist/mwe/_internal/mne/__init__.pyi)? Looks like a file-not-found-error and you maybe need to tell pyinstaller somehow to include the stub

@cbrnr
Copy link
Contributor

cbrnr commented Feb 19, 2025

Yes, there is no such file. In fact, the entire mne directory is missing. It turns out that the --collect-all mne argument fixes this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants