[tox] envlist = py3, mypy, test, fix flake8 jinjalint skipsdist = true requires = cython [pytest] log_level=NOTSET [flake8] max-line-length = 100 ignore = E501, W503, exclude = .tox, .vagrant, __pycache__, *.pyc, templates, .eggs statistics = True [autopep8] addopts = --max-line-length {[flake8]max-line-length} --exclude "{[flake8]exclude}" --in-place --recursive --ignore-local-config [testenv] setenv = UNITTEST = true PYTHONPATH = $PYTHONPATH:.. deps = cython -rrequirements.txt commands = pytest --doctest-modules {posargs: \ mgr_util.py \ tests/ \ cephadm/ \ mds_autoscaler/ \ nfs/ \ orchestrator/ \ insights/ \ pg_autoscaler/ \ progress/ \ snap_schedule} [testenv:mypy] setenv = MYPYPATH = {toxinidir}/.. passenv = MYPYPATH basepython = python3 deps = cython -rrequirements.txt mypy==0.790 commands = mypy --config-file=../../mypy.ini \ -m cephadm \ -m dashboard \ -m devicehealth \ -m mds_autoscaler \ -m mgr_module \ -m mgr_util \ -m mirroring \ -m nfs \ -m orchestrator \ -m pg_autoscaler \ -m progress \ -m prometheus \ -m rook \ -m snap_schedule \ -m stats \ -m test_orchestrator \ -m volumes [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/ nfs/} [testenv:flake8] basepython = python3 deps = flake8 modules = cephadm nfs orchestrator prometheus commands = flake8 --config=tox.ini {posargs} \ {posargs:{[testenv:flake8]modules}} [testenv:jinjalint] basepython = python3 deps = jinjaninja commands = jinja-ninja cephadm/templates