Skip to content

Commit fa52bff

Browse files
committed
Change tox to use uv
1 parent f51d688 commit fa52bff

2 files changed

Lines changed: 62 additions & 25 deletions

File tree

.github/workflows/tox.lock

Lines changed: 48 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ colorama==0.4.6 \
66
--hash=sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44 \
77
--hash=sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6
88
# via tox
9-
distlib==0.4.1 \
10-
--hash=sha256:9c2c552c68cbadc619f2d0ed3a69e27c351a3f4c9baa9ffb7df9e9cdc3d19a97 \
11-
--hash=sha256:c3804d0d2d4b5fcd44036eb860cb6660485fcdf5c2aba53dc324d805837ea65b
9+
distlib==0.4.3 \
10+
--hash=sha256:4b0ce306c966eb73bc3a7b6abad017c556dadd92c44701562cd528ac7fde4d5b \
11+
--hash=sha256:f152097224a0ae24be5a0f6bae1b9359af82133bce63f98a95f86cae1aede9ed
1212
# via virtualenv
13-
filelock==3.29.1 \
14-
--hash=sha256:85199dfd706869641b72b2e8955d5416a4b2b7dc4b0e8e6d97b4cc1299a6983b \
15-
--hash=sha256:d97e6b1b9757569626c58caa07dc4beb1613f4a2938b1e8cc81afca398906c9e
13+
filelock==3.29.7 \
14+
--hash=sha256:5b481979797ae69e72f0b389d89a80bdd585c260c5b3f1fb9c0a5ba9bb3f195d \
15+
--hash=sha256:987db6f789a3a2a59f55081801b2b3697cb97e2a736b5f1a9e99b559285fbc51
1616
# via
1717
# python-discovery
1818
# tox
@@ -23,6 +23,7 @@ packaging==26.2 \
2323
# via
2424
# pyproject-api
2525
# tox
26+
# tox-uv-bare
2627
platformdirs==4.10.0 \
2728
--hash=sha256:31e761a6a0ca04faf7353ea759bdba55652be214725111e5aac52dfa29d4bef7 \
2829
--hash=sha256:fb516cdb12eb0d857d0cd85a7c57cea4d060bee4578d6cf5a14dfdf8cbf8784a
@@ -38,9 +39,9 @@ pyproject-api==1.10.1 \
3839
--hash=sha256:c2b2726bd7aa9217b6c50b621fef5b2ae5def4d55b779c9e0694c15e0a8517ba \
3940
--hash=sha256:fa9e6f66c35b5017e909825d8f2b5d5482ea699d7be809d21c03bd1f7317f36a
4041
# via tox
41-
python-discovery==1.4.0 \
42-
--hash=sha256:26ed78d703e234879a66244c7d4114563fb13ec5cd30a2d1357e5fb4850782da \
43-
--hash=sha256:eb8bc7daad3c226c147e45bb4e970a1feb1bf4048ee178e6db59e197b8010ce3
42+
python-discovery==1.4.4 \
43+
--hash=sha256:5cad33982d412c1f3ffb8f9ca4ea292c9680bca3942451d30b69c37fce53a4a3 \
44+
--hash=sha256:abebe9120b43453b68c908acfb1e72a19d1a959ed2cb620ad38fc57d08056dbe
4445
# via
4546
# tox
4647
# virtualenv
@@ -95,20 +96,49 @@ tomli==2.4.1 ; python_version < "3.11" \
9596
# via
9697
# pyproject-api
9798
# tox
99+
# tox-uv-bare
98100
tomli-w==1.2.0 \
99101
--hash=sha256:188306098d013b691fcadc011abd66727d3c414c571bb01b1a174ba8c983cf90 \
100102
--hash=sha256:2dd14fac5a47c27be9cd4c976af5a12d87fb1f0b4512f81d69cce3b35ae25021
101103
# via tox
102-
tox==4.55.1 \
103-
--hash=sha256:0678fbf26dd5b559b1ef128fa4388325920219322ebc8cc5f3497627c00f4472 \
104-
--hash=sha256:e2084be6dfdef96ba1bed4948e6a1f73613d6952e1477be5dca45653d4c053c8
105-
typing-extensions==4.15.0 ; python_version < "3.11" \
106-
--hash=sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466 \
107-
--hash=sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548
104+
tox==4.56.4 \
105+
--hash=sha256:53bac88382b9638a5ce40fbaddd6076e1c8f638751af7bf8e759392c953df2f0 \
106+
--hash=sha256:d49e371119ebfafb15054ad7ccff3d03027ccb65195fae3ac656b431b5524055
107+
# via tox-uv-bare
108+
tox-uv==1.35.2 \
109+
--hash=sha256:2d99b0e3c782ba49e7cbe521c8d344758595961b17a3633738d67096641c1bde
110+
tox-uv-bare==1.35.2 \
111+
--hash=sha256:49e28a804c97f23ea17e25859960c0fa78f35bccb7e14344cfd840e89a9aade9 \
112+
--hash=sha256:c0d590a41d1054a1ad0874e9e5943ff52402786e3d4599d8f8d37a65b566ef53
113+
# via tox-uv
114+
typing-extensions==4.16.0 ; python_version < "3.11" \
115+
--hash=sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8 \
116+
--hash=sha256:dc983d19a509c94dba722ee6abd33940f7c05a89e243c47e907eb4db6f1a43e5
108117
# via
109118
# tox
110119
# virtualenv
111-
virtualenv==21.4.2 \
112-
--hash=sha256:38e6ee0a555615c0ea9da2ac7e9998fe8dc3b911dd33ad8eaad2020957653b0c \
113-
--hash=sha256:854210ca524a1a4d0d744734f4acbc721c3ffe163b85bbf5d56d14d5ae2f0fae
120+
uv==0.11.28 \
121+
--hash=sha256:041e4b80bebc58d7142ac9394370cacd73185fd8d066d6675d14707d83408f6d \
122+
--hash=sha256:185416a5316df8c5442b47178349f1f27fc1034468670ac1fb499eae3b25bd68 \
123+
--hash=sha256:2e91eb8a0b00d5f4427195fc818bcaa4d8bb4fccb79f4e973e74802419ab06ca \
124+
--hash=sha256:3fcfda468448093f4d5961ca8c068b0aeec2d02f7226d58ee8513321a929fe4f \
125+
--hash=sha256:47e3f12fe6f5c80a01639d8df36efde7bdddfc3bbc52250df623547d8d393105 \
126+
--hash=sha256:49fe42df9f42056037473f3876adec1615709b57d3470ed39178ff420f3afb9f \
127+
--hash=sha256:692edef9cf1d2dd69bb9d9fc01f281a82610547900ce227a3cb269cdf988b5ce \
128+
--hash=sha256:6b3d0ea11e83b373a2166b82dd0864f5677fbadf98db64541ab2e59c42968905 \
129+
--hash=sha256:6f7ce6f6015a3e857bc6a663514afa62856b669ee5c1bd120e4c58ac2ef5513d \
130+
--hash=sha256:8c60294e3be4fa203a04015fc02ac8a31d936e86fde06dcb43c7f8f22661dfff \
131+
--hash=sha256:a4a9fe246cb2882532277f5d5e5bd8a59462981462a2f98426f35ecfca82460e \
132+
--hash=sha256:ae5bbdb6150adcd625f5fa720b04abf2014247d878d1035f19751bb0e7274543 \
133+
--hash=sha256:bb11d94cb848ff58af79e0bb5e4037cd324d27dbe2dabb7746db698b724a9a20 \
134+
--hash=sha256:d01c7c665511c047f350e587b8b6557c96b61b2eddafbcd8964f0cc2f5b9afbe \
135+
--hash=sha256:df86cfd135542a833e9f84708b3b8dbaa987a3b9db85b267062db49ab639d242 \
136+
--hash=sha256:e94560995737c50525d586da553521fbafe9ef06641e7d885db4b270f53ee84d \
137+
--hash=sha256:e9eb317b1cdb249887df77ac232d8a9448f26858b2399f9f2949c6a7b9bedf88 \
138+
--hash=sha256:f4fcf2c8d9f1444b900e6b8dbbb828825fb76eca01acd18aeaa5c90240408cda \
139+
--hash=sha256:fab3c31007a611866475824a666f5a721bf0c9335db806355a97fcfba2a6bbb7
140+
# via tox-uv
141+
virtualenv==21.6.1 \
142+
--hash=sha256:15f978b7cd329f24855ff4a0c4b4899cc7678589f49adbdcbbb4d3232e641128 \
143+
--hash=sha256:afe991df855715a2b2f60edfcc0107ef95a79fdfd8cb4cdaa71603d1c12e463b
114144
# via tox

