<commit_before># a generative tox configuration, see
# https://testrun.org/tox/latest/config.html#generative-envlist

[tox]
envlist =
    clean,
    check,
    lint,
    {py27,py34}-notebook{40,41,42,4x},
    report,

[testenv]
basepython =
    pypy: {env:TOXPYTHON:pypy}
    py27: {env:TOXPYTHON:python2.7}
    py33: {env:TOXPYTHON:python3.3}
    py34: {env:TOXPYTHON:python3.4}
    py35: {env:TOXPYTHON:python3.5}
    {spell}: {env:TOXPYTHON:python2.7}
    {appveyorartifacts,bump,check,clean,codecov,condarecipe,coveralls,docs,lint,report,pypi_build,pypi_upload}: {env:TOXPYTHON:python3.4}
setenv =
    PYTHONPATH={toxinidir}/tests
    PYTHONUNBUFFERED=yes
passenv = *
usedevelop = false
deps =
    coverage>=4.2
    jupyter_highlight_selected_word>=0.0.5
    jupyter_latex_envs>=1.3.4
    mock
    nose
    notebook40: notebook>=4.0,<4.1
    notebook41: notebook>=4.1,<4.2
    notebook42: notebook>=4.2,<4.3
    notebook4x: https://github.com/jupyter/notebook/archive/4.x.zip
    notebookmaster: https://github.com/jupyter/notebook/archive/master.zip
    notebook: notebook
commands =
    {posargs:coverage run --source=src -m nose -vv tests}

[testenv:check]
skip_install = true
deps =
    check-manifest
    docutils
    pygments
    readme-renderer
commands =
    python setup.py check --strict --metadata --restructuredtext
    check-manifest {toxinidir}

[testenv:lint]
skip_install = true
deps =
    flake8
    isort
commands =
    flake8 src tests setup.py
    isort --verbose --check-only --diff --recursive src tests setup.py

[testenv:docs]
deps =
    -r{toxinidir}/docs/requirements.txt
commands =
    sphinx-build {posargs:-E} -T -b readthedocs -c docs/source . dist/docs
    sphinx-build {posargs:-E} -T -b linkcheck   -c docs/source . dist/docs

[testenv:spell]
skip_install = true
setenv =
    SPELLCHECK=1
deps =
    -r{toxinidir}/docs/requirements.txt
    pyenchant
    sphinxcontrib-spelling
commands =
    sphinx-build -b spelling docs dist/docs

[testenv:coveralls]
skip_install = true
deps =
    coverage>=4.2
    coveralls
commands =
    coverage combine --append
    coverage report
    coveralls []

[testenv:codecov]
skip_install = true
deps =
    coverage>=4.2
    codecov
commands =
    coverage combine --append
    coverage report
    coverage xml --ignore-errors
    codecov []

[testenv:appveyorartifacts]
skip_install = true
whitelist_externals = bash
deps =
    appveyor-artifacts
    coverage>=4.2
    coveralls
commands =
    appveyor-artifacts --owner-name=jcb91 --repo-name=ipython-notebook-extensions-ynb9f --mangle-coverage download
    ; tox doesn't run commands through a shell (makes windows inconsistent)
    ; So to get wildcard expansion, run through bash.
    ; Travis is the only place this env should be run, so it's ok to use bash.
    bash -c \"coverage combine --append */.coverage\"
    coverage report
    coveralls

[testenv:report]
skip_install = true
deps = coverage>=4.2
commands =
    coverage combine --append
    coverage report
    coverage html

[testenv:clean]
skip_install = true
deps = coverage>=4.2
commands = coverage erase

[testenv:bump]
skip_install = true
deps = bumpversion
whitelist_externals = git
commands =
    bumpversion {posargs:patch}
    python -c "import configparser as cp, subprocess as sp; b, c = 'bumpversion', cp.ConfigParser(); c.read('.'+b+'.cfg'); v = c[b]['current_version'].strip(); sp.call(['git', 'tag', '-a', v, '-m', v])"
    git describe

[testenv:pypi_build]
skip_install = true
commands = python setup.py sdist bdist_wheel

[testenv:pypi_upload]
skip_install = true
whitelist_externals = bash
deps = twine
commands = bash -c \"twine upload dist/*\"
<commit_msg>fix tox env pypi_upload we don't want to upload dist/docs, as it's not a package<commit_after># a generative tox configuration, see
# https://testrun.org/tox/latest/config.html#generative-envlist

