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

Move Dependencies for Jupyter Notebook support to **Optional Dependencies** #459

Open
adamency opened this issue Jul 16, 2024 · 0 comments

Comments

@adamency
Copy link

adamency commented Jul 16, 2024

@alan-barzilay @mateuslatrova @Fernando-crz

Dependencies for jupyter notebook support are by definition optional dependencies and should not be listed in required dependencies, but in optional dependencies as officially recommended by PyPA and described here.

Please consider removing nbconvert and ipython from the required dependencies and moving them to optional dependencies.

It makes absolutely no sense to:

  • install an entire python interactive suite for simple static code analysis
  • Add 45 packages, bringing from only 7 to 52 total dependencies, i.e. multiply the number of dependencies by 7, and also multiply the total package size by 16 (from 2.15Mib to 32Mib) for a single feature that is not even the default behavior but accessible via an option that needs to be explicitly specified, and used by a minority of users.
  • Tell users to install your package with --no-deps and then install manually the actual required dependencies by hand, in order to get what should be the default install process.
  • Make these users receive pip error messages because it then believes that the package has not been installed correctly as the environment is missing falsely "required" dependencies for pipreqs

Please simply use a optional dependencies block as is intended, recommended, the best practice used by all major python projects, and frankly the only logical solution to this dependency management, and all these issues will be resolved with 5 lines of code.

PS: For reference ->

with jupyter support

TOTAL                               50.32 MiB
=============================================
pip 24.0                            13.17 MiB
pygments 2.18.0                     7.78 MiB
ipython 8.12.3                      5.20 MiB
jedi 0.19.1                         5.08 MiB
setuptools 70.3.0                   4.87 MiB
tornado 6.4.1                       3.60 MiB
bleach 6.1.0                        1.27 MiB
jinja2 3.1.4                        1.10 MiB

29 libs smaller than 1.0 MB         8.24 MiB

without jupyter support

TOTAL                    20.20 MiB
==================================
pip 24.0                 13.17 MiB
setuptools 70.3.0        4.87 MiB

7 libs smaller than 1.0 MB 2.15 MiB

(need to remove pip and setuptools from the total)

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

No branches or pull requests

1 participant