-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathtox.toml
More file actions
105 lines (97 loc) · 1.97 KB
/
tox.toml
File metadata and controls
105 lines (97 loc) · 1.97 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# Copyright 2025 Canonical Ltd.
# See LICENSE file for licensing details.
skipsdist = true
skip_missing_interpreters = true
requires = [ "tox>=4.21" ]
no_package = true
[env_run_base]
passenv = [ "PYTHONPATH", "CHARM_BUILD_DIR", "MODEL_SETTINGS" ]
runner = "uv-venv-lock-runner"
[env_run_base.setenv]
PYTHONPATH = "{toxinidir}:{toxinidir}/lib:{[vars]src_path}"
PYTHONBREAKPOINT = "ipdb.set_trace"
PY_COLORS = "1"
[env.fmt]
description = "Apply coding style standards to code"
commands = [
[
"ruff",
"check",
"--fix",
"--select",
"I",
{ replace = "ref", of = [
"vars",
"all_path",
], extend = true },
],
[
"ruff",
"format",
{ replace = "ref", of = [
"vars",
"all_path",
], extend = true },
],
]
dependency_groups = [ "fmt" ]
[env.lint]
description = "Check code against coding style standards"
commands = [
[
"codespell",
"{toxinidir}",
],
[
"ruff",
"format",
"--check",
"--diff",
{ replace = "ref", of = [
"vars",
"all_path",
], extend = true },
],
[
"ruff",
"check",
{ replace = "ref", of = [
"vars",
"all_path",
], extend = true },
],
[
"mypy",
{ replace = "ref", of = [
"vars",
"all_path",
], extend = true },
],
]
dependency_groups = [ "lint" ]
[env.integration]
description = "Run integration tests"
commands = [
[
"pytest",
"-v",
"--tb",
"native",
"--ignore={[vars]tst_path}unit",
"--ignore={toxinidir}/haproxy-ddos-protection-configurator",
"--ignore={toxinidir}/haproxy-spoe-auth-operator",
"--ignore={toxinidir}/haproxy-operator",
"--ignore={toxinidir}/haproxy-route-policy",
"--ignore={toxinidir}/haproxy-route-policy-operator",
"--log-cli-level=INFO",
"-s",
{ replace = "posargs", extend = "true" },
],
]
dependency_groups = [ "integration" ]
[vars]
src_path = "{toxinidir}/src/"
tst_path = "{toxinidir}/tests/"
all_path = [
"{toxinidir}/tests/",
]