Skip to content

Commit

Permalink
[MNT] Extra dependency specifications per component (#5136)
Browse files Browse the repository at this point in the history
Closes task 1 of #5101.
  • Loading branch information
yarnabrina committed Sep 9, 2023
1 parent a3a629d commit 13e0dc5
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 2 deletions.
20 changes: 18 additions & 2 deletions docs/source/developer_guide/dependencies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ Estimators with a soft dependency need to ensure the following:
This prevents crashes for any users running ``check_estimator`` on all estimators, or a full local ``pytest`` run without the required soft dependency.
See the tests in ``forecasting.tests.test_pmdarima`` for a concrete example.

Adding a new soft dependency
----------------------------
Adding and maintaining soft dependencies
----------------------------------------

When adding a new soft dependency or changing the version of an existing one,
the following need to be updated:
Expand All @@ -77,6 +77,22 @@ upper bounds on ``sktime`` core dependencies, or severe limitations to the user
installation workflow.
In such a case, it is strongly suggested not to add the soft dependency.

For maintenance purposes, it has been decided that all soft-dependencies will have lower
and upper bounds specified mandatorily. The soft-dependencies will be specified in
separate extras per each component of ``sktime``, for example ``forecasting``,
``classification``, ``regression``, etc. It is possible to have different upper and
lower bounds for a single package when present in different extras, and can be modified in one without affecting the others.

Upper bounds will be preferred to be set up as the next ``minor`` release of the
packages, as ``patch`` updates should never contain breaking changes by convention of
semantic versioning. For stable packages, next ``major`` verion can be used as well.

Upper bounds will be automatically updated using ``dependabot``, which has been set up
to run daily based on releases on ``PyPI``. The CI introducing newer upper bound will be
merged into ``main`` branch only if all unit tests for the affected component(s) pass.

Lower bounds maintenance planning is in progress and will be updated here soon.

Adding a core or developer dependency
-------------------------------------

Expand Down
52 changes: 52 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,58 @@ dependencies = [
]

[project.optional-dependencies]
alignment = [
"dtw-python>=1.3,<1.4",
"numba>=0.53,<0.58",
]
annotation = [
"attrs>=23,<23.2",
"hmmlearn>=0.2.7,<0.4",
"numba>=0.53,<0.58",
"pyod>=0.8.0,<1.2",
]
classification = [
"esig>=0.9.7,<0.10",
"mrsqm>=0.0.3,<0.1",
"numba>=0.53,<0.58",
"tensorflow>=2,<=2.14",
"tsfresh>=0.17,<0.21",
]
clustering = [
"numba>=0.53,<0.58",
"tslearn>=0.5.2,<0.6.3",
]
forecasting = [
"pmdarima>=1.8,!=1.8.1,<2.1",
"prophet>=1.1,<1.2",
"statsforecast>=0.5.2,<1.6",
"statsmodels>=0.12.1,<0.15",
"tbats>=1.1,<1.2",
]
networks = [
"keras-self-attention>=0.51,<0.52",
"tensorflow>=2,<=2.14",
]
param_est = [
"seasonal>=0.3.1,<0.4",
"statsmodels>=0.12.1,<0.15",
]
regression = [
"numba>=0.53,<0.58",
"tensorflow>=2,<=2.14",
]
transformations = [
"esig>=0.9.7,<0.10",
"filterpy>=1.4.5,<1.5",
"holidays>=0.29,<0.32",
"mne>=1.5,<1.6",
"numba>=0.53,<0.58",
"pycatch22>=0.4,<0.5",
"pykalman>=0.9.5,<0.10",
"statsmodels>=0.12.1,<0.15",
"stumpy>=1.5.1,<1.13",
"tsfresh>=0.17,<0.21",
]
all_extras = [
"attrs",
"cloudpickle",
Expand Down

0 comments on commit 13e0dc5

Please sign in to comment.