<commit_before>[tox]
envlist =
    py36
    py37
    py38
    pypy3

    build
    readme
    safety
    secrets
    style

    pex
    shiv

    docs-{dirhtml,doctest,linkcheck,spelling,style}
skipsdist = True

[testenv]
setenv =
changedir = {envtmpdir}
passenv = HYPOTHESIS_PROFILE
commands =
    {envpython} -m pip install {toxinidir}
    {envpython} -m virtue {posargs:venvs}
    {envpython} -m doctest {toxinidir}/README.rst
deps =
    -r{toxinidir}/test-requirements.txt
    virtue

    codecov,coverage: coverage
    codecov: codecov

[testenv:coverage]
basepython = pypy
setenv =
    {[testenv]setenv}
    COVERAGE_DEBUG_FILE={envtmpdir}/coverage-debug
    COVERAGE_FILE={envtmpdir}/coverage-data
commands =
    {envpython} -m pip install {toxinidir}
    {envpython} -m coverage run --rcfile={toxinidir}/.coveragerc -m virtue venvs
    {envpython} -m coverage report --rcfile={toxinidir}/.coveragerc --show-missing
    {envpython} -m coverage html --directory={envtmpdir}/htmlcov --rcfile={toxinidir}/.coveragerc {posargs}

[testenv:build]
deps = pep517
commands =
    {envpython} -m pep517.check {toxinidir}

[testenv:bandit]
deps = bandit
commands = {envpython} -m bandit --recursive venvs

[testenv:readme]
deps =
    pep517
    twine
