-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathtox.ini
132 lines (119 loc) · 3.12 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# a generative tox configuration, see
# https://testrun.org/tox/latest/config.html#generative-envlist
[tox]
envlist =
clean,
check,
lint,
py36-notebook{57,64},
report,
[testenv]
basepython =
pypy: {env:TOXPYTHON:pypy}
py36: {env:TOXPYTHON:python3.6}
{docs,spell}: {env:TOXPYTHON:python3.6}
{appveyorartifacts,bump,check,clean,codecov,coveralls,lint,report,pypi_build,pypi_upload}: {env:TOXPYTHON:python3.6}
{condarecipe}: {env:TOXPYTHON:python3.6}
setenv =
PYTHONPATH={toxinidir}/tests
PYTHONUNBUFFERED=yes
passenv = *
usedevelop = false
deps =
coverage>=4.2
mock
nose
notebook57: notebook==5.7
notebook64: notebook==6.4
notebookmaster: https://github.com/jupyter/notebook/archive/master.zip
notebook: notebook
pytest
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:coveralls]
skip_install = true
deps =
coverage>=6.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>=6.2
coveralls
commands =
appveyor-artifacts --owner-name=jcb91 --repo-name=jupyter-contrib-core --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>=6.2
commands =
coverage combine --append
coverage report
coverage html
[testenv:clean]
skip_install = true
deps = coverage>=6.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:condarecipe]
; install of conda itself is handled in travis for CI tests
whitelist_externals = conda
commands =
conda build conda.recipe/
conda install --use-local jupyter_contrib_core
[testenv:pypi_build]
skip_install = true
deps =
commands = python setup.py sdist bdist_wheel
[testenv:pypi_upload]
skip_install = true
whitelist_externals = bash
deps = twine
; do this via bash to get shell wildcard completion
commands = bash -c \"twine upload dist/*\"