Repository navigation
Expand file tree
/
Copy pathtox.ini
More file actions
74 lines (69 loc) · 2.67 KB
/
Copy pathtox.ini
File metadata and controls
74 lines (69 loc) · 2.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
[tox]
isolated_build = True
[testenv:linters]
# Linter versions are pinned so results don't drift as new releases land;
# bump deliberately and re-run `tox -e linters` (make format) when upgrading.
deps =
ruff==0.16.6
yamllint==1.38.0
commands =
# Formatting and linting both come from ruff. Its config lives in
# pyproject.toml under [tool.ruff], and the rule selection there is the one
# ported from the [flake8] block this replaces, all 48 of them.
ruff format --check ascender
ruff check ascender
yamllint -s .
[testenv:typecheck]
# Advisory: the type checker runs over ascender/ on every pull request and reports what
# it finds without failing the merge, so the diagnostics that are already there can
# be worked through a module at a time. It resolves third-party imports out of the
# environment awx is installed in, which is the venv baked into the development
# image; set TYPECHECK_PYTHON to run it against another one. Pinned like the other
# linters so results do not drift as new releases land.
deps =
ty==0.0.74
passenv =
TYPECHECK_PYTHON
commands =
ty check ascender awx --python {env:TYPECHECK_PYTHON:/var/lib/ascender/venv/ascender}
[testenv:typecheck-strict]
# The ratchet. typecheck above reports on the whole tree without failing, which
# is how the backlog gets worked through; this one fails, over the packages that
# are already clean, so they cannot quietly regress. Move a package up here the
# moment it reports nothing, and the advisory run keeps covering the rest.
deps =
{[testenv:typecheck]deps}
passenv =
TYPECHECK_PYTHON
commands =
ty check \
ascender/api/management \
ascender/conf/management \
ascender/conf/migrations \
ascender/dab/jwt_consumer/awx \
ascender/dab/jwt_consumer/migrations \
ascender/dab/lib/channels \
ascender/dab/lib/middleware \
ascender/dab/resource_registry/management \
ascender/dab/resource_registry/migrations \
ascender/dab/rest_filters \
ascender/main/templatetags \
ascender/sso/migrations \
--python {env:TYPECHECK_PYTHON:/var/lib/ascender/venv/ascender}
[testenv:pip-compile-docs]
description = Compile docs build lockfiles
deps =
uv
commands =
{envpython} -m uv pip compile \
--output-file=docs/docsite/requirements.txt \
docs/docsite/requirements.in \
{posargs:--upgrade}
[testenv:docs]
description = Build documentation
deps =
-r{toxinidir}/docs/docsite/requirements.in
-c{toxinidir}/docs/docsite/requirements.txt
commands =
python {toxinidir}/docs/docsite/rst/rest_api/_swagger/download-json.py
sphinx-build -T -E -W -n --keep-going {tty:--color} -j auto -c docs/docsite -d docs/docsite/build/doctrees -b html docs/docsite/rst docs/docsite/build/html