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