Files
awx/tox.ini
T
Hao LiuandClaude Fable 5.1 33a9eb7d15 Pin ruff to a compatible release (~=0.16.0) (#16694)
The Black -> Ruff migration (AAP-85334) installs a bare, unpinned
`ruff` in four places: requirements_dev.txt, both tox.ini linters
envs, and the devel image Dockerfile. CI's api-lint job resolves the
latest release on every run.

Ruff treats minor releases as breaking by policy: that is where the
yearly formatter style guide lands (0.9.0, 0.15.0) and where rules are
promoted or change behavior. Left unpinned, the next minor turns
unrelated PRs and quiet stable branches red with no code change.

Pin to ~=0.16.0 everywhere, and add `required-version` to
[tool.ruff] so a developer's mismatched local ruff (pre-commit.sh uses
whatever is on PATH) is refused instead of silently reformatting.

Patch releases within 0.16.x still flow, so bug fixes arrive without
a bump; the floor moves through a reviewed PR when 0.17 lands.


Claude-Session: https://claude.ai/code/session_011rb7ruHixj48khUNXxxqPG

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-02 13:22:24 -04:00

36 lines
991 B
INI

[tox]
isolated_build = True
[testenv:linters]
deps =
ruff~=0.16.0
yamllint
allowlist_externals = make
setenv =
PYTHON = python3
commands =
# awx_collection is excluded: ansible-test sanity runs its own linters which conflict with ruff
ruff format --check awx awxkit
ruff check awx awxkit
yamllint -s .
[testenv:pip-compile-docs]
description = Compile docs build lockfiles
deps =
# pip-tools config file support was introduced in v7
pip-tools >= 7
commands =
{envpython} -m piptools 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/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