pyproject.toml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ dev = [
109109
"jsonargparse[coverage]",
110110
"jsonargparse[doc]",
111111
"pre-commit>=2.19.0",
112-
"tox>=3.25.0",
112+
"tox>=4.0.0",
113+
"tox-uv>=1.0.0",
113114
"build>=0.10.0",
114115
]
115116
doc = [
@@ -178,9 +179,6 @@ ignore = [
178179
"E721", # Allow comparing types with type()
179180
]
180181

181-
[tool.ruff.lint.pydocstyle]
182-
convention = "google"
183-
184182

185183
[tool.typos.default.extend-identifiers]
186184
Villegas = "Villegas"
@@ -199,6 +197,10 @@ extras =
199197
argparse: coverage
200198
changedir = jsonargparse_tests
201199
allowlist_externals = rm
200+
passenv = UV_EXCLUDE_NEWER
201+
# Ensure uv installs into the tox env even if UV_SYSTEM_PYTHON=1 set outside
202+
setenv =
203+
UV_SYSTEM_PYTHON = 0
202204
commands =
203205
all-extras: python -m pytest {posargs}
204206
no-extras: python -m pytest {posargs}
@@ -207,10 +209,15 @@ commands =
207209
argparse: python -m pytest -W ignore::pytest.PytestUnknownMarkWarning --tb=no -m "not (not_supported or implementation_specific or investigate)" tests_argparse_{env_name}.py {posargs}
208210
usedevelop = true
209211
212+
[testenv:.pkg]
213+
setenv =
214+
{[testenv]setenv}
215+
210216
[testenv:omegaconf]
211217
extras = test,coverage,all
212218
changedir = jsonargparse_tests
213219
setenv =
220+
{[testenv]setenv}
214221
JSONARGPARSE_OMEGACONF_FULL_TEST = true
215222
commands =
216223
python -m pytest {posargs}
@@ -226,7 +233,7 @@ commands =
226233
copy('conftest.py', Path(r'{envtmpdir}', 'conftest.py')); \
227234
copy('test_pydantic.py', Path(r'{envtmpdir}', 'test_pydantic.py'))\
228235
"
229-
pip install "pydantic<2"
236+
uv pip install --python {envpython} "pydantic<2"
230237
python -m pytest {posargs} {envtmpdir}/test_pydantic.py
231238
232239
# Test with pydantic>=2 importing from pydantic.v1
@@ -238,13 +245,13 @@ commands =
238245
content = re.sub(r'^annotated = [^\\n]*', 'annotated = False', content, flags=re.MULTILINE); \
239246
path.write_text(content)\
240247
"
241-
pip install "pydantic>=2"
248+
uv pip install --python {envpython} "pydantic>=2"
242249
python -m pytest {posargs} {envtmpdir}/test_pydantic.py
243250
244251
[testenv:without-pyyaml]
245252
extras = test,coverage,all
246253
commands =
247-
pip uninstall -y argcomplete omegaconf pyyaml responses ruamel.yaml ruamel.yaml.clib types-PyYAML
254+
uv pip uninstall --python {envpython} argcomplete omegaconf pyyaml responses ruamel.yaml ruamel.yaml.clib types-PyYAML
248255
python -m pytest {posargs}
249256
250257
[testenv:without-future-annotations]

0 commit comments

Comments
 (0)