mirror of
https://github.com/wassname/jupyter_contrib_nbextensions.git
synced 2026-08-14 12:30:27 +08:00
as otherwise coverage combine removes content of .coverage see https://bitbucket.org/ned/coveragepy/issues/511
145 lines
3.4 KiB
INI
145 lines
3.4 KiB
INI
# 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}
|
|
{docs,spell}: {env:TOXPYTHON:python2.7}
|
|
{appveyorartifacts,bump,check,clean,codecov,condarecipe,coveralls,lint,report,pypi_build,pypi_upload}: {env:TOXPYTHON:python3.4}
|
|
setenv =
|
|
PYTHONPATH={toxinidir}/tests
|
|
PYTHONUNBUFFERED=yes
|
|
passenv = *
|
|
usedevelop = false
|
|
deps =
|
|
coverage<4.2
|
|
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} -b html docs dist/docs
|
|
sphinx-build -b linkcheck docs 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
|
|
coverage report
|
|
coveralls []
|
|
|
|
[testenv:codecov]
|
|
skip_install = true
|
|
deps =
|
|
coverage<4.2
|
|
codecov
|
|
commands =
|
|
coverage combine
|
|
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 */.coverage\"
|
|
coverage report
|
|
coveralls
|
|
|
|
[testenv:report]
|
|
skip_install = true
|
|
deps = coverage<4.2
|
|
commands =
|
|
coverage combine
|
|
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/*\"
|