Skip to content

Commit 3454f29

Browse files
Move from extras to dependency-groups (#219)
* Move from extras to dependency-groups * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 679bf54 commit 3454f29

2 files changed

Lines changed: 29 additions & 8 deletions

File tree

pyproject.toml

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,35 @@ dependencies = [
4949
"devpi-server>=6.17",
5050
"typing-extensions>=4.15; python_version<'3.11'",
5151
]
52-
optional-dependencies.testing = [
52+
urls.Homepage = "https://github.com/tox-dev/devpi-process#readme"
53+
urls.Source = "https://github.com/tox-dev/devpi-process"
54+
urls.Tracker = "https://github.com/tox-dev/devpi-process/issues"
55+
56+
[dependency-groups]
57+
dev = [
58+
{ include-group = "lint" },
59+
{ include-group = "pkg-meta" },
60+
{ include-group = "test" },
61+
{ include-group = "type" },
62+
]
63+
test = [
5364
"covdefaults>=2.3",
5465
"httpx>=0.28.1",
5566
"pytest>=8.4.2",
5667
"pytest-cov>=7",
5768
]
58-
urls.Homepage = "https://github.com/tox-dev/devpi-process#readme"
59-
urls.Source = "https://github.com/tox-dev/devpi-process"
60-
urls.Tracker = "https://github.com/tox-dev/devpi-process/issues"
69+
type = [
70+
"ty>=0.0.17",
71+
{ include-group = "test" },
72+
]
73+
lint = [
74+
"pre-commit-uv>=4.1.5",
75+
]
76+
pkg-meta = [
77+
"check-wheel-contents>=0.6.3",
78+
"twine>=6.2",
79+
"uv>=0.8.22",
80+
]
6181

6282
[tool.hatch]
6383
build.hooks.vcs.version-file = "src/devpi_process/_version.py"

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 = [ "DIFF_AGAINST", "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.1.5" ]
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.8.22" ]
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)