| 1 | [tox] |
| 2 | minversion = 4.1 |
| 3 | envlist = |
| 4 | ruff |
| 5 | format |
| 6 | mypy |
| 7 | functional |
| 8 | isolated_build = True |
| 9 | |
| 10 | [defs] |
| 11 | pyfiles = |
| 12 | python/temptest |
| 13 | |
| 14 | [testenv:ruff] |
| 15 | skip_install = True |
| 16 | tags = |
| 17 | check |
| 18 | ruff |
| 19 | quick |
| 20 | deps = |
| 21 | -r requirements/ruff.txt |
| 22 | commands = |
| 23 | ruff check -- {[defs]pyfiles} |
| 24 | |
| 25 | [testenv:format] |
| 26 | skip_install = True |
| 27 | tags = |
| 28 | check |
| 29 | quick |
| 30 | deps = |
| 31 | -r requirements/ruff.txt |
| 32 | commands = |
| 33 | ruff check --config ruff-base.toml --select=D,I --diff -- {[defs]pyfiles} |
| 34 | ruff format --config ruff-base.toml --check --diff -- {[defs]pyfiles} |
| 35 | |
| 36 | [testenv:reformat] |
| 37 | skip_install = True |
| 38 | tags = |
| 39 | format |
| 40 | manual |
| 41 | deps = |
| 42 | -r requirements/ruff.txt |
| 43 | commands = |
| 44 | ruff check --config ruff-base.toml --select=D,I --fix -- {[defs]pyfiles} |
| 45 | ruff format --config ruff-base.toml -- {[defs]pyfiles} |
| 46 | |
| 47 | [testenv:mypy] |
| 48 | skip_install = True |
| 49 | tags = |
| 50 | check |
| 51 | deps = |
| 52 | -r requirements/install.txt |
| 53 | mypy >= 1, < 2 |
| 54 | setenv = |
| 55 | MYPYPATH = {toxinidir}/stubs |
| 56 | commands = |
| 57 | mypy {[defs]pyfiles} |
| 58 | |
| 59 | [testenv:pyupgrade] |
| 60 | skip_install = True |
| 61 | tags = |
| 62 | check |
| 63 | manual |
| 64 | deps = |
| 65 | pyupgrade >= 3, < 4 |
| 66 | allowlist_externals = |
| 67 | sh |
| 68 | commands = |
| 69 | sh -c 'pyupgrade --py311-plus python/temptest/*.py' |
| 70 | |
| 71 | [testenv:functional] |
| 72 | tags = |
| 73 | tests |
| 74 | deps = |
| 75 | -r requirements/install.txt |
| 76 | commands = |
| 77 | temptest -v --srcdir ../.. --pybuild ../../.pybuild |