question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Reduce mandatory packages bloat

See original GitHub issue

I installed the package in a new machine and it installed the following seldom-used packages:

pymeeus, convertdate, korean-lunar-calendar

Any work to reduce (and/or standardize) the number of packaged installed would be helpful to combat package bloat. For example, I have no need for Korean holidays yet I find myself having to install a package that, by its name, is required only for those type of holidays.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:3
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
mborsetticommented, Jun 9, 2022

Hello @dr-prodigy!

I agree with @stianjensen: https://setuptools.pypa.io/en/latest/userguide/dependency_management.html#optional-dependencies is a great tool for this use case.

Specifically:

  1. We can target the dependencies that cause the most bloat and segregate them as optional dependencies to be installed as e.g. holidays[lunar] or holidays[islamic] or holidays[lunar,islamic] or whatever they turn out to be;
  2. A small amount of code would need to be added to handle import failures with an explanatory error (e.g. “Could not import korean-lunar-calendar; please install using pip install -U holidays[korea]” or whatever the case may be).
  3. No changes would be required for testing other than for this purpose we would install dependencies from a new requirements_test.txt file containing all dependencies, including optional ones;
  4. The documentation would need to be updated, and the name of optional dependencies added to the relevant countries.

I wish I had time to volunteer to work on this at the moment, but sadly I don’t.

4reactions
MRigalcommented, May 21, 2021

I would also welcome to have less package bloat. One option often considered by other packages ist to add optionals like holidays[lunar] or holidays[full] for convertdate and other advanced converters.

I also guess that many people won’t need the full set of possible conversions

Read more comments on GitHub >

github_iconTop Results From Across the Web

Put your npm package on a Strict Diet (reduce package bloat)
Put your npm package on a Strict Diet. Join the journey of reducing a bloated npm package size from ~230kb to ~16kB by...
Read more >
ReduceDebian - Debian Wiki
Reducing the size of the Debian Installation Footprint. Remove non-critical packages; Reconfigure apt so that it does not install additional ...
Read more >
10 Easy Steps To Reduce Bloating Fast
There are several reasons for a puffed-out, hard stomach. What is the fastest way to debloat? Let's learn how to reduce bloating to...
Read more >
Is It Safe to Eat Food in Swollen or Bloated Packaging?
Carothers says that bloating of meat or poultry packages can happen for various reasons—and not all of them pose a risk. She says,...
Read more >
Reduce dotfile bloat #10016 - JuliaLang/julia
There was a similar change in the default location for packages between 0.2 and 0.3. We can do B.1 but I'm not sure...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found