<commit_before>[tox]
envlist = py27,py26,py34,py33,py35,py36,pypy,style,py26-bare,docs
minversion = 2.7.0

[testenv]
description = run the unit tests with pytest under the current Python env
setenv = COVERAGE_FILE=.coverage.{envname}
passenv = CI TRAVIS TRAVIS_*
deps = pytest >= 3.0.0
       pytest-cov
       pytest-timeout
       pytest-xdist
;NOTE --cov-config={toxinidir}/tox.ini is necessary until
;https://github.com/pytest-dev/pytest-cov/issues/168 is fixed
commands = pytest {posargs:tests} --cov-config={toxinidir}/tox.ini --cov={envsitepackagesdir}/tox --timeout=180

[testenv:dev]
description = DEV environment, if no posarg is specified: run pytest
# required to make looponfail reload on every source code change
usedevelop = True
commands = {posargs:py.test -s -x -f -v}

[testenv:docs]
description = invoke sphinx-build to build the HTML docs, check that URIs are valid
basepython = python
deps = sphinx >= 1.6.3, < 2
       towncrier >= 17.8.0
       {[testenv]deps}
passenv = http_proxy https_proxy no_proxy SSL_CERT_FILE
commands = sphinx-build -d {toxworkdir}/docs_doctree doc {toxworkdir}/docs_out --color -W -bhtml
           sphinx-build -d {toxworkdir}/docs_doctree doc {toxworkdir}/docs_out --color -W -blinkcheck

[testenv:fix-lint]
basepython = python3.6
deps = flake8 == 3.4.1
       flake8-bugbear == 17.4.0
       pre-commit == 1.0.1
description = run static analysis and style check using flake8
commands = python -m flake8 --show-source tox setup.py {posargs}
           python -m flake8 --show-source doc tests {posargs}
           pre-commit run --all-files
           echo "hint: run {envdir}/bin/pre-commit install" to add checks as pre-commit hook

[flake8]
max-complexity = 22
max-line-length = 99

[testenv:py26-bare]
description = invoke the tox help message under Python 2.6
install_command = pip install {opts} {packages}
list_dependencies_command = pip freeze
deps =
commands = tox -h

[testenv:py26]
install_command = pip install {opts} {packages}
list_dependencies_command = pip freeze

[testenv:X]
description = print the positional arguments passed in with echo
commands = echo {posargs}

[testenv:coverage]
description = [run locally after tests]: combine coverage data and create reports
skip_install = True
setenv = COVERAGE_FILE=.coverage
deps = coverage
commands = coverage erase
           coverage combine
           coverage xml
           coverage html

[testenv:codecov]
description = [only run on CI]: upload coverage data to codecov
;NOTE token should not be necesssary but seems to be on appveyor
setenv = {[testenv:coverage]setenv}
         CODECOV_TOKEN = 01eb408d-0640-4527-a5f6-9dfe30f9f2ba
deps = codecov
commands = codecov --required

[testenv:pra]
description = "personal release assistant" - see HOWTORELEASE.rst
skip_install = True
deps = devpi
       towncrier
       twine
commands = {toxinidir}/tasks/pra.sh {posargs}

[coverage:run]
branch = True
source = tox
omit = tox/__main__.py

[coverage:paths]
source = tox
         .tox/*/lib/python*/site-packages/tox
         .tox/pypy*/site-packages/tox

[coverage:report]
exclude_lines = if __name__ == ["']__main__["']:<commit_msg>passenv for all git related stuff to work properly<commit_after>[tox]
envlist = py27,py26,py34,py33,py35,py36,pypy,style,py26-bare,docs
minversion = 2.7.0

[testenv]
description = run the unit tests with pytest under the current Python env
setenv = COVERAGE_FILE=.coverage.{envname}
passenv = CI TRAVIS TRAVIS_*
deps = pytest >= 3.0.0
       pytest-cov
       pytest-timeout
       pytest-xdist
;NOTE --cov-config={toxinidir}/tox.ini is necessary until
;https://github.com/pytest-dev/pytest-cov/issues/168 is fixed
commands = pytest {posargs:tests} --cov-config={toxinidir}/tox.ini --cov={envsitepackagesdir}/tox --timeout=180

[testenv:dev]
description = DEV environment, if no posarg is specified: run pytest
# required to make looponfail reload on every source code change
usedevelop = True
commands = {posargs:py.test -s -x -f -v}

[testenv:docs]
description = invoke sphinx-build to build the HTML docs, check that URIs are valid
basepython = python
deps = sphinx >= 1.6.3, < 2
       towncrier >= 17.8.0
       {[testenv]deps}
passenv = http_proxy https_proxy no_proxy SSL_CERT_FILE
commands = sphinx-build -d {toxworkdir}/docs_doctree doc {toxworkdir}/docs_out --color -W -bhtml
           sphinx-build -d {toxworkdir}/docs_doctree doc {toxworkdir}/docs_out --color -W -blinkcheck

[testenv:fix-lint]
basepython = python3.6
deps = flake8 == 3.4.1
       flake8-bugbear == 17.4.0
       pre-commit == 1.0.1
description = run static analysis and style check using flake8
commands = python -m flake8 --show-source tox setup.py {posargs}
           python -m flake8 --show-source doc tests {posargs}
           pre-commit run --all-files
           echo "hint: run {envdir}/bin/pre-commit install" to add checks as pre-commit hook

[flake8]
max-complexity = 22
max-line-length = 99

[testenv:py26-bare]
description = invoke the tox help message under Python 2.6
install_command = pip install {opts} {packages}
list_dependencies_command = pip freeze
deps =
commands = tox -h

[testenv:py26]
install_command = pip install {opts} {packages}
list_dependencies_command = pip freeze

[testenv:X]
description = print the positional arguments passed in with echo
commands = echo {posargs}

[testenv:coverage]
description = [run locally after tests]: combine coverage data and create reports
skip_install = True
setenv = COVERAGE_FILE=.coverage
deps = coverage
commands = coverage erase
           coverage combine
           coverage xml
           coverage html

[testenv:codecov]
description = [only run on CI]: upload coverage data to codecov
;NOTE token should not be necesssary but seems to be on appveyor
setenv = {[testenv:coverage]setenv}
         CODECOV_TOKEN = 01eb408d-0640-4527-a5f6-9dfe30f9f2ba
deps = codecov
commands = codecov --required

[testenv:pra]
passenv = *
description = "personal release assistant" - see HOWTORELEASE.rst
skip_install = True
deps = devpi
       towncrier
       twine
commands = {toxinidir}/tasks/pra.sh {posargs}

[coverage:run]
branch = True
source = tox
omit = tox/__main__.py

[coverage:paths]
source = tox
         .tox/*/lib/python*/site-packages/tox
         .tox/pypy*/site-packages/tox

[coverage:report]
exclude_lines = if __name__ == ["']__main__["']:
{'fraction_non_alphanumeric': 0.1033233580091353, 'fraction_numerical': 0.025830839502283823, 'mean_word_length': 3.7317436661698955, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '688320', 'n_tokens_mistral': 2257, 'n_tokens_neox': 2118, 'n_words': 622}