[tox]
envlist =
    clean,
    check,
    lint,
    {py27,py34}-notebook{40,41,42,4x},
    report,

[testenv]
basepython =
    pypy: {env:TOXPYTHON:pypy}
    py27: {env:TOXPYTHON:python2.7}
    py33: {env:TOXPYTHON:python3.3}
    py34: {env:TOXPYTHON:python3.4}
    py35: {env:TOXPYTHON:python3.5}
    {spell}: {env:TOXPYTHON:python2.7}
    {appveyorartifacts,bump,check,clean,codecov,condarecipe,coveralls,docs,lint,report,pypi_build,pypi_upload}: {env:TOXPYTHON:python3.4}
setenv =
    PYTHONPATH={toxinidir}/tests
    PYTHONUNBUFFERED=yes
passenv = *
usedevelop = false
deps =
    coverage>=4.2
    jupyter_highlight_selected_word>=0.0.5
    jupyter_latex_envs>=1.3.4
    mock
    nose
    notebook40: notebook>=4.0,<4.1
    notebook41: notebook>=4.1,<4.2
    notebook42: notebook>=4.2,<4.3
    notebook4x: https://github.com/jupyter/notebook/archive/4.x.zip
    notebookmaster: https://github.com/jupyter/notebook/archive/master.zip
    notebook: notebook
commands =
    {posargs:coverage run --source=src -m nose -vv tests}

[testenv:check]
skip_install = true
deps =
    check-manifest
    docutils
    pygments
    readme-renderer
commands =
    python setup.py check --strict --metadata --restructuredtext
    check-manifest {toxinidir}

[testenv:lint]
skip_install = true
deps =
    flake8
    isort
commands =
    flake8 src tests setup.py
    isort --verbose --check-only --diff --recursive src tests setup.py

[testenv:docs]
deps =
    -r{toxinidir}/docs/requirements.txt
commands =
    sphinx-build {posargs:-E} -T -b readthedocs -c docs/source . dist/docs
    sphinx-build {posargs:-E} -T -b linkcheck   -c docs/source . dist/docs

[testenv:spell]
skip_install = true
setenv =
    SPELLCHECK=1
deps =
    -r{toxinidir}/docs/requirements.txt
    pyenchant
    sphinxcontrib-spelling
commands =
    sphinx-build -b spelling docs dist/docs

[testenv:coveralls]
skip_install = true
deps =
    coverage>=4.2
    coveralls
commands =
    coverage combine --append
    coverage report
    coveralls []

[testenv:codecov]
skip_install = true
deps =
    coverage>=4.2
    codecov
commands =
    coverage combine --append
    coverage report
    coverage xml --ignore-errors
    codecov []

[testenv:appveyorartifacts]
skip_install = true
whitelist_externals = bash
deps =
    appveyor-artifacts
    coverage>=4.2
    coveralls
commands =
    appveyor-artifacts --owner-name=jcb91 --repo-name=ipython-notebook-extensions-ynb9f --mangle-coverage download
    ; tox doesn't run commands through a shell (makes windows inconsistent)
    ; So to get wildcard expansion, run through bash.
    ; Travis is the only place this env should be run, so it's ok to use bash.
    bash -c \"coverage combine --append */.coverage\"
    coverage report
    coveralls

[testenv:report]
skip_install = true
deps = coverage>=4.2
commands =
    coverage combine --append
    coverage report
    coverage html

[testenv:clean]
skip_install = true
deps = coverage>=4.2
commands = coverage erase

[testenv:bump]
skip_install = true
deps = bumpversion
whitelist_externals = git
commands =
    bumpversion {posargs:patch}
    python -c "import configparser as cp, subprocess as sp; b, c = 'bumpversion', cp.ConfigParser(); c.read('.'+b+'.cfg'); v = c[b]['current_version'].strip(); sp.call(['git', 'tag', '-a', v, '-m', v])"
    git describe

[testenv:pypi_build]
skip_install = true
commands = python setup.py sdist bdist_wheel

[testenv:pypi_upload]
skip_install = true
whitelist_externals = bash
deps = twine
commands = bash -c \"twine upload dist/jupyter_contrib_nbextensions*\"

{'fraction_non_alphanumeric': 0.11747271992455881, 'fraction_numerical': 0.020207463289775022, 'mean_word_length': 3.594059405940594, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 25, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1124739', 'n_tokens_mistral': 2767, 'n_tokens_neox': 2702, 'n_words': 606}