commands =
    {envpython} -m pep517.build --out-dir {envtmpdir}/dist {toxinidir}
    {envpython} -m twine check {envtmpdir}/dist/*

[testenv:safety]
deps = safety
commands =
    {envpython} -m pip install {toxinidir}
    {envpython} -m safety check

[testenv:secrets]
deps = detect-secrets
commands = {envbindir}/detect-secrets scan {toxinidir}

[testenv:style]
deps = flake8
commands = {envbindir}/flake8 {posargs} --max-complexity 10 {toxinidir}/venvs

[testenv:docs-dirhtml]
commands = {envpython} -m sphinx -b dirhtml {toxinidir}/docs/ {envtmpdir}/build {posargs:-a -n -q -T -W}
deps =
    -r{toxinidir}/docs/requirements.txt
    {toxinidir}

[testenv:docs-doctest]
commands = {envpython} -m sphinx -b doctest {toxinidir}/docs/ {envtmpdir}/build {posargs:-a -n -q -T -W}
deps =
    -r{toxinidir}/docs/requirements.txt
    {toxinidir}

[testenv:docs-linkcheck]
commands = {envpython} -m sphinx -b linkcheck {toxinidir}/docs/ {envtmpdir}/build {posargs:-a -n -q -T -W}
deps =
    -r{toxinidir}/docs/requirements.txt
    {toxinidir}

[testenv:docs-spelling]
commands = {envpython} -m sphinx -b spelling {toxinidir}/docs/ {envtmpdir}/build {posargs:-a -n -T -W}
deps =
    -r{toxinidir}/docs/requirements.txt
    {toxinidir}

[testenv:docs-style]
commands = doc8 {posargs} {toxinidir}/docs
deps =
    doc8
    pygments
    pygments-github-lexers

[testenv:codecov]
passenv = CODECOV* CI
setenv =
    {[testenv]setenv}
    COVERAGE_DEBUG_FILE={envtmpdir}/coverage-debug
    COVERAGE_FILE={envtmpdir}/coverage-data
commands =
    {envpython} -m pip install {toxinidir}
    {envpython} -m coverage run --rcfile={toxinidir}/.coveragerc -m virtue venvs
    {envpython} -m coverage xml -o {envtmpdir}/coverage.xml
    {envpython} -m codecov --required --disable gcov --file {envtmpdir}/coverage.xml

[testenv:pex]
basepython = python3.8
passenv = C_INCLUDE_PATH LDFLAGS
commands =
    {envbindir}/pex {toxinidir} --entry-point venvs --output-file {toxinidir}/dist/venvs {posargs}
deps = pex

[testenv:shiv]
basepython = python3.7
whitelist_externals = mkdir<commit_msg>Build shiv on 3.8 too.<commit_after>[tox]
envlist =
    py36
    py37
    py38
    pypy3

    build
    readme
    safety
    secrets
    style

    pex
    shiv

    docs-{dirhtml,doctest,linkcheck,spelling,style}
skipsdist = True

[testenv]
setenv =
changedir = {envtmpdir}
passenv = <PASSWORD>
commands =
    {envpython} -m pip install {toxinidir}
    {envpython} -m virtue {posargs:venvs}
    {envpython} -m doctest {toxinidir}/README.rst
deps =
    -r{toxinidir}/test-requirements.txt
    virtue

    codecov,coverage: coverage
    codecov: codecov

[testenv:coverage]
basepython = pypy
setenv =
    {[testenv]setenv}
    COVERAGE_DEBUG_FILE={envtmpdir}/coverage-debug
    COVERAGE_FILE={envtmpdir}/coverage-data
commands =
    {envpython} -m pip install {toxinidir}
    {envpython} -m coverage run --rcfile={toxinidir}/.coveragerc -m virtue venvs
    {envpython} -m coverage report --rcfile={toxinidir}/.coveragerc --show-missing
    {envpython} -m coverage html --directory={envtmpdir}/htmlcov --rcfile={toxinidir}/.coveragerc {posargs}

[testenv:build]
deps = pep517
commands =
    {envpython} -m pep517.check {toxinidir}

[testenv:bandit]
deps = bandit
commands = {envpython} -m bandit --recursive venvs

[testenv:readme]
deps =
    pep517
    twine
commands =
    {envpython} -m pep517.build --out-dir {envtmpdir}/dist {toxinidir}
    {envpython} -m twine check {envtmpdir}/dist/*

[testenv:safety]
deps = safety
commands =
    {envpython} -m pip install {toxinidir}
    {envpython} -m safety check

[testenv:secrets]
deps = detect-secrets
commands = {envbindir}/detect-secrets scan {toxinidir}

[testenv:style]
deps = flake8
commands = {envbindir}/flake8 {posargs} --max-complexity 10 {toxinidir}/venvs

[testenv:docs-dirhtml]
commands = {envpython} -m sphinx -b dirhtml {toxinidir}/docs/ {envtmpdir}/build {posargs:-a -n -q -T -W}
deps =
    -r{toxinidir}/docs/requirements.txt
    {toxinidir}

[testenv:docs-doctest]
commands = {envpython} -m sphinx -b doctest {toxinidir}/docs/ {envtmpdir}/build {posargs:-a -n -q -T -W}
deps =
    -r{toxinidir}/docs/requirements.txt
    {toxinidir}

[testenv:docs-linkcheck]
commands = {envpython} -m sphinx -b linkcheck {toxinidir}/docs/ {envtmpdir}/build {posargs:-a -n -q -T -W}
deps =
    -r{toxinidir}/docs/requirements.txt
    {toxinidir}

[testenv:docs-spelling]
commands = {envpython} -m sphinx -b spelling {toxinidir}/docs/ {envtmpdir}/build {posargs:-a -n -T -W}
deps =
    -r{toxinidir}/docs/requirements.txt
    {toxinidir}

[testenv:docs-style]
commands = doc8 {posargs} {toxinidir}/docs
deps =
    doc8
    pygments
    pygments-github-lexers

[testenv:codecov]
passenv = CODECOV* CI
setenv =
    {[testenv]setenv}
    COVERAGE_DEBUG_FILE={envtmpdir}/coverage-debug
    COVERAGE_FILE={envtmpdir}/coverage-data
commands =
    {envpython} -m pip install {toxinidir}
    {envpython} -m coverage run --rcfile={toxinidir}/.coveragerc -m virtue venvs
    {envpython} -m coverage xml -o {envtmpdir}/coverage.xml
    {envpython} -m codecov --required --disable gcov --file {envtmpdir}/coverage.xml

[testenv:pex]
basepython = python3.8
passenv = C_INCLUDE_PATH LDFLAGS
commands =
    {envbindir}/pex {toxinidir} --entry-point venvs --output-file {toxinidir}/dist/venvs {posargs}
deps = pex

[testenv:shiv]
basepython = python3.8
whitelist_externals = mkdir
{'fraction_non_alphanumeric': 0.1326083673161154, 'fraction_numerical': 0.009062075215224286, 'mean_word_length': 3.7131672597864767, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '688308', 'n_tokens_mistral': 2716, 'n_tokens_neox': 2559, 'n_words': 547}