Skip to content

Commit e686e0c

Browse files
authored
Drop dev deps redundant with policyengine-core (#920) (#1695)
* Drop dev deps redundant with policyengine-core (#920) policyengine-core already pulls in pytest and wheel as runtime deps and ruff, coverage, pytest-cov and towncrier through its dev extras, so listing them again here only adds maintenance overhead. Mirrors the pattern in the US package (policyengine-us#4859). * Restore coverage/pytest-cov/ruff/towncrier as direct dev deps (#920) The previous commit removed these on the assumption that policyengine-core would bring them in. That was wrong: they're in core's *dev* extras, and pip does NOT install extras-of-dependencies transitively. CI broke with "pytest: error: unrecognized arguments: --cov=..." because pytest-cov wasn't installed. What core actually brings in transitively (runtime deps): - pytest<9,>=8 - wheel<1 So pytest and wheel can stay removed; the other four need to come back. Updated the comment in pyproject.toml to be explicit about the extras-not-installed-transitively rule, and corrected the changelog.
1 parent ca90ddd commit e686e0c

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

changelog.d/920.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Drop dev dependencies that are already brought in transitively by `policyengine-core` as runtime deps (`pytest`, `wheel`), shrinking the install footprint. `coverage`, `pytest-cov`, `ruff` and `towncrier` are kept because they live in `policyengine-core`'s `dev` extras and pip does not install extras of dependencies transitively.

pyproject.toml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,20 @@ environments = [
6767

6868
[project.optional-dependencies]
6969
dev = [
70-
"ruff>=0.9.0",
70+
# pytest and wheel are brought in transitively by policyengine-core's
71+
# runtime dependencies, so they're not repeated here. coverage,
72+
# pytest-cov, ruff and towncrier live in core's dev extras, which pip
73+
# does NOT install transitively when installing policyengine-uk[dev],
74+
# so they must be listed explicitly here.
7175
"coverage",
76+
"pytest-cov",
77+
"ruff>=0.9.0",
78+
"towncrier>=24.8.0",
7279
"furo<2023",
7380
"tqdm",
74-
"pytest",
75-
"pytest-cov",
7681
"setuptools",
7782
"sphinx-argparse>=0.3.2,<1",
7883
"sphinx-math-dollar>=1.2.1,<2",
79-
"wheel",
80-
"towncrier>=24.8.0",
8184
"snowballstemmer>=2,<3",
8285
"jupyter-book>=2.0.0a0",
8386
"rich",

0 commit comments

Comments
 (0)