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

INSTALL: Make GUI dependencies installed by default? #976

Closed
asoplata opened this issue Jan 23, 2025 · 3 comments
Closed

INSTALL: Make GUI dependencies installed by default? #976

asoplata opened this issue Jan 23, 2025 · 3 comments
Labels
docs Documentation and tutorials hnn-gui HNN GUI installation

Comments

@asoplata
Copy link
Collaborator

Just had an idea while I was rewriting our Install documentation: since the GUI is intended for new users, including those who may have little experience with Python, why not include its dependencies by default? This way, people doing a first-time install don't have to worry about the "quotes" issue (i.e. pip install hnn_core[gui] not working on Mac zsh) or installing any "additional" dependencies. A new user would only have to pip install hnn_core, and then every user would have the ability to run hnn-gui from the command-line.

I can't think of any good reasons why not to do this, can anyone else?

If you're worried about data size, then worry not, since the difference in PyPI data-sizeable packages downladed for the GUI case vs the default case doesn't come out to a difference of much:
- [approximate total: ~24.2MB]
- voila: 4.5MB
- debugpy: 2.5MB
- ipython: 0.8MB
- pyzmq: 1.3MB
- tornado: 0.4MB
- widgetsnbextension: 2.3MB
- babel: 9.6MB
- jedi: 1.6MB
- pygments: 1.2MB
- a bunch of other packages which have approximately negligible data size

This also doesn't affect our unit test runners, since those already have to install all optional dependencies for our tests.

@asoplata asoplata added docs Documentation and tutorials hnn-gui HNN GUI installation labels Jan 23, 2025
@asoplata
Copy link
Collaborator Author

@ntolley brought up that the GUI dependencies have some stability issues, which is a good counterpoint. Even if we version-restricted those dependencies, we'd have to pay attention and update them as needed, like per-release. And in general, we don't like version constraints.

@jasmainak
Copy link
Collaborator

@asoplata you loose users exponentially with each new dependency ... this was drilled into me very early on. This was particularly true 10 years ago when the python ecosystem was still stabilizing. With time, folks have become more liberal adding dependencies but I still think the core package should be so easy to install that you can give someone a demo on any computer (Mac/Windows/Linux) in a matter of minutes. That's one of the reasons that MPI and nlopt were removed as core dependencies when I started developing hnn-core.

When adding a new core dependency, you should consider:

  • is the package well-maintained and likely to continue be maintained in the future?
  • does the dependency itself have installation issues? e.g., too many dependencies?
  • is the package critical to the core functionality of the package? An optional dependency would be more appropriate if it's needed for only a couple of functions

Now, in the case of hnn-gui specifically I would say that ipywidgets underwent a huge overhaul recently which broke the voila and ipywidgets combo ... it's supported by the Jupyter team, so I do think it will continue to be maintained. But we should perhaps wait and watch for a bit.

@asoplata
Copy link
Collaborator Author

All good points. I'd never realized the relationship between the package ecosystem's health and your own personal project dependencies.

Re: stability, yes, both you and Nick have convinced me that this issue isn't a good idea at this time. E.g., both ipympl and voila are pre-1.0, and the ipywidgets breaking change is reason enough for not making our GUI the default. Y'all's feedback is exactly why I asked this issue! Thanks, closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation and tutorials hnn-gui HNN GUI installation
Projects
None yet
Development

No branches or pull requests

2 participants