From 0d1e55c93d6d5ec3f3311fa7bb39984432d7cfb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= Date: Thu, 19 Feb 2026 06:06:53 -0800 Subject: [PATCH 1/2] Move from extras to dependency-groups --- pyproject.toml | 23 +++++++++++++++++------ tox.toml | 9 +++++---- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 845e4b7..caa8a72 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,17 +41,28 @@ dynamic = [ dependencies = [ "sphinx>=9.0.4", ] -optional-dependencies.testing = [ - "covdefaults>=2.3", - "defusedxml>=0.7.1", # needed for sphinx.testing - "pytest>=9.0.2", - "pytest-cov>=7", -] urls.Documentation = "https://github.com/tox-dev/sphinx-argparse-cli#sphinx-argparse-cli" urls.Homepage = "https://github.com/tox-dev/sphinx-argparse-cli" urls.Source = "https://github.com/tox-dev/sphinx-argparse-cli" urls.Tracker = "https://github.com/tox-dev/sphinx-argparse-cli/issues" +[dependency-groups] +dev = [ + { include-group = "lint" }, + { include-group = "pkg-meta" }, + { include-group = "test" }, + { include-group = "type" }, +] +test = [ + "covdefaults>=2.3", + "defusedxml>=0.7.1", + "pytest>=9.0.2", + "pytest-cov>=7", +] +type = [ "ty>=0.0.17", { include-group = "test" }, ] +lint = [ "pre-commit-uv>=4.2", ] +pkg-meta = [ "check-wheel-contents>=0.6.3", "twine>=6.2", "uv>=0.9.16", ] + [tool.hatch] build.hooks.vcs.version-file = "src/sphinx_argparse_cli/version.py" build.targets.sdist.include = [ diff --git a/tox.toml b/tox.toml index 6224c50..05c1f70 100644 --- a/tox.toml +++ b/tox.toml @@ -6,7 +6,7 @@ skip_missing_interpreters = true description = "run the unit tests with pytest under {env_name}" package = "wheel" wheel_build_env = ".pkg" -extras = [ "testing" ] +dependency_groups = [ "test" ] pass_env = [ "PYTEST_*" ] set_env.COVERAGE_FILE = { replace = "env", name = "COVERAGE_FILE", default = "{work_dir}{/}.coverage.{env_name}" } commands = [ @@ -38,13 +38,13 @@ commands = [ [env.fix] description = "format the code base to adhere to our styles, and complain about what we cannot do automatically" skip_install = true -deps = [ "pre-commit-uv>=4.2" ] +dependency_groups = [ "lint" ] commands = [ [ "pre-commit", "run", "--all-files", "--show-diff-on-failure" ] ] [env.pkg_meta] description = "check that the long description is valid" skip_install = true -deps = [ "check-wheel-contents>=0.6.3", "twine>=6.2", "uv>=0.9.16" ] +dependency_groups = [ "pkg-meta" ] commands = [ [ "uv", "build", "--sdist", "--wheel", "--out-dir", "{env_tmp_dir}", "." ], [ "twine", "check", "{env_tmp_dir}{/}*" ], @@ -53,12 +53,13 @@ commands = [ [env.type] description = "run type check on code base" -deps = [ "ty>=0.0.17" ] +dependency_groups = [ "type" ] commands = [ [ "ty", "check", "--output-format", "concise", "--error-on-warning", "." ] ] [env.dev] description = "generate a DEV environment" package = "editable" +dependency_groups = [ "dev" ] commands = [ [ "uv", "pip", "tree" ], [ "python", "-c", "import sys; print(sys.executable)" ], From 4d558bc0e7a6a2d7aa700d1546e555429f0c4f05 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 19 Feb 2026 14:32:49 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pyproject.toml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index caa8a72..2e881f4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,9 +59,18 @@ test = [ "pytest>=9.0.2", "pytest-cov>=7", ] -type = [ "ty>=0.0.17", { include-group = "test" }, ] -lint = [ "pre-commit-uv>=4.2", ] -pkg-meta = [ "check-wheel-contents>=0.6.3", "twine>=6.2", "uv>=0.9.16", ] +type = [ + "ty>=0.0.17", + { include-group = "test" }, +] +lint = [ + "pre-commit-uv>=4.2", +] +pkg-meta = [ + "check-wheel-contents>=0.6.3", + "twine>=6.2", + "uv>=0.9.16", +] [tool.hatch] build.hooks.vcs.version-file = "src/sphinx_argparse_cli/version.py"