Skip to content

Commit 0a1e784

Browse files
authored
[MNT] clean up and comment dep sets in pyproject.toml, remove unused graph dep set from CI (#1650)
Cleans up dependency management without making changes to existing dep sets. * create new dep set `all_extras` containing all used soft dependencies * reorder dep sets in `pyproject.toml` and and comments about their usage * remove unused `graph` dep set from installations in CI - the contained `networkx` package is never imported within the code base
1 parent 81aee66 commit 0a1e784

File tree

2 files changed

+37
-4
lines changed

2 files changed

+37
-4
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Install dependencies
2626
run: |
2727
python -m pip install --upgrade pip
28-
python -m pip install ".[dev,github-actions,graph,mqf2]"
28+
python -m pip install ".[dev,github-actions,mqf2]"
2929
3030
- name: Show dependencies
3131
run: python -m pip list
@@ -103,7 +103,7 @@ jobs:
103103
- name: Install dependencies
104104
shell: bash
105105
run: |
106-
pip install ".[dev,github-actions,graph,mqf2]"
106+
pip install ".[dev,all_extras,github-actions]"
107107
108108
- name: Show dependencies
109109
run: python -m pip list

pyproject.toml

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,42 @@ dependencies = [
6868
]
6969

7070
[project.optional-dependencies]
71+
# there are the following dependency sets:
72+
# - all_extras - all soft dependencies
73+
# - granular dependency sets:
74+
# - tuning - dependencies for tuning hyperparameters via optuna
75+
# - mqf2 - dependencies for multivariate quantile loss
76+
# - graph - dependencies for graph based forecasting
77+
# - dev - the developer dependency set, for contributors to pytorch-forecasting
78+
# - CI related: e.g., dev, github-actions. Not for users of sktime.
79+
#
80+
# soft dependencies are not required for the core functionality of sktime
81+
# but are required by popular estimators, e.g., prophet, tbats, etc.
7182

83+
# all soft dependencies
84+
#
85+
# users can install via "pip install pytorch-forecasting[all_extras]"
86+
#
87+
all_extras = [
88+
"cpflows",
89+
"optuna >=3.1.0,<4.0.0",
90+
"optuna-integration",
91+
"statsmodels",
92+
]
93+
94+
tuning = [
95+
"optuna >=3.1.0,<4.0.0",
96+
"optuna-integration",
97+
"statsmodels",
98+
]
99+
100+
mqf2 = ["cpflows"]
101+
102+
# the graph set is not currently used within pytorch-forecasting
103+
# but is kept for future development, as it has already been released
104+
graph = ["networkx"]
105+
106+
# dev - the developer dependency set, for contributors to pytorch-forecasting
72107
dev = [
73108
"pydocstyle >=6.1.1,<7.0.0",
74109
# checks and make tools
@@ -101,8 +136,6 @@ dev = [
101136
]
102137

103138
github-actions = ["pytest-github-actions-annotate-failures"]
104-
graph = ["networkx"]
105-
mqf2 = ["cpflows"]
106139

107140
[tool.setuptools.packages.find]
108141
exclude = ["build_tools"]

0 commit comments

Comments
 (0)