forked from plotly/plotly.py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
128 lines (114 loc) · 3.86 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
; Tox is a testing tool that manages virtualenvs for testing multiple Python
; environments in a consistent/controlled way.
; SETTING ENVIRONMENT VARIABLES AND TOX TESTING VARIABLES
;
; You can limit tox testing to certain environments via the `-e` (envlist)
; command line option:
; tox -e py27-core,py34-core
; OR, you can just set the `TOXENV` environment variable, which is handy:
; TOXENV=py27-core,py34-core
;
; Integrating with the virtualenvs in Circle CI is a bit of a pain. For
; whatever reason the "executable" `python35` (at the time of writing) cannot
; be activated directly. Instead the circle.yml file specifies the actual
; binary directly. Because of this, you too have to set the following env
; variables:
; PLOTLY_TOX_PYTHON_27=python2.7
; PLOTLY_TOX_PYTHON_34=python3.4
; ...
; These will be specific to your machine and may not look like the ones above.
; If you're not testing with all the python versions (see TOXENV above),
; there's no need to install and map other versions.
; PASSING ADDITONAL ARGUMENTS TO TEST COMMANDS
; The {posargs} is tox-specific and passes in any command line args after `--`.
; For example, given the testing command in *this* file:
; nosetests {posargs} -x plotly/tests/test_core
;
; The following command:
; tox -- -a '!slow'
;
; Tells tox to call:
; nosetests -a '!slow' -x plotly/tests/test_core
;
; Which is a nice way to skip slow tests for faster testing cycles.
[tox]
; The py{A,B,C}-{X,Y} generates a matrix of envs:
; pyA-X,pyA-Y,pyB-X,pyB-Y,pyC-X,pyC-Y
envlist = py{27,34,35}-{core,optional},py33-core
; Note that envs can be targeted by deps using the <target>: dep syntax.
; Only one dep is allowed per line as of the time of writing. The <target>
; can be a `-` (hyphen) concatenated string of the environments to target
; with the given dep.
; These commands are general and will be run for *all* environments.
[testenv]
passenv=PLOTLY_TOX_*
whitelist_externals=
mkdir
deps=
coverage==4.3.1
decorator==4.0.9
mock==2.0.0
nose==1.3.7
requests==2.12.4
six==1.10.0
pytz==2016.10
retrying==1.3.3
optional: numpy==1.11.3
optional: ipython[all]==5.1.0
optional: jupyter==1.0.0
optional: pandas==0.19.2
optional: scipy==0.18.1
optional: shapely==1.6.3
optional: geopandas==0.3.0
optional: pyshp==1.2.10
; CORE ENVIRONMENTS
[testenv:py27-core]
basepython={env:PLOTLY_TOX_PYTHON_27:}
commands=
python --version
nosetests {posargs} -x plotly/tests/test_core
[testenv:py33-core]
basepython={env:PLOTLY_TOX_PYTHON_33:}
commands=
python --version
nosetests {posargs} -x plotly/tests/test_core
[testenv:py34-core]
basepython={env:PLOTLY_TOX_PYTHON_34:}
commands=
python --version
nosetests {posargs} -x plotly/tests/test_core
[testenv:py35-core]
basepython={env:PLOTLY_TOX_PYTHON_35:}
commands=
python --version
nosetests {posargs} -x plotly/tests/test_core
[testenv:py36-core]
basepython={env:PLOTLY_TOX_PYTHON_36:}
commands=
python --version
nosetests {posargs} -x plotly/tests/test_core
; OPTIONAL ENVIRONMENTS
[testenv:py27-optional]
basepython={env:PLOTLY_TOX_PYTHON_27:}
commands=
python --version
; Do some coverage reporting. No need to do this for all environments.
mkdir -p {envbindir}/../../coverage-reports/{envname}
coverage erase
coverage run --include="*/plotly/*" --omit="*/tests*" {envbindir}/nosetests {posargs} -x plotly/tests
coverage html -d "{envbindir}/../../coverage-reports/{envname}" --title={envname}
[testenv:py34-optional]
basepython={env:PLOTLY_TOX_PYTHON_34:}
commands=
python --version
nosetests {posargs} -x plotly/tests
[testenv:py35-optional]
basepython={env:PLOTLY_TOX_PYTHON_35:}
commands=
python --version
nosetests {posargs} -x plotly/tests
[testenv:py36-optional]
basepython={env:PLOTLY_TOX_PYTHON_36:}
commands=
python --version
nosetests {posargs} -x plotly/tests