Skip to content

Commit 13642da

Browse files
Use dependency groups (#118)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 9be66ee commit 13642da

File tree

3 files changed

+25
-18
lines changed

3 files changed

+25
-18
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ repos:
2020
- id: tox-ini-fmt
2121
args: ["-p", "fix"]
2222
- repo: https://github.com/tox-dev/pyproject-fmt
23-
rev: "v2.4.3"
23+
rev: "v2.5.0"
2424
hooks:
2525
- id: pyproject-fmt
2626
- repo: https://github.com/astral-sh/ruff-pre-commit

pyproject.toml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,24 +41,35 @@ dynamic = [
4141
]
4242
dependencies = [
4343
"packaging>=24.1",
44-
"tox<5,>=4.21.2",
44+
"tox>=4.21.2,<5",
4545
"typing-extensions>=4.12.2; python_version<'3.10'",
46-
"uv<1,>=0.4.18",
46+
"uv>=0.4.18,<1",
4747
]
48-
optional-dependencies.testing = [
48+
urls.Changelog = "https://github.com/tox-dev/tox-uv/releases"
49+
urls.Documentation = "https://github.com/tox-dev/tox-uv#tox-uv"
50+
urls.Homepage = "https://github.com/tox-dev/tox-uv"
51+
urls.Source = "https://github.com/tox-dev/tox-uv"
52+
urls.Tracker = "https://github.com/tox-dev/tox-uv/issues"
53+
entry-points.tox.tox-uv = "tox_uv.plugin"
54+
55+
[dependency-groups]
56+
dev = [
57+
{ include-group = "lint" },
58+
{ include-group = "pkg-meta" },
59+
{ include-group = "test" },
60+
{ include-group = "type" },
61+
]
62+
test = [
4963
"covdefaults>=2.3",
5064
"devpi-process>=1.0.2",
5165
"diff-cover>=9.2",
5266
"pytest>=8.3.3",
5367
"pytest-cov>=5",
5468
"pytest-mock>=3.14",
5569
]
56-
urls.Changelog = "https://github.com/tox-dev/tox-uv/releases"
57-
urls.Documentation = "https://github.com/tox-dev/tox-uv#tox-uv"
58-
urls.Homepage = "https://github.com/tox-dev/tox-uv"
59-
urls.Source = "https://github.com/tox-dev/tox-uv"
60-
urls.Tracker = "https://github.com/tox-dev/tox-uv/issues"
61-
entry-points.tox.tox-uv = "tox_uv.plugin"
70+
type = [ "mypy==1.11.2", { include-group = "test" } ]
71+
lint = [ "pre-commit-uv>=4.1.3" ]
72+
pkg-meta = [ "check-wheel-contents>=0.6", "twine>=5.1.1", "uv>=0.4.18" ]
6273

6374
[tool.hatch]
6475
build.hooks.vcs.version-file = "src/tox_uv/version.py"

tox.ini

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ skip_missing_interpreters = true
1717
description = run the unit tests with pytest under {base_python}
1818
package = wheel
1919
wheel_build_env = .pkg
20-
extras =
21-
testing
2220
pass_env =
2321
DIFF_AGAINST
2422
PYTEST_*
@@ -32,6 +30,7 @@ commands =
3230
--junitxml {work_dir}{/}junit.{env_name}.xml \
3331
tests}
3432
diff-cover --compare-branch {env:DIFF_AGAINST:origin/main} {work_dir}{/}coverage.{env_name}.xml --fail-under 100
33+
dependency_groups = test
3534

3635
[testenv:fix]
3736
description = format the code base to adhere to our styles, and complain about what we cannot do automatically
@@ -43,27 +42,24 @@ commands =
4342

4443
[testenv:type]
4544
description = run type check on code base
46-
deps =
47-
mypy==1.11.2
4845
commands =
4946
mypy src
5047
mypy tests
48+
dependency_groups = type
5149

5250
[testenv:pkg_meta]
5351
description = check that the long description is valid
5452
skip_install = true
55-
deps =
56-
check-wheel-contents>=0.6
57-
twine>=5.1.1
58-
uv>=0.4.18
5953
commands =
6054
uv build --sdist --wheel --out-dir {env_tmp_dir} .
6155
twine check {env_tmp_dir}{/}*
6256
check-wheel-contents --no-config {env_tmp_dir}
57+
dependency_groups = pkg-meta
6358

6459
[testenv:dev]
6560
description = generate a DEV environment
6661
package = editable
6762
commands =
6863
uv pip tree
6964
python -c 'import sys; print(sys.executable)'
65+
dependency_groups = dev

0 commit comments

Comments
 (0)