We need to make some dependency optional, to minimize the dependencies on a simple install of the package.
I suggest the first extras should be called "ML"
[tool.poetry.extras]
ML = ["ngboost", "pymc","tensorflow", "scikit-learn", "arviz", "joblib"]
and of courses these packages should be removed from [tool.poetry.dependencies]
With this, the user can install the extra "ML" packages with the following command:
pip install epigraphhub[ML]
Other groups can be added later.
A consequence of this is that the imports of these packages in the library must be wrapped in try/except clauses, and when functions requiring these packages are called, they must check if the package is installed, and if not, return a message to the user, saying that she needs to install the extra dependencies.
We need to make some dependency optional, to minimize the dependencies on a simple install of the package.
I suggest the first extras should be called "ML"
and of courses these packages should be removed from
[tool.poetry.dependencies]
With this, the user can install the extra "ML" packages with the following command:Other groups can be added later.
A consequence of this is that the imports of these packages in the library must be wrapped in
try/except
clauses, and when functions requiring these packages are called, they must check if the package is installed, and if not, return a message to the user, saying that she needs to install the extra dependencies.