Thinning the dependencies
kaanaksit opened this issue · 5 comments
I want to drop dependencies as much as possible. The current list of dependencies can be found in here. This issue will track the progress towards dropping dependencies.
To remove scipy
from requirements.txt
:
https://github.com/kunguz/odak/blob/d3ac9c90a4769b537729a38e061ae2c666ee4f6f/requirements.txt#L6
All needed is to replace this line:
https://github.com/kunguz/odak/blob/e8de761740c73093789e7f721b282fdcd0940703/odak/tools/file.py#L13
We should also drop requirements.txt
and specify loose requirements like torch
in install_requires
. See
https://packaging.python.org/discussions/install-requires-vs-requirements/
tl;dr: applications should pin packages explicitly in requirements.txt
, libraries should specify loose requirements in setup.py/install_requires
.
In the current setup.py
, install_requires
is deeply connected to requirements.txt
:
https://github.com/kunguz/odak/blob/c626d4024a314780a62cb71218e534d2a3ce7519/setup.py#L7-L12
At the bare minimum, torch
and numpy
are everything odak
needs truly. These two dependencies can be the most abstract ones. My fear in keeping an abstract install_requires
lies in the fact that a user may want to use these other definitions that rely on the missing dependencies and can easily conclude things not working. Given that the user base of odak
is/will be a diverse set of people, they may not have the experience to judge and conclude, Oh, this is a missing dependency issue, let me pip super quick.
8f24ef2
Removes scipy
from dependencies. In the next release, 0.2.0
, pip version won't be needing scipy
.
36c49d1
Removes finufft
from dependencies. In the next release, 0.2.0
, pip version won't be needing finufft
.
add3bab
Removes plotly
and kaleido
from dependencies. In the next release, 0.2.0
, pip version won't be needing plotly
and kaleido
.
efd9286
Removes dispy
from dependencies. In the next release, 0.2.0
, pip version won't be needing dispy
.
Latest state of the requirements.txt
:
https://github.com/kunguz/odak/blob/efd9286a2cbdc8762f0ff7d67f94d52463b8c2b3/requirements.txt#L1-L5