9
9
- checkout
10
10
- run :
11
11
name : Install black
12
- command : ' sudo pip install black'
12
+ command : " sudo pip install black"
13
13
- run :
14
14
name : Check formatting with black
15
- command : ' black --check .'
15
+ command : " black --check ."
16
16
17
17
# Core
18
18
python-2.7-core :
@@ -25,10 +25,10 @@ jobs:
25
25
- checkout
26
26
- run :
27
27
name : Install tox
28
- command : ' sudo pip install tox'
28
+ command : " sudo pip install tox"
29
29
- run :
30
30
name : Test with tox
31
- command : ' cd packages/python/plotly; tox -e py27-core'
31
+ command : " cd packages/python/plotly; tox -e py27-core"
32
32
no_output_timeout : 20m
33
33
34
34
python-3.5-core :
@@ -41,10 +41,10 @@ jobs:
41
41
- checkout
42
42
- run :
43
43
name : Install tox
44
- command : ' sudo pip install tox'
44
+ command : " sudo pip install tox"
45
45
- run :
46
46
name : Test with tox
47
- command : ' cd packages/python/plotly; tox -e py35-core'
47
+ command : " cd packages/python/plotly; tox -e py35-core"
48
48
no_output_timeout : 20m
49
49
50
50
python-3.6-core :
@@ -57,10 +57,10 @@ jobs:
57
57
- checkout
58
58
- run :
59
59
name : Install tox
60
- command : ' sudo pip install tox'
60
+ command : " sudo pip install tox"
61
61
- run :
62
62
name : Test with tox
63
- command : ' cd packages/python/plotly; tox -e py36-core'
63
+ command : " cd packages/python/plotly; tox -e py36-core"
64
64
no_output_timeout : 20m
65
65
66
66
python-3.7-core :
@@ -73,10 +73,10 @@ jobs:
73
73
- checkout
74
74
- run :
75
75
name : Install tox
76
- command : ' sudo pip install tox'
76
+ command : " sudo pip install tox"
77
77
- run :
78
78
name : Test with tox
79
- command : ' cd packages/python/plotly; tox -e py37-core'
79
+ command : " cd packages/python/plotly; tox -e py37-core"
80
80
no_output_timeout : 20m
81
81
82
82
python-3.7-percy :
@@ -122,14 +122,10 @@ jobs:
122
122
- checkout
123
123
- run :
124
124
name : Install tox
125
- command : ' sudo pip install tox'
126
- - run :
127
- name : Install npm dependencies
128
- command : cd packages/python/plotly/plotly/tests/test_optional/test_jupyter && npm install
129
- no_output_timeout : 20m
125
+ command : " sudo pip install tox"
130
126
- run :
131
127
name : Test with tox
132
- command : ' cd packages/python/plotly; tox -e py27-optional'
128
+ command : " cd packages/python/plotly; tox -e py27-optional"
133
129
no_output_timeout : 20m
134
130
135
131
python-3.5-optional :
@@ -142,14 +138,10 @@ jobs:
142
138
- checkout
143
139
- run :
144
140
name : Install tox
145
- command : ' sudo pip install tox'
146
- - run :
147
- name : Install npm dependencies
148
- command : cd packages/python/plotly/plotly/tests/test_optional/test_jupyter && npm install
149
- no_output_timeout : 20m
141
+ command : " sudo pip install tox"
150
142
- run :
151
143
name : Test with tox
152
- command : ' cd packages/python/plotly; tox -e py35-optional'
144
+ command : " cd packages/python/plotly; tox -e py35-optional"
153
145
no_output_timeout : 20m
154
146
155
147
python-3.6-optional :
@@ -162,14 +154,10 @@ jobs:
162
154
- checkout
163
155
- run :
164
156
name : Install tox
165
- command : ' sudo pip install tox'
166
- - run :
167
- name : Install npm dependencies
168
- command : cd packages/python/plotly/plotly/tests/test_optional/test_jupyter && npm install
169
- no_output_timeout : 20m
157
+ command : " sudo pip install tox"
170
158
- run :
171
159
name : Test with tox
172
- command : ' cd packages/python/plotly; tox -e py36-optional'
160
+ command : " cd packages/python/plotly; tox -e py36-optional"
173
161
no_output_timeout : 20m
174
162
175
163
python-3.7-optional :
@@ -182,14 +170,10 @@ jobs:
182
170
- checkout
183
171
- run :
184
172
name : Install tox
185
- command : ' sudo pip install tox'
186
- - run :
187
- name : Install npm dependencies
188
- command : cd packages/python/plotly/plotly/tests/test_optional/test_jupyter && npm install
189
- no_output_timeout : 20m
173
+ command : " sudo pip install tox"
190
174
- run :
191
175
name : Test with tox
192
- command : ' cd packages/python/plotly; tox -e py37-optional'
176
+ command : " cd packages/python/plotly; tox -e py37-optional"
193
177
no_output_timeout : 20m
194
178
195
179
# Plot.ly
@@ -203,10 +187,10 @@ jobs:
203
187
- checkout
204
188
- run :
205
189
name : Install tox
206
- command : ' sudo pip install tox'
190
+ command : " sudo pip install tox"
207
191
- run :
208
192
name : Test with tox
209
- command : ' cd packages/python/chart-studio; tox -e py27-plot_ly'
193
+ command : " cd packages/python/chart-studio; tox -e py27-plot_ly"
210
194
no_output_timeout : 20m
211
195
212
196
python-3.5-plot_ly :
@@ -219,10 +203,10 @@ jobs:
219
203
- checkout
220
204
- run :
221
205
name : Install tox
222
- command : ' sudo pip install tox'
206
+ command : " sudo pip install tox"
223
207
- run :
224
208
name : Test with tox
225
- command : ' cd packages/python/chart-studio; tox -e py35-plot_ly'
209
+ command : " cd packages/python/chart-studio; tox -e py35-plot_ly"
226
210
no_output_timeout : 20m
227
211
228
212
python-3.7-plot_ly :
@@ -235,10 +219,10 @@ jobs:
235
219
- checkout
236
220
- run :
237
221
name : Install tox
238
- command : ' sudo pip install tox'
222
+ command : " sudo pip install tox"
239
223
- run :
240
224
name : Test with tox
241
- command : ' cd packages/python/chart-studio; tox -e py37-plot_ly'
225
+ command : " cd packages/python/chart-studio; tox -e py37-plot_ly"
242
226
no_output_timeout : 20m
243
227
244
228
python-2-7-orca :
@@ -269,7 +253,7 @@ jobs:
269
253
pytest packages/python/plotly/plotly/tests/test_orca
270
254
271
255
- store_artifacts :
272
- path : plotly/tests/test_orca/images/linux/failed
256
+ path : plotly/tests/test_orca/images/linux/failed
273
257
274
258
python-3-5-orca :
275
259
docker :
@@ -299,7 +283,7 @@ jobs:
299
283
pytest packages/python/plotly/plotly/tests/test_orca
300
284
301
285
- store_artifacts :
302
- path : plotly/tests/test_orca/images/linux/failed
286
+ path : plotly/tests/test_orca/images/linux/failed
303
287
304
288
python-3-7-orca :
305
289
docker :
@@ -325,11 +309,12 @@ jobs:
325
309
command : |
326
310
. /home/circleci/miniconda/etc/profile.d/conda.sh
327
311
conda activate circle_optional
312
+ pytest --doctest-modules --ignore packages/python/plotly/plotly/tests --ignore packages/python/plotly/plotly/matplotlylib/mplexporter/tests packages/python/plotly/plotly
328
313
pytest --disable-warnings packages/python/plotly/plotly/tests/test_core
329
314
pytest packages/python/plotly/plotly/tests/test_orca
330
315
331
316
- store_artifacts :
332
- path : plotly/tests/test_orca/images/linux/failed
317
+ path : plotly/tests/test_orca/images/linux/failed
333
318
334
319
plotlyjs_dev_build :
335
320
docker :
@@ -342,13 +327,13 @@ jobs:
342
327
- checkout
343
328
- run :
344
329
name : Install tox
345
- command : ' sudo pip install retrying tox black inflect'
330
+ command : " sudo pip install retrying tox black inflect"
346
331
- run :
347
332
name : Update jupyterlab-plotly version
348
- command : ' cd packages/python/plotly; python setup.py updateplotlywidgetversion'
333
+ command : " cd packages/python/plotly; python setup.py updateplotlywidgetversion"
349
334
- run :
350
335
name : Update plotly.js to dev
351
- command : ' cd packages/python/plotly; python setup.py updateplotlyjsdev'
336
+ command : " cd packages/python/plotly; python setup.py updateplotlyjsdev"
352
337
- run :
353
338
name : Test with tox
354
339
command : |
@@ -384,6 +369,122 @@ jobs:
384
369
- store_artifacts :
385
370
path : packages/python/plotly/dist
386
371
372
+ build-doc :
373
+ resource_class : xlarge
374
+ docker :
375
+ # specify the version you desire here
376
+ # use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers`
377
+ - image : circleci/python:3.6.8-node
378
+
379
+ working_directory : ~/project
380
+
381
+ steps :
382
+ - add_ssh_keys :
383
+ fingerprints :
384
+ - " dc:5f:39:48:00:b4:72:34:e1:d2:c4:e1:1f:d1:e2:ce" # plotlydocbot
385
+
386
+ - checkout
387
+
388
+ # Download and cache dependencies
389
+ - restore_cache :
390
+ keys :
391
+ - v1-dependencies-{{ checksum "doc/requirements.txt" }}
392
+ # fallback to using the latest cache if no exact match is found
393
+ - v1-dependencies-
394
+
395
+ - run :
396
+ name : install dependencies
397
+ command : |
398
+ cd doc
399
+ python3 -m venv venv
400
+ . venv/bin/activate
401
+
402
+ npm install orca
403
+ pip uninstall -y plotly
404
+ pip install -r requirements.txt
405
+ if [ "${CIRCLE_BRANCH}" != "doc-prod" ]; then
406
+ pip uninstall -y plotly
407
+ cd ../packages/python/plotly
408
+ python3 setup.py install
409
+ cd ../../../doc
410
+ fi
411
+ echo 'export PATH="/home/circleci/project/doc/node_modules/.bin:$PATH"' >> $BASH_ENV
412
+ sudo apt-get install -y poppler-utils libxtst6 xvfb libgtk2.0-0 libgconf-2-4 libnss3 libasound2
413
+ cd ..
414
+
415
+ - save_cache :
416
+ paths :
417
+ - ./doc/venv
418
+ - ./doc/node_modules
419
+ key : v1-dependencies-{{ checksum "doc/requirements.txt" }}
420
+
421
+ - run :
422
+ name : make html
423
+ command : |
424
+ cd doc
425
+ . venv/bin/activate
426
+ echo ${mapbox_token} > python/.mapbox_token
427
+ make -kj8 || make -kj8
428
+ curl https://raw.githubusercontent.com/plotly/documentation/source-design-merge/front-matter-ci.py > front-matter-ci.py
429
+ curl https://raw.githubusercontent.com/plotly/documentation/source-design-merge/check-or-enforce-order.py > check-or-enforce-order.py
430
+ python front-matter-ci.py build/html
431
+ python check-or-enforce-order.py build/html
432
+ if [ "${CIRCLE_BRANCH}" == "doc-prod" ]; then
433
+ cd build/html
434
+ git init
435
+ git config user.name plotlydocbot
436
+ git config user.email [email protected]
437
+ git add *
438
+ git commit -m "build of https://github.com/plotly/plotly.py/commit/${CIRCLE_SHA1}"
439
+ git push --force [email protected] :plotly/plotly.py-docs.git master:built
440
+ rm -rf .git
441
+ cd ../..
442
+ fi
443
+ tar -zcf build/html.tgz build/html
444
+ rm -rf build/html build/ipynb
445
+ cd ..
446
+
447
+ - run :
448
+ name : trigger doc build
449
+ command : |
450
+ if [ "${CIRCLE_BRANCH}" == "doc-prod" ]; then
451
+ git clone --depth=1 --branch=source-design-merge https://github.com/plotly/documentation.git
452
+ cd documentation
453
+ git config user.name plotlydocbot
454
+ git config user.email [email protected]
455
+ git commit --allow-empty -m "deploying https://github.com/plotly/plotly.py/commit/${CIRCLE_SHA1}"
456
+ git push
457
+ cd ..
458
+ rm -rf documentation
459
+ fi
460
+
461
+ - run :
462
+ name : make doc
463
+ command : |
464
+ cd doc
465
+ . venv/bin/activate
466
+ cd apidoc
467
+ make html
468
+ if [ "${CIRCLE_BRANCH}" == "doc-prod" ]; then
469
+ cd _build/html
470
+ touch .nojekyll
471
+ git init
472
+ git config user.name plotlydocbot
473
+ git config user.email [email protected]
474
+ git add *
475
+ git add .nojekyll
476
+ git commit -m "build of https://github.com/plotly/plotly.py/commit/${CIRCLE_SHA1}"
477
+ git push --force [email protected] :plotly/plotly.py-docs.git master:gh-pages
478
+ rm -rf .git
479
+ cd ../..
480
+ fi
481
+
482
+ cd ../..
483
+
484
+ - store_artifacts :
485
+ path : doc/build
486
+ destination : doc/build
487
+
387
488
workflows :
388
489
version : 2
389
490
code_formatting :
@@ -412,3 +513,4 @@ workflows:
412
513
- python-2-7-orca
413
514
- python-3-5-orca
414
515
- python-3-7-orca
516
+ - build-doc
0 commit comments