]>
Commit | Line | Data |
---|---|---|
9f95a23c | 1 | [tox] |
f6b5b4d7 TL |
2 | envlist = |
3 | py3, | |
4 | mypy, | |
5 | test, | |
6 | fix | |
f67539c2 | 7 | flake8 |
522d829b | 8 | jinjalint |
9f95a23c | 9 | skipsdist = true |
1911f103 | 10 | requires = cython |
9f95a23c | 11 | |
a4b75251 TL |
12 | [pytest] |
13 | log_level=NOTSET | |
14 | ||
f6b5b4d7 TL |
15 | [flake8] |
16 | max-line-length = 100 | |
f67539c2 TL |
17 | ignore = |
18 | E501, | |
19 | W503, | |
f6b5b4d7 TL |
20 | exclude = |
21 | .tox, | |
22 | .vagrant, | |
23 | __pycache__, | |
24 | *.pyc, | |
25 | templates, | |
26 | .eggs | |
f67539c2 | 27 | statistics = True |
f6b5b4d7 TL |
28 | |
29 | [autopep8] | |
30 | addopts = | |
31 | --max-line-length {[flake8]max-line-length} | |
32 | --exclude "{[flake8]exclude}" | |
33 | --in-place | |
34 | --recursive | |
35 | --ignore-local-config | |
36 | ||
9f95a23c | 37 | [testenv] |
1911f103 TL |
38 | setenv = |
39 | UNITTEST = true | |
f67539c2 | 40 | PYTHONPATH = $PYTHONPATH:.. |
1911f103 TL |
41 | deps = |
42 | cython | |
43 | -rrequirements.txt | |
44 | commands = | |
f67539c2 | 45 | pytest --doctest-modules {posargs: \ |
1911f103 TL |
46 | mgr_util.py \ |
47 | tests/ \ | |
48 | cephadm/ \ | |
f67539c2 | 49 | mds_autoscaler/ \ |
a4b75251 | 50 | nfs/ \ |
1911f103 | 51 | orchestrator/ \ |
f67539c2 | 52 | insights/ \ |
1911f103 | 53 | pg_autoscaler/ \ |
f67539c2 TL |
54 | progress/ \ |
55 | snap_schedule} | |
9f95a23c TL |
56 | |
57 | [testenv:mypy] | |
f67539c2 TL |
58 | setenv = |
59 | MYPYPATH = {toxinidir}/.. | |
60 | passenv = | |
61 | MYPYPATH | |
9f95a23c TL |
62 | basepython = python3 |
63 | deps = | |
1911f103 TL |
64 | cython |
65 | -rrequirements.txt | |
f67539c2 | 66 | mypy==0.790 |
f6b5b4d7 TL |
67 | commands = |
68 | mypy --config-file=../../mypy.ini \ | |
f67539c2 TL |
69 | -m cephadm \ |
70 | -m dashboard \ | |
71 | -m devicehealth \ | |
72 | -m mds_autoscaler \ | |
73 | -m mgr_module \ | |
74 | -m mgr_util \ | |
75 | -m mirroring \ | |
a4b75251 | 76 | -m nfs \ |
f67539c2 | 77 | -m orchestrator \ |
522d829b | 78 | -m pg_autoscaler \ |
f67539c2 TL |
79 | -m progress \ |
80 | -m prometheus \ | |
81 | -m rook \ | |
82 | -m snap_schedule \ | |
83 | -m stats \ | |
84 | -m test_orchestrator \ | |
85 | -m volumes | |
f6b5b4d7 TL |
86 | |
87 | [testenv:test] | |
88 | setenv = {[testenv]setenv} | |
89 | deps = {[testenv]deps} | |
90 | commands = {[testenv]commands} | |
91 | ||
92 | [testenv:fix] | |
93 | basepython = python3 | |
94 | deps = | |
95 | autopep8 | |
96 | commands = | |
97 | python --version | |
98 | autopep8 {[autopep8]addopts} {posargs: \ | |
a4b75251 | 99 | cephadm/ orchestrator/ nfs/} |
f67539c2 TL |
100 | |
101 | [testenv:flake8] | |
102 | basepython = python3 | |
103 | deps = | |
104 | flake8 | |
105 | modules = | |
106 | cephadm | |
a4b75251 | 107 | nfs |
f67539c2 TL |
108 | orchestrator |
109 | prometheus | |
110 | commands = | |
111 | flake8 --config=tox.ini {posargs} \ | |
112 | {posargs:{[testenv:flake8]modules}} | |
522d829b TL |
113 | |
114 | [testenv:jinjalint] | |
115 | basepython = python3 | |
116 | deps = | |
117 | jinjaninja | |
118 | commands = | |
119 | jinja-ninja cephadm/templates |