]> git.proxmox.com Git - ceph.git/blame - ceph/src/pybind/mgr/tox.ini
buildsys: switch source download to quincy
[ceph.git] / ceph / src / pybind / mgr / tox.ini
CommitLineData
9f95a23c 1[tox]
f6b5b4d7
TL
2envlist =
3 py3,
4 mypy,
5 test,
6 fix
f67539c2 7 flake8
522d829b 8 jinjalint
9f95a23c 9skipsdist = true
1911f103 10requires = cython
9f95a23c 11
a4b75251
TL
12[pytest]
13log_level=NOTSET
14
f6b5b4d7
TL
15[flake8]
16max-line-length = 100
f67539c2
TL
17ignore =
18 E501,
19 W503,
f6b5b4d7
TL
20exclude =
21 .tox,
22 .vagrant,
23 __pycache__,
24 *.pyc,
25 templates,
26 .eggs
f67539c2 27statistics = True
f6b5b4d7
TL
28
29[autopep8]
30addopts =
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
38setenv =
39 UNITTEST = true
f67539c2 40 PYTHONPATH = $PYTHONPATH:..
1911f103
TL
41deps =
42 cython
43 -rrequirements.txt
44commands =
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
58setenv =
59 MYPYPATH = {toxinidir}/..
60passenv =
61 MYPYPATH
9f95a23c
TL
62basepython = python3
63deps =
1911f103
TL
64 cython
65 -rrequirements.txt
f67539c2 66 mypy==0.790
f6b5b4d7
TL
67commands =
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]
88setenv = {[testenv]setenv}
89deps = {[testenv]deps}
90commands = {[testenv]commands}
91
92[testenv:fix]
93basepython = python3
94deps =
95 autopep8
96commands =
97 python --version
98 autopep8 {[autopep8]addopts} {posargs: \
a4b75251 99 cephadm/ orchestrator/ nfs/}
f67539c2
TL
100
101[testenv:flake8]
102basepython = python3
103deps =
104 flake8
105modules =
106 cephadm
a4b75251 107 nfs
f67539c2
TL
108 orchestrator
109 prometheus
110commands =
111 flake8 --config=tox.ini {posargs} \
112 {posargs:{[testenv:flake8]modules}}
522d829b
TL
113
114[testenv:jinjalint]
115basepython = python3
116deps =
117 jinjaninja
118commands =
119 jinja-ninja cephadm/templates