Skip to content

Commit 567c500

Browse files
authored
Respect uv.lock in tox envs (#408)
same as marshmallow-code/marshmallow#2983
1 parent e2567c2 commit 567c500

3 files changed

Lines changed: 32 additions & 13 deletions

File tree

pyproject.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,13 @@ sqlalchemy = ["flask-sqlalchemy>=3.0.0", "marshmallow-sqlalchemy>=1.4.0"]
3333
[dependency-groups]
3434
docs = ["marshmallow-sqlalchemy>=0.19.0", "sphinx-issues", "sphinx>=8.1"]
3535
tests = ["pytest"]
36-
dev = [{ include-group = "tests" }, "tox", "tox-uv", "pre-commit>=4.5,<5.0"]
36+
lint = ["pre-commit>=4.5,<5.0"]
37+
dev = [
38+
{ include-group = "tests" },
39+
{ include-group = "lint" },
40+
"tox",
41+
"tox-uv",
42+
]
3743

3844
[tool.uv]
3945
default-groups = ["dev"]

tox.ini

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[tox]
2+
requires = tox-uv
23
envlist=
34
lint
45
py{310,311,312,313,314}
@@ -7,21 +8,28 @@ envlist=
78
docs
89

910
[testenv]
11+
runner = uv-venv-lock-runner
1012
extras = sqlalchemy
1113
dependency_groups = tests
14+
commands = pytest {posargs}
15+
16+
[testenv:py314-marshmallowdev]
17+
runner = uv-venv-runner
18+
deps = https://github.com/marshmallow-code/marshmallow/archive/dev.tar.gz
19+
20+
[testenv:py310-lowest]
21+
runner = uv-venv-runner
1222
deps =
13-
marshmallowdev: https://github.com/marshmallow-code/marshmallow/archive/dev.tar.gz
14-
lowest: marshmallow==4.0.0
15-
lowest: marshmallow-sqlalchemy==1.4.0
16-
lowest: flask-sqlalchemy==3.0.0
17-
lowest: flask==2.2
18-
lowest: werkzeug==2.2.2
23+
marshmallow==4.0.0
24+
marshmallow-sqlalchemy==1.4.0
25+
flask-sqlalchemy==3.0.0
26+
flask==2.2
27+
werkzeug==2.2.2
1928
; lowest version supported by marshmallow-sqlalchemy
20-
lowest: sqlalchemy==1.4.40
21-
commands = pytest {posargs}
29+
sqlalchemy==1.4.40
2230

2331
[testenv:lint]
24-
deps = pre-commit~=4.5.1
32+
dependency_groups = lint
2533
skip_install = true
2634
commands = pre-commit run --all-files
2735

@@ -32,12 +40,13 @@ commands = sphinx-build docs/ docs/_build {posargs}
3240
; Below tasks are for development only (not run in CI)
3341

3442
[testenv:docs-serve]
43+
runner = uv-venv-runner
3544
deps = sphinx-autobuild
3645
dependency_groups = docs
3746
commands = sphinx-autobuild --port=0 --open-browser --delay=2 docs/ docs/_build {posargs} --watch src --watch README.rst
3847

3948
[testenv:readme-serve]
49+
runner = uv-venv-runner
4050
deps = restview
4151
skip_install = true
4252
commands = restview README.rst
43-

uv.lock

Lines changed: 6 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)