-
Notifications
You must be signed in to change notification settings - Fork 10
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
Unnecessary dependencies? #16
Comments
By the way, a difference in size between those two virtual environments in 180 MB vs 260 MB. |
I guess you are not using the codelinks directive, or if you are, you aren't generating notebooks from it? |
I don't. Honestly, I don't understand that feature so I cannot test it. Do you think that code links are used broadly so it does not make sense to convert them to an optional feature? |
It's always a judgement call - you have to weigh how confusing or unpleasant it would be to get an error for a missing dependency in ordinary use, against the difficulty or inconvenience of installing the dependencies in ordinary use. I think of Nb2plots as being something of a heavy-duty tool, that would mainly be used by developers doing documentation builds, so I was prepared to go a little bit further towards depending on things by default. |
I completely understand your reasoning and point of view. On the other hand, in the modern approach going towards clouds and containers developers weight every MB of dependencies. Moreover, an error message you get might be nice and actionable like the one we have in micropipenv when you try to use it without toml package installed: Feel free to close this issue or discuss it with users of nb2plots. |
I do understand - and this is the minimal approach I have taken for my brain imaging package - because I knew it might be installed in minimal environments. But I think this is less true of a documentation builder - and the errors for importing a missing optional module in this case will be more obscure, because they appear inside a Sphinx build log - so my temptation is to leave it as it is, but leave this issue open, in case anyone feels like commenting more. |
From a different point of view, does the codelinks directive need |
Oops - sorry - forgot about this one - I don't suppose you had time to check whether |
While I am working on an unrelated problem with dependencies between ipython RPM packages in Fedora, I've found out that nb2plots' list of dependencies might be unnecessary long.
Let me explain.
nb2plots
has in therequirements.txt
file that it requiresipython[notebook]
. But to me, it seems that it can work well without notebook and even without ipython.I have two virtual environments with Python 3.8. The first one without
ipython[notebook]
and second one with it. The numbers of packages are 48 vs. 67 packages.nb2plots
command works well in both and returns the same result for the same ipynb file.Here is a diff of lists of packages installed in the two mentioned virtual environments from which it seems that
ipython[notebook]
brings a lot of packagesnb2plots
can live without:Is there any feature I am missing which cannot work without
ipython[notebook]
? And if so, would it be possible to make optional/extras?If there is nothing like that, it might be possible to remove ipython from requirements.txt and add nbconvert, nbformat and traitlets there (all of which nb2plots imports in ipython_shim.py file).
The text was updated successfully, but these errors were encountered: