]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/tox.ini
import 15.2.5
[ceph.git] / ceph / src / pybind / mgr / tox.ini
index e6a902a74763fe11765ae46adf6312dd767472b3..3e129ba64eb16a422358678aa3e1fd42f52bdc69 100644 (file)
@@ -1,8 +1,30 @@
 [tox]
-envlist = py3, mypy
+envlist =
+    py3,
+    mypy,
+    test,
+    fix
 skipsdist = true
 requires = cython
 
+[flake8]
+max-line-length = 100
+exclude =
+    .tox,
+    .vagrant,
+    __pycache__,
+    *.pyc,
+    templates,
+    .eggs
+
+[autopep8]
+addopts =
+    --max-line-length {[flake8]max-line-length}
+    --exclude "{[flake8]exclude}"
+    --in-place
+    --recursive
+    --ignore-local-config
+
 [testenv]
 setenv =
     UNITTEST = true
@@ -12,7 +34,7 @@ deps =
     cython
     -rrequirements.txt
 commands =
-    pytest -v --cov --cov-append --cov-report= --doctest-modules {posargs: \
+    pytest --cov --cov-append --cov-report= --doctest-modules {posargs: \
         mgr_util.py \
         tests/ \
         cephadm/ \
@@ -26,14 +48,29 @@ deps =
     cython
     -rrequirements.txt
     mypy==0.770
-commands = mypy --config-file=../../mypy.ini \
+commands =
+    mypy --config-file=../../mypy.ini \
            cephadm/module.py \
            mgr_module.py \
            dashboard/module.py \
+           prometheus/module.py \
            mgr_util.py \
            orchestrator/__init__.py \
            progress/module.py \
            rook/module.py \
-           osd_support/module.py \
            test_orchestrator/module.py \
            volumes/__init__.py
+
+[testenv:test]
+setenv = {[testenv]setenv}
+deps = {[testenv]deps}
+commands = {[testenv]commands}
+
+[testenv:fix]
+basepython = python3
+deps =
+    autopep8
+commands =
+    python --version
+    autopep8 {[autopep8]addopts} {posargs: \
+        cephadm/ orchestrator/}