Skip to content

Commit c807064

Browse files
Move from extras to dependency-groups (#118)
* 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 3e73779 commit c807064

2 files changed

Lines changed: 30 additions & 9 deletions

File tree

pyproject.toml

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,36 @@ dependencies = [
3636
"pre-commit>=4.3",
3737
"uv>=0.9.1",
3838
]
39-
optional-dependencies.testing = [
39+
urls."Bug Tracker" = "https://github.com/tox-dev/pre-commit-uv/issues"
40+
urls."Changelog" = "https://github.com/tox-dev/pre-commit-uv/releases"
41+
urls."Source Code" = "https://github.com/tox-dev/pre-commit-uv"
42+
urls.Documentation = "https://github.com/tox-dev/pre-commit-uv/"
43+
44+
[dependency-groups]
45+
dev = [
46+
{ include-group = "lint" },
47+
{ include-group = "pkg-meta" },
48+
{ include-group = "test" },
49+
{ include-group = "type" },
50+
]
51+
test = [
4052
"covdefaults>=2.3",
4153
"pytest>=8.4.2",
4254
"pytest-cov>=7",
4355
"pytest-mock>=3.15.1",
4456
]
45-
urls."Bug Tracker" = "https://github.com/tox-dev/pre-commit-uv/issues"
46-
urls."Changelog" = "https://github.com/tox-dev/pre-commit-uv/releases"
47-
urls."Source Code" = "https://github.com/tox-dev/pre-commit-uv"
48-
urls.Documentation = "https://github.com/tox-dev/pre-commit-uv/"
57+
type = [
58+
"ty>=0.0.17",
59+
{ include-group = "test" },
60+
]
61+
lint = [
62+
"pre-commit-uv>=4.1.1",
63+
]
64+
pkg-meta = [
65+
"check-wheel-contents>=0.6.3",
66+
"twine>=6.2",
67+
"uv>=0.9.1",
68+
]
4969

5070
[tool.hatch]
5171
build.dev-mode-dirs = [

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.1.1" ]
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.1" ]
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", "tree" ],
6465
[ "python", "-c", "import sys; print(sys.executable)" ],

0 commit comments

Comments
 (0)