forked from plotly/plotly.py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
173 lines (156 loc) · 5.26 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
; 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,36,37}-{core,optional},py{27,34,37}-plot_ly
; 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
pytest==3.5.1
backports.tempfile==1.0
optional: numpy==1.11.3
optional: ipython[all]==5.1.0
optional: ipywidgets==7.2.0
optional: ipykernel==4.8.2
optional: jupyter==1.0.0
optional: pandas==0.19.2
optional: scipy==0.18.1
optional: shapely==1.6.4
optional: geopandas==0.3.0
optional: pyshp==1.2.10
optional: pillow==5.2.0
optional: matplotlib==2.2.3
optional: xarray==0.10.9
optional: scikit-image==0.13.1
plot_ly: pandas==0.23.2
plot_ly: numpy==1.14.3
plot_ly: ipywidgets==7.2.0
plot_ly: matplotlib==2.2.3
; CORE ENVIRONMENTS
[testenv:py27-core]
basepython={env:PLOTLY_TOX_PYTHON_27:}
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
[testenv:py37-core]
basepython={env:PLOTLY_TOX_PYTHON_37:}
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:py27-optional]
basepython={env:PLOTLY_TOX_PYTHON_27:}
commands=
python --version
nosetests {posargs} -x plotly/tests/test_core
nosetests {posargs} -x plotly/tests/test_optional
pytest _plotly_utils/tests/
pytest plotly/tests/test_io
[testenv:py35-optional]
basepython={env:PLOTLY_TOX_PYTHON_35:}
commands=
python --version
nosetests {posargs} -x plotly/tests/test_core
nosetests {posargs} -x plotly/tests/test_optional
pytest _plotly_utils/tests/
pytest plotly/tests/test_io
[testenv:py36-optional]
basepython={env:PLOTLY_TOX_PYTHON_36:}
commands=
python --version
nosetests {posargs} -x plotly/tests/test_core
nosetests {posargs} -x plotly/tests/test_optional
pytest _plotly_utils/tests/
pytest plotly/tests/test_io
[testenv:py37-optional]
basepython={env:PLOTLY_TOX_PYTHON_37:}
commands=
python --version
nosetests {posargs} -x plotly/tests/test_core
nosetests {posargs} -x plotly/tests/test_optional
pytest _plotly_utils/tests/
pytest plotly/tests/test_io
; Plot.ly environments
[testenv:py27-plot_ly]
basepython={env:PLOTLY_TOX_PYTHON_27:}
commands=
python --version
nosetests {posargs} -x chart_studio/tests/
nosetests {posargs} -x plotly/tests/test_plot_ly
[testenv:py35-plot_ly]
basepython={env:PLOTLY_TOX_PYTHON_35:}
commands=
python --version
nosetests {posargs} -x chart_studio/tests/
[testenv:py37-plot_ly]
basepython={env:PLOTLY_TOX_PYTHON_37:}
commands=
python --version
nosetests {posargs} -x chart_studio/tests/
nosetests {posargs} -x plotly/tests/test_plot_ly