| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
requires = ["tox>=4.21", "tox-gh-actions"] |
| 7 |
env_list = [ |
| 8 |
"clean", |
| 9 |
"lint", |
| 10 |
"type", |
| 11 |
"py310", |
| 12 |
"py311", |
| 13 |
"py312", |
| 14 |
"py313", |
| 15 |
"py314", |
| 16 |
"report" |
| 17 |
] |
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
[gh-actions] |
| 22 |
python = """ |
| 23 |
3.10: py310 |
| 24 |
3.11: clean, py311, report |
| 25 |
3.12: py312 |
| 26 |
3.13: py313 |
| 27 |
3.14: py314 |
| 28 |
""" |
| 29 |
|
| 30 |
[env_run_base] |
| 31 |
description = "Run pytest with {basepython}" |
| 32 |
extras = ["cli"] |
| 33 |
dependency_groups = ["dev"] |
| 34 |
|
| 35 |
commands = [["pytest", { replace = "posargs", extend = true }]] |
| 36 |
|
| 37 |
|
| 38 |
passenv = ["USERNAME"] |
| 39 |
|
| 40 |
set_env = { COLUMNS = "165"} |
| 41 |
|
| 42 |
[env.lint] |
| 43 |
description = "Check the code style" |
| 44 |
commands =[ |
| 45 |
["ruff", "check", "."], |
| 46 |
["ruff", "format", ".", "--check"], |
| 47 |
["pylint", "anta"], |
| 48 |
["pylint", "tests"], |
| 49 |
["pylint", "asynceapi"], |
| 50 |
] |
| 51 |
|
| 52 |
[env.type] |
| 53 |
description = "Check typing" |
| 54 |
commands =[ |
| 55 |
["pyright", "anta"], |
| 56 |
["pyright", "tests"], |
| 57 |
["pyright", "asynceapi"], |
| 58 |
] |
| 59 |
|
| 60 |
[env.clean] |
| 61 |
skip_install=true |
| 62 |
description = "Clean existing coverage" |
| 63 |
commands =[ |
| 64 |
["coverage", "erase"], |
| 65 |
] |
| 66 |
|
| 67 |
[env.report] |
| 68 |
description = "Generate coverage report" |
| 69 |
skip_install=true |
| 70 |
deps = ["coverage[toml]"] |
| 71 |
commands = [ |
| 72 |
["coverage", "--version"], |
| 73 |
["coverage", "html", "--rcfile=pyproject.toml"], |
| 74 |
["coverage", "xml", "--rcfile=pyproject.toml"], |
| 75 |
] |
| 76 |
depends = ["py311"] |