Skip to content

Commit c66aba9

Browse files
committed
Use a fully locked test environment
1 parent a59c5d7 commit c66aba9

File tree

3 files changed

+1633
-12
lines changed

3 files changed

+1633
-12
lines changed

pyproject.toml

+6-2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ cov = [
5050
# Ensure coverage is new enough for `source_pkgs`.
5151
"coverage[toml]>=5.3",
5252
]
53+
pyright = ["attrs[tests]", "pyright<1.1.380"]
5354
benchmark = ["pytest-codspeed", "pytest-xdist[psutil]", "attrs[tests]"]
5455
docs = [
5556
"cogapp",
@@ -59,10 +60,13 @@ docs = [
5960
"sphinx-notfound-page",
6061
"sphinxcontrib-towncrier",
6162
# See https://github.com/sphinx-contrib/sphinxcontrib-towncrier/issues/92
62-
# Pin also present in tox.ini
6363
"towncrier<24.7",
6464
]
65-
dev = ["attrs[tests]", "pre-commit"]
65+
docs-watch = [
66+
"attrs[docs]",
67+
"watchfiles",
68+
]
69+
dev = ["attrs[tests]"]
6670

6771
[project.urls]
6872
Documentation = "https://www.attrs.org/"

tox.ini

+11-10
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ pass_env = SETUPTOOLS_SCM_PRETEND_VERSION
1616

1717

1818
[testenv]
19+
runner = uv-venv-lock-runner
1920
package = wheel
2021
wheel_build_env = .pkg
2122
extras =
@@ -43,7 +44,7 @@ base_python = py312
4344
# Keep depends in-sync with testenv above that has cov extra.
4445
depends = py3{8,10,12}
4546
skip_install = true
46-
deps = coverage[toml]>=5.3
47+
extra = cov
4748
commands =
4849
coverage combine
4950
coverage report
@@ -61,6 +62,7 @@ commands = pytest --codspeed -n auto bench/test_benchmarks.py
6162

6263

6364
[testenv:docs]
65+
runner = uv-venv-lock-runner
6466
# Keep base_python in-sync with ci.yml/docs and .readthedocs.yaml.
6567
base_python = py312
6668
extras = docs
@@ -70,54 +72,53 @@ commands =
7072

7173

7274
[testenv:docs-watch]
73-
package = editable
7475
base_python = {[testenv:docs]base_python}
75-
extras = {[testenv:docs]extras}
76-
deps = watchfiles
76+
extras = docs-watch
7777
commands =
7878
watchfiles \
7979
--ignore-paths docs/_build/ \
8080
'sphinx-build -W -n --jobs auto -b html -d {envtmpdir}/doctrees docs docs/_build/html' \
81+
README.md \
8182
src \
8283
docs
8384

8485

8586
[testenv:docs-linkcheck]
86-
package = editable
8787
base_python = {[testenv:docs]base_python}
8888
extras = {[testenv:docs]extras}
8989
commands = sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees docs docs/_build/html
9090

9191

9292
[testenv:docs-sponsors]
93+
runner = uv-venv-runner
94+
skip_install = true
9395
description = Ensure sponsor logos are up to date.
9496
deps = cogapp
9597
commands = cog -rP README.md docs/index.md
9698

9799

98100
[testenv:pre-commit]
101+
runner = uv-venv-runner
99102
skip_install = true
100103
deps = pre-commit
101104
commands = pre-commit run --all-files
102105

103106

104107
[testenv:changelog]
105-
# See https://github.com/sphinx-contrib/sphinxcontrib-towncrier/issues/92
106-
# Pin also present in pyproject.toml
107-
deps = towncrier<24.7
108+
extras = docs
108109
skip_install = true
109110
commands =
110111
towncrier --version
111112
towncrier build --version main --draft
112113

113114

114115
[testenv:pyright]
115-
extras = tests
116-
deps = pyright<1.1.380
116+
extras = pyright
117117
commands = pytest tests/test_pyright.py -vv
118118

119119

120120
[testenv:docset]
121+
runner = uv-venv-runner
121122
deps = doc2dash
122123
extras = docs
123124
allowlist_externals =

0 commit comments

Comments
 (0)