tox.ini (2201B)
1 [tox] 2 envlist = {py27,py35,py36,py37,py38}{,-cov,-diffcov},qa,docs,perf 3 skip_missing_interpreters = True 4 minversion = 3.2 5 # Ensure that a late version of pip is used even on tox-venv. 6 requires = 7 tox-pip-version>=0.0.6 8 9 [testenv] 10 pip_version = pip 11 commands = 12 !cov,!diffcov: python -m unittest discover {posargs} 13 cov,diffcov: python -m coverage run {[coverage]rc} -m unittest discover {posargs} 14 cov,diffcov: python -m coverage combine {[coverage]rc} 15 cov: python -m coverage html {[coverage]rc} 16 cov: python -m coverage xml {[coverage]rc} 17 cov: python -m coverage report -m {[coverage]rc} --fail-under=100 18 diffcov: python -m coverage xml {[coverage]rc} 19 diffcov: diff-cover coverage.xml --html-report diffcov.html 20 diffcov: diff-cover coverage.xml --fail-under=100 21 usedevelop = True 22 passenv = 23 PYTHON* 24 LANG* 25 LC_* 26 PYV 27 deps = 28 cov,diffcov: coverage>=4.5 29 diffcov: diff_cover 30 pyfakefs 31 setenv = 32 cov: COVERAGE_PROCESS_START={[coverage]rcfile} 33 cov: COVERAGE_OPTIONS="-p" 34 cov: COVERAGE_FILE={toxinidir}/.coverage 35 py27: PYV=2 36 py35,py36,py37,py38: PYV=3 37 # workaround deprecation warnings in pip's vendored packages 38 PYTHONWARNINGS=ignore:Using or importing the ABCs:DeprecationWarning:pip._vendor 39 extras = 40 testing 41 42 43 [testenv:qa] 44 basepython = python3.7 45 commands = 46 python -m flake8 importlib_metadata 47 mypy importlib_metadata 48 deps = 49 mypy 50 flake8 51 flufl.flake8 52 extras = 53 54 55 [testenv:docs] 56 basepython = python3 57 commands = 58 sphinx-build docs build/sphinx/html 59 extras = 60 docs 61 62 63 [testenv:perf] 64 use_develop = False 65 deps = 66 ipython 67 commands = 68 python -m timeit -s 'import importlib_metadata' -- 'importlib_metadata.distribution("ipython")' 69 70 71 [testenv:release] 72 basepython = python3 73 deps = 74 twine 75 wheel 76 setuptools 77 keyring 78 setuptools_scm 79 passenv = 80 TWINE_PASSWORD 81 setenv = 82 TWINE_USERNAME = {env:TWINE_USERNAME:__token__} 83 commands = 84 python setup.py sdist bdist_wheel 85 python -m twine {posargs} upload dist/* 86 87 88 [coverage] 89 rcfile = {toxinidir}/coverage.ini 90 rc = --rcfile="{[coverage]rcfile}" 91 92 93 [flake8] 94 hang-closing = True 95 jobs = 1 96 max-line-length = 79 97 enable-extensions = U4