Skip to content

Commit 0d1e55c

Browse files
committed
Move from extras to dependency-groups
1 parent 503ffc7 commit 0d1e55c

2 files changed

Lines changed: 22 additions & 10 deletions

File tree

pyproject.toml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,28 @@ dynamic = [
4141
dependencies = [
4242
"sphinx>=9.0.4",
4343
]
44-
optional-dependencies.testing = [
45-
"covdefaults>=2.3",
46-
"defusedxml>=0.7.1", # needed for sphinx.testing
47-
"pytest>=9.0.2",
48-
"pytest-cov>=7",
49-
]
5044
urls.Documentation = "https://github.com/tox-dev/sphinx-argparse-cli#sphinx-argparse-cli"
5145
urls.Homepage = "https://github.com/tox-dev/sphinx-argparse-cli"
5246
urls.Source = "https://github.com/tox-dev/sphinx-argparse-cli"
5347
urls.Tracker = "https://github.com/tox-dev/sphinx-argparse-cli/issues"
5448

49+
[dependency-groups]
50+
dev = [
51+
{ include-group = "lint" },
52+
{ include-group = "pkg-meta" },
53+
{ include-group = "test" },
54+
{ include-group = "type" },
55+
]
56+
test = [
57+
"covdefaults>=2.3",
58+
"defusedxml>=0.7.1",
59+
"pytest>=9.0.2",
60+
"pytest-cov>=7",
61+
]
62+
type = [ "ty>=0.0.17", { include-group = "test" }, ]
63+
lint = [ "pre-commit-uv>=4.2", ]
64+
pkg-meta = [ "check-wheel-contents>=0.6.3", "twine>=6.2", "uv>=0.9.16", ]
65+
5566
[tool.hatch]
5667
build.hooks.vcs.version-file = "src/sphinx_argparse_cli/version.py"
5768
build.targets.sdist.include = [

tox.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ skip_missing_interpreters = true
66
description = "run the unit tests with pytest under {env_name}"
77
package = "wheel"
88
wheel_build_env = ".pkg"
9-
extras = [ "testing" ]
9+
dependency_groups = [ "test" ]
1010
pass_env = [ "PYTEST_*" ]
1111
set_env.COVERAGE_FILE = { replace = "env", name = "COVERAGE_FILE", default = "{work_dir}{/}.coverage.{env_name}" }
1212
commands = [
@@ -38,13 +38,13 @@ commands = [
3838
[env.fix]
3939
description = "format the code base to adhere to our styles, and complain about what we cannot do automatically"
4040
skip_install = true
41-
deps = [ "pre-commit-uv>=4.2" ]
41+
dependency_groups = [ "lint" ]
4242
commands = [ [ "pre-commit", "run", "--all-files", "--show-diff-on-failure" ] ]
4343

4444
[env.pkg_meta]
4545
description = "check that the long description is valid"
4646
skip_install = true
47-
deps = [ "check-wheel-contents>=0.6.3", "twine>=6.2", "uv>=0.9.16" ]
47+
dependency_groups = [ "pkg-meta" ]
4848
commands = [
4949
[ "uv", "build", "--sdist", "--wheel", "--out-dir", "{env_tmp_dir}", "." ],
5050
[ "twine", "check", "{env_tmp_dir}{/}*" ],
@@ -53,12 +53,13 @@ commands = [
5353

5454
[env.type]
5555
description = "run type check on code base"
56-
deps = [ "ty>=0.0.17" ]
56+
dependency_groups = [ "type" ]
5757
commands = [ [ "ty", "check", "--output-format", "concise", "--error-on-warning", "." ] ]
5858

5959
[env.dev]
6060
description = "generate a DEV environment"
6161
package = "editable"
62+
dependency_groups = [ "dev" ]
6263
commands = [
6364
[ "uv", "pip", "tree" ],
6465
[ "python", "-c", "import sys; print(sys.executable)" ],

0 commit comments

Comments
 (0)