Skip to content

Commit c36510c

Browse files
authored
Use uv with tox and pre-commit (#521)
1 parent 5a588cf commit c36510c

File tree

4 files changed

+23
-25
lines changed

4 files changed

+23
-25
lines changed

Diff for: .config/constraints.txt

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This file was autogenerated by uv via the following command:
2-
# tox run deps
2+
# tox run -e deps
33
ansible-builder==3.1.0
44
ansible-compat==24.10.0
55
ansible-core==2.18.1
@@ -36,20 +36,20 @@ defusedxml==0.7.1
3636
dill==0.3.9
3737
distlib==0.3.9
3838
distro==1.9.0
39-
django==5.1.4
40-
django-stubs==5.1.1
41-
django-stubs-ext==5.1.1
39+
django==5.1.5
40+
django-stubs==5.1.2
41+
django-stubs-ext==5.1.2
4242
dnspython==2.7.0
43-
docstring-parser-fork==0.0.9
43+
docstring-parser-fork==0.0.12
4444
enrich==1.2.7
4545
execnet==2.1.1
4646
filelock==3.16.1
4747
ghp-import==2.1.0
48-
griffe==1.5.4
48+
griffe==1.5.5
4949
gunicorn==23.0.0
5050
hjson==3.1.0
5151
htmlmin2==0.1.13
52-
identify==2.6.5
52+
identify==2.6.6
5353
idna==3.10
5454
importlib-metadata==8.5.0
5555
iniconfig==2.0.0
@@ -74,41 +74,41 @@ mdurl==0.1.2
7474
mergedeep==1.3.4
7575
mkdocs==1.6.1
7676
mkdocs-ansible==24.12.0
77-
mkdocs-autorefs==1.2.0
77+
mkdocs-autorefs==1.3.0
7878
mkdocs-gen-files==0.5.0
7979
mkdocs-get-deps==0.2.0
8080
mkdocs-htmlproofer-plugin==1.3.0
8181
mkdocs-macros-plugin==1.3.7
82-
mkdocs-material==9.5.49
82+
mkdocs-material==9.5.50
8383
mkdocs-material-extensions==1.3.1
8484
mkdocs-minify-plugin==0.8.0
8585
mkdocs-monorepo-plugin==1.1.0
8686
mkdocstrings==0.27.0
8787
mkdocstrings-python==1.13.0
8888
molecule==24.12.0
89-
more-itertools==10.5.0
89+
more-itertools==10.6.0
9090
mypy==1.14.1
9191
mypy-extensions==1.0.0
9292
nodeenv==1.9.1
9393
onigurumacffi==1.3.0
9494
openapi-core==0.19.4
95-
openapi-schema-validator==0.6.2
95+
openapi-schema-validator==0.6.3
9696
openapi-spec-validator==0.7.1
9797
packaging==24.2
9898
paginate==0.5.7
9999
parse==1.20.2
100100
parsley==1.3
101-
pathable==0.4.3
101+
pathable==0.4.4
102102
pathspec==0.12.1
103103
pbr==6.1.0
104104
pexpect==4.9.0
105105
pillow==11.1.0
106106
platformdirs==4.3.6
107107
pluggy==1.5.0
108-
pre-commit==4.0.1
108+
pre-commit==4.1.0
109109
ptyprocess==0.7.0
110110
pycparser==2.22
111-
pydoclint==0.5.14
111+
pydoclint==0.6.0
112112
pygments==2.18.0
113113
pylint==3.3.3
114114
pymdown-extensions==10.14
@@ -131,7 +131,7 @@ rich==13.9.4
131131
rpds-py==0.22.3
132132
ruamel-yaml==0.18.6
133133
ruamel-yaml-clib==0.2.12
134-
ruff==0.9.0
134+
ruff==0.9.2
135135
six==1.17.0
136136
soupsieve==2.6
137137
sqlparse==0.5.3

Diff for: .config/requirements-lock.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This file was autogenerated by uv via the following command:
2-
# tox run deps
2+
# tox run -e deps
33
ansible-builder==3.1.0
44
ansible-compat==24.10.0
55
ansible-core==2.18.1

Diff for: pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,6 @@ environments = ["platform_system != 'Windows'"]
402402

403403
[tool.uv.pip]
404404
# annotation-style = "line"
405-
custom-compile-command = "tox run deps"
405+
custom-compile-command = "tox run -e deps"
406406
no-annotate = true
407407
no-emit-package = ["pip", "resolvelib", "typing_extensions", "uv", "pip", "distribute", "setuptools"]

Diff for: tox.ini

+6-8
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
requires =
33
tox>=4.11.3
44
tox-extra>=2.0.2
5+
tox-uv>=1.19
56
env_list =
67
py
78
deps
@@ -43,13 +44,16 @@ pass_env =
4344
USER
4445
XDG_RUNTIME_DIR
4546
set_env =
46-
!milestone: PIP_CONSTRAINT = {toxinidir}/.config/constraints.txt
4747
COVERAGE_COMBINED = {envdir}/.coverage
4848
COVERAGE_FILE = {env:COVERAGE_FILE:{envdir}/.coverage.{envname}}
4949
COVERAGE_PROCESS_START = {toxinidir}/pyproject.toml
5050
FORCE_COLOR = 1
51+
PIP_CONSTRAINT = {toxinidir}/.config/constraints.txt
5152
PRE_COMMIT_COLOR = always
5253
TERM = xterm-256color
54+
UV_CONSTRAINT = {toxinidir}/.config/constraints.txt
55+
deps, devel, lint, milestone, py310: PIP_CONSTRAINT = /dev/null
56+
deps, devel, lint, milestone, py310: UV_CONSTRAINT = /dev/null
5357
commands_pre =
5458
sh -c "rm -f {envdir}/.coverage* 2>/dev/null || true"
5559
commands =
@@ -72,8 +76,6 @@ skip_install = true
7276
deps =
7377
{[testenv:lint]deps}
7478
extras =
75-
set_env =
76-
PIP_CONSTRAINT = /dev/null
7779
commands_pre =
7880
commands =
7981
-pre-commit run --all-files --show-diff-on-failure --hook-stage manual deps
@@ -99,8 +101,7 @@ description = Enforce quality standards under {basepython}
99101
skip_install = true
100102
deps =
101103
pre-commit
102-
set_env =
103-
PIP_CONSTRAINT = /dev/null
104+
pre-commit-uv
104105
commands =
105106
pre-commit run --show-diff-on-failure --all-files
106107

@@ -110,9 +111,6 @@ description =
110111
deps =
111112
ansible-core@ https://github.com/ansible/ansible/archive/milestone.tar.gz
112113
ansible-creator<24.10.0
113-
set_env =
114-
{[testenv]set_env}
115-
PIP_CONSTRAINT = /dev/null
116114

117115
[testenv:pkg]
118116
description =

0 commit comments

Comments
 (0)