From 16e22052fd1cf56131f1a355048e8b8effa9b590 Mon Sep 17 00:00:00 2001 From: Vahid Ahmadi Date: Wed, 27 May 2026 09:41:10 +0200 Subject: [PATCH 1/2] 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). --- changelog.d/920.md | 1 + pyproject.toml | 9 +++------ 2 files changed, 4 insertions(+), 6 deletions(-) create mode 100644 changelog.d/920.md diff --git a/changelog.d/920.md b/changelog.d/920.md new file mode 100644 index 000000000..0a52cdec4 --- /dev/null +++ b/changelog.d/920.md @@ -0,0 +1 @@ +- Drop dev dependencies that are already brought in transitively by `policyengine-core` (`ruff`, `coverage`, `pytest`, `pytest-cov`, `wheel`, `towncrier`), shrinking the install footprint. diff --git a/pyproject.toml b/pyproject.toml index 6a803a775..a359a2d15 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -67,17 +67,14 @@ environments = [ [project.optional-dependencies] dev = [ - "ruff>=0.9.0", - "coverage", + # ruff, coverage, pytest, pytest-cov, wheel and towncrier are brought + # in transitively by policyengine-core's runtime and dev extras and so + # are not repeated here. "furo<2023", "tqdm", - "pytest", - "pytest-cov", "setuptools", "sphinx-argparse>=0.3.2,<1", "sphinx-math-dollar>=1.2.1,<2", - "wheel", - "towncrier>=24.8.0", "snowballstemmer>=2,<3", "jupyter-book>=2.0.0a0", "rich", From 859772d9524f1b3c8a68737895d16bfa976662ae Mon Sep 17 00:00:00 2001 From: Vahid Ahmadi Date: Wed, 27 May 2026 12:43:30 +0200 Subject: [PATCH 2/2] 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. --- changelog.d/920.md | 2 +- pyproject.toml | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/changelog.d/920.md b/changelog.d/920.md index 0a52cdec4..56bd0c27c 100644 --- a/changelog.d/920.md +++ b/changelog.d/920.md @@ -1 +1 @@ -- Drop dev dependencies that are already brought in transitively by `policyengine-core` (`ruff`, `coverage`, `pytest`, `pytest-cov`, `wheel`, `towncrier`), shrinking the install footprint. +- 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. diff --git a/pyproject.toml b/pyproject.toml index a359a2d15..6c09fa2b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -67,9 +67,15 @@ environments = [ [project.optional-dependencies] dev = [ - # ruff, coverage, pytest, pytest-cov, wheel and towncrier are brought - # in transitively by policyengine-core's runtime and dev extras and so - # are not repeated here. + # pytest and wheel are brought in transitively by policyengine-core's + # runtime dependencies, so they're not repeated here. coverage, + # pytest-cov, ruff and towncrier live in core's dev extras, which pip + # does NOT install transitively when installing policyengine-uk[dev], + # so they must be listed explicitly here. + "coverage", + "pytest-cov", + "ruff>=0.9.0", + "towncrier>=24.8.0", "furo<2023", "tqdm", "setuptools",