Skip to content

Commit 3346a24

Browse files
committed
Update tox testing config for new directory structure
1 parent 8836283 commit 3346a24

File tree

4 files changed

+98
-36
lines changed

4 files changed

+98
-36
lines changed

.circleci/config.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
command: 'sudo pip install tox'
1616
- run:
1717
name: Test with tox
18-
command: 'tox -e py27-core'
18+
command: 'cd plotly-package; tox -e py27-core'
1919
no_output_timeout: 20m
2020

2121
python-3.5-core:
@@ -31,7 +31,7 @@ jobs:
3131
command: 'sudo pip install tox'
3232
- run:
3333
name: Test with tox
34-
command: 'tox -e py35-core'
34+
command: 'cd plotly-package; tox -e py35-core'
3535
no_output_timeout: 20m
3636

3737
python-3.6-core:
@@ -47,7 +47,7 @@ jobs:
4747
command: 'sudo pip install tox'
4848
- run:
4949
name: Test with tox
50-
command: 'tox -e py36-core'
50+
command: 'cd plotly-package; tox -e py36-core'
5151
no_output_timeout: 20m
5252

5353
python-3.7-core:
@@ -63,7 +63,7 @@ jobs:
6363
command: 'sudo pip install tox'
6464
- run:
6565
name: Test with tox
66-
command: 'tox -e py37-core'
66+
command: 'cd plotly-package; tox -e py37-core'
6767
no_output_timeout: 20m
6868

6969
# Optional
@@ -84,7 +84,7 @@ jobs:
8484
no_output_timeout: 20m
8585
- run:
8686
name: Test with tox
87-
command: 'tox -e py27-optional'
87+
command: 'cd plotly-package; tox -e py27-optional'
8888
no_output_timeout: 20m
8989

9090
python-3.5-optional:
@@ -104,7 +104,7 @@ jobs:
104104
no_output_timeout: 20m
105105
- run:
106106
name: Test with tox
107-
command: 'tox -e py35-optional'
107+
command: 'cd plotly-package; tox -e py35-optional'
108108
no_output_timeout: 20m
109109

110110
python-3.6-optional:
@@ -124,7 +124,7 @@ jobs:
124124
no_output_timeout: 20m
125125
- run:
126126
name: Test with tox
127-
command: 'tox -e py36-optional'
127+
command: 'cd plotly-package; tox -e py36-optional'
128128
no_output_timeout: 20m
129129

130130
python-3.7-optional:
@@ -144,7 +144,7 @@ jobs:
144144
no_output_timeout: 20m
145145
- run:
146146
name: Test with tox
147-
command: 'tox -e py37-optional'
147+
command: 'cd plotly-package; tox -e py37-optional'
148148
no_output_timeout: 20m
149149

150150
# Plot.ly
@@ -161,7 +161,7 @@ jobs:
161161
command: 'sudo pip install tox'
162162
- run:
163163
name: Test with tox
164-
command: 'tox -e py27-plot_ly'
164+
command: 'cd chart-studio-package; tox -e py27-plot_ly'
165165
no_output_timeout: 20m
166166

167167
python-3.5-plot_ly:
@@ -177,7 +177,7 @@ jobs:
177177
command: 'sudo pip install tox'
178178
- run:
179179
name: Test with tox
180-
command: 'tox -e py35-plot_ly'
180+
command: 'cd chart-studio-package; tox -e py35-plot_ly'
181181
no_output_timeout: 20m
182182

183183
python-3.7-plot_ly:
@@ -193,7 +193,7 @@ jobs:
193193
command: 'sudo pip install tox'
194194
- run:
195195
name: Test with tox
196-
command: 'tox -e py37-plot_ly'
196+
command: 'cd chart-studio-package; tox -e py37-plot_ly'
197197
no_output_timeout: 20m
198198

199199
python-2-7-orca:

chart-studio-package/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def readme():
1010

1111
setup(
1212
name="chart-studio",
13-
version="4.0.0a1",
13+
version="1.0.0a1",
1414
author="Chris P",
1515
author_email="[email protected]",
1616
maintainer="Jon Mease",

chart-studio-package/tox.ini

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
; Tox is a testing tool that manages virtualenvs for testing multiple Python
2+
; environments in a consistent/controlled way.
3+
4+
; SETTING ENVIRONMENT VARIABLES AND TOX TESTING VARIABLES
5+
;
6+
; You can limit tox testing to certain environments via the `-e` (envlist)
7+
; command line option:
8+
; tox -e py27-core,py34-core
9+
; OR, you can just set the `TOXENV` environment variable, which is handy:
10+
; TOXENV=py27-core,py34-core
11+
;
12+
; Integrating with the virtualenvs in Circle CI is a bit of a pain. For
13+
; whatever reason the "executable" `python35` (at the time of writing) cannot
14+
; be activated directly. Instead the circle.yml file specifies the actual
15+
; binary directly. Because of this, you too have to set the following env
16+
; variables:
17+
; PLOTLY_TOX_PYTHON_27=python2.7
18+
; PLOTLY_TOX_PYTHON_34=python3.4
19+
; ...
20+
; These will be specific to your machine and may not look like the ones above.
21+
; If you're not testing with all the python versions (see TOXENV above),
22+
; there's no need to install and map other versions.
23+
24+
; PASSING ADDITONAL ARGUMENTS TO TEST COMMANDS
25+
; The {posargs} is tox-specific and passes in any command line args after `--`.
26+
; For example, given the testing command in *this* file:
27+
; nosetests {posargs} -x plotly/tests/test_core
28+
;
29+
; The following command:
30+
; tox -- -a '!slow'
31+
;
32+
; Tells tox to call:
33+
; nosetests -a '!slow' -x plotly/tests/test_core
34+
;
35+
; Which is a nice way to skip slow tests for faster testing cycles.
36+
37+
[tox]
38+
; The py{A,B,C}-{X,Y} generates a matrix of envs:
39+
; pyA-X,pyA-Y,pyB-X,pyB-Y,pyC-X,pyC-Y
40+
envlist = py{27,34,37}-plot_ly
41+
42+
; Note that envs can be targeted by deps using the <target>: dep syntax.
43+
; Only one dep is allowed per line as of the time of writing. The <target>
44+
; can be a `-` (hyphen) concatenated string of the environments to target
45+
; with the given dep.
46+
47+
; These commands are general and will be run for *all* environments.
48+
[testenv]
49+
passenv=PLOTLY_TOX_*
50+
whitelist_externals=
51+
mkdir
52+
deps=
53+
coverage==4.3.1
54+
decorator==4.0.9
55+
mock==2.0.0
56+
nose==1.3.7
57+
requests==2.12.4
58+
six==1.10.0
59+
pytz==2016.10
60+
retrying==1.3.3
61+
pytest==3.5.1
62+
backports.tempfile==1.0
63+
plot_ly: pandas==0.23.2
64+
plot_ly: numpy==1.14.3
65+
plot_ly: ipywidgets==7.2.0
66+
plot_ly: matplotlib==2.2.3
67+
68+
; Plot.ly environments
69+
[testenv:py27-plot_ly]
70+
basepython={env:PLOTLY_TOX_PYTHON_27:}
71+
commands=
72+
python --version
73+
nosetests {posargs} -x chart_studio/tests/
74+
75+
[testenv:py35-plot_ly]
76+
basepython={env:PLOTLY_TOX_PYTHON_35:}
77+
commands=
78+
python --version
79+
nosetests {posargs} -x chart_studio/tests/
80+
81+
[testenv:py37-plot_ly]
82+
basepython={env:PLOTLY_TOX_PYTHON_37:}
83+
commands=
84+
python --version
85+
nosetests {posargs} -x chart_studio/tests/

tox.ini renamed to plotly-package/tox.ini

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
[tox]
3838
; The py{A,B,C}-{X,Y} generates a matrix of envs:
3939
; pyA-X,pyA-Y,pyB-X,pyB-Y,pyC-X,pyC-Y
40-
envlist = py{27,34,35,36,37}-{core,optional},py{27,34,37}-plot_ly
40+
envlist = py{27,34,35,36,37}-{core,optional},py{27,34,37}
4141

4242
; Note that envs can be targeted by deps using the <target>: dep syntax.
4343
; Only one dep is allowed per line as of the time of writing. The <target>
@@ -74,10 +74,6 @@ deps=
7474
optional: matplotlib==2.2.3
7575
optional: xarray==0.10.9
7676
optional: scikit-image==0.13.1
77-
plot_ly: pandas==0.23.2
78-
plot_ly: numpy==1.14.3
79-
plot_ly: ipywidgets==7.2.0
80-
plot_ly: matplotlib==2.2.3
8177

8278
; CORE ENVIRONMENTS
8379
[testenv:py27-core]
@@ -150,22 +146,3 @@ commands=
150146
nosetests {posargs} -x plotly/tests/test_optional
151147
pytest _plotly_utils/tests/
152148
pytest plotly/tests/test_io
153-
154-
; Plot.ly environments
155-
[testenv:py27-plot_ly]
156-
basepython={env:PLOTLY_TOX_PYTHON_27:}
157-
commands=
158-
python --version
159-
nosetests {posargs} -x chart_studio/tests/
160-
161-
[testenv:py35-plot_ly]
162-
basepython={env:PLOTLY_TOX_PYTHON_35:}
163-
commands=
164-
python --version
165-
nosetests {posargs} -x chart_studio/tests/
166-
167-
[testenv:py37-plot_ly]
168-
basepython={env:PLOTLY_TOX_PYTHON_37:}
169-
commands=
170-
python --version
171-
nosetests {posargs} -x chart_studio/tests/

0 commit comments

Comments
 (0)