]> git.proxmox.com Git - ceph.git/blame - ceph/src/pybind/mgr/tox.ini
import 15.2.5
[ceph.git] / ceph / src / pybind / mgr / tox.ini
CommitLineData
9f95a23c 1[tox]
f6b5b4d7
TL
2envlist =
3 py3,
4 mypy,
5 test,
6 fix
9f95a23c 7skipsdist = true
1911f103 8requires = cython
9f95a23c 9
f6b5b4d7
TL
10[flake8]
11max-line-length = 100
12exclude =
13 .tox,
14 .vagrant,
15 __pycache__,
16 *.pyc,
17 templates,
18 .eggs
19
20[autopep8]
21addopts =
22 --max-line-length {[flake8]max-line-length}
23 --exclude "{[flake8]exclude}"
24 --in-place
25 --recursive
26 --ignore-local-config
27
9f95a23c 28[testenv]
1911f103
TL
29setenv =
30 UNITTEST = true
31 PYTHONPATH = ../../../build/lib/cython_modules/lib.3/
32 LD_LIBRARY_PATH = ../../../build/lib
33deps =
34 cython
35 -rrequirements.txt
36commands =
f6b5b4d7 37 pytest --cov --cov-append --cov-report= --doctest-modules {posargs: \
1911f103
TL
38 mgr_util.py \
39 tests/ \
40 cephadm/ \
41 orchestrator/ \
42 pg_autoscaler/ \
43 progress/}
9f95a23c
TL
44
45[testenv:mypy]
46basepython = python3
47deps =
1911f103
TL
48 cython
49 -rrequirements.txt
9f95a23c 50 mypy==0.770
f6b5b4d7
TL
51commands =
52 mypy --config-file=../../mypy.ini \
9f95a23c
TL
53 cephadm/module.py \
54 mgr_module.py \
55 dashboard/module.py \
f6b5b4d7 56 prometheus/module.py \
9f95a23c
TL
57 mgr_util.py \
58 orchestrator/__init__.py \
59 progress/module.py \
60 rook/module.py \
9f95a23c
TL
61 test_orchestrator/module.py \
62 volumes/__init__.py
f6b5b4d7
TL
63
64[testenv:test]
65setenv = {[testenv]setenv}
66deps = {[testenv]deps}
67commands = {[testenv]commands}
68
69[testenv:fix]
70basepython = python3
71deps =
72 autopep8
73commands =
74 python --version
75 autopep8 {[autopep8]addopts} {posargs: \
76 cephadm/ orchestrator/}