-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
/
Copy pathconfig.yml
516 lines (462 loc) · 15 KB
/
config.yml
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
version: 2
jobs:
check-code-formatting:
docker:
- image: circleci/python:3.7-stretch-node-browsers
steps:
- checkout
- run:
name: Install black
command: "sudo pip install black"
- run:
name: Check formatting with black
command: "black --check ."
# Core
python-2.7-core:
docker:
- image: circleci/python:2.7-stretch-node-browsers
environment:
PLOTLY_TOX_PYTHON_27: python2.7
steps:
- checkout
- run:
name: Install tox
command: "sudo pip install tox"
- run:
name: Test with tox
command: "cd packages/python/plotly; tox -e py27-core"
no_output_timeout: 20m
python-3.5-core:
docker:
- image: circleci/python:3.5-stretch-node-browsers
environment:
PLOTLY_TOX_PYTHON_35: python3.5
steps:
- checkout
- run:
name: Install tox
command: "sudo pip install tox"
- run:
name: Test with tox
command: "cd packages/python/plotly; tox -e py35-core"
no_output_timeout: 20m
python-3.6-core:
docker:
- image: circleci/python:3.6-stretch-node-browsers
environment:
PLOTLY_TOX_PYTHON_36: python3.6
steps:
- checkout
- run:
name: Install tox
command: "sudo pip install tox"
- run:
name: Test with tox
command: "cd packages/python/plotly; tox -e py36-core"
no_output_timeout: 20m
python-3.7-core:
docker:
- image: circleci/python:3.7-stretch-node-browsers
environment:
PLOTLY_TOX_PYTHON_37: python3.7
steps:
- checkout
- run:
name: Install tox
command: "sudo pip install tox"
- run:
name: Test with tox
command: "cd packages/python/plotly; tox -e py37-core"
no_output_timeout: 20m
python-3.7-percy:
docker:
- image: circleci/python:3.7-stretch-node-browsers
environment:
PERCY_ENABLED: True
PERCY_PROJECT: plotly/plotly.py
steps:
- checkout
- run:
name: Inject Percy Environment variables
command: |
echo 'export PERCY_TOKEN="$PERCY_PYTHON_TOKEN_V0"' >> $BASH_ENV
- run:
name: Install requirements
command: |
sudo pip install --upgrade virtualenv
python -m venv venv || virtualenv venv
. venv/bin/activate
pip install -e ./packages/python/plotly
- run:
name: Build html figures
command: |
. venv/bin/activate
pip install pandas statsmodels --quiet
python test/percy/plotly-express.py
- run:
name: Run percy snapshots
command: |
npx percy snapshot test/percy/
rm test/percy/*.html
# Optional
python-2.7-optional:
docker:
- image: circleci/python:2.7-stretch-node-browsers
environment:
PLOTLY_TOX_PYTHON_27: python2.7
steps:
- checkout
- run:
name: Install tox
command: "sudo pip install tox"
- run:
name: Test with tox
command: "cd packages/python/plotly; tox -e py27-optional"
no_output_timeout: 20m
python-3.5-optional:
docker:
- image: circleci/python:3.5-stretch-node-browsers
environment:
PLOTLY_TOX_PYTHON_35: python3.5
steps:
- checkout
- run:
name: Install tox
command: "sudo pip install tox"
- run:
name: Test with tox
command: "cd packages/python/plotly; tox -e py35-optional"
no_output_timeout: 20m
python-3.6-optional:
docker:
- image: circleci/python:3.6-stretch-node-browsers
environment:
PLOTLY_TOX_PYTHON_36: python3.6
steps:
- checkout
- run:
name: Install tox
command: "sudo pip install tox"
- run:
name: Test with tox
command: "cd packages/python/plotly; tox -e py36-optional"
no_output_timeout: 20m
python-3.7-optional:
docker:
- image: circleci/python:3.7-stretch-node-browsers
environment:
PLOTLY_TOX_PYTHON_37: python3.7
steps:
- checkout
- run:
name: Install tox
command: "sudo pip install tox"
- run:
name: Test with tox
command: "cd packages/python/plotly; tox -e py37-optional"
no_output_timeout: 20m
# Plot.ly
python-2.7-plot_ly:
docker:
- image: circleci/python:2.7-stretch-node-browsers
environment:
PLOTLY_TOX_PYTHON_27: python2.7
steps:
- checkout
- run:
name: Install tox
command: "sudo pip install tox"
- run:
name: Test with tox
command: "cd packages/python/chart-studio; tox -e py27-plot_ly"
no_output_timeout: 20m
python-3.5-plot_ly:
docker:
- image: circleci/python:3.5-stretch-node-browsers
environment:
PLOTLY_TOX_PYTHON_35: python3.5
steps:
- checkout
- run:
name: Install tox
command: "sudo pip install tox"
- run:
name: Test with tox
command: "cd packages/python/chart-studio; tox -e py35-plot_ly"
no_output_timeout: 20m
python-3.7-plot_ly:
docker:
- image: circleci/python:3.7-stretch-node-browsers
environment:
PLOTLY_TOX_PYTHON_37: python3.7
steps:
- checkout
- run:
name: Install tox
command: "sudo pip install tox"
- run:
name: Test with tox
command: "cd packages/python/chart-studio; tox -e py37-plot_ly"
no_output_timeout: 20m
python-2-7-orca:
docker:
- image: circleci/node:10.9-stretch-browsers
environment:
PYTHON_VERSION: 2.7
steps:
- checkout
- restore_cache:
keys:
- conda-27-v1-{{ checksum ".circleci/create_conda_optional_env.sh" }}
- run:
name: Create conda environment
command: .circleci/create_conda_optional_env.sh
- save_cache:
key: conda-27-v1-{{ checksum ".circleci/create_conda_optional_env.sh" }}
paths:
- /home/circleci/miniconda/
- run:
name: Run Tests
command: |
. /home/circleci/miniconda/etc/profile.d/conda.sh
conda activate circle_optional
pytest --disable-warnings packages/python/plotly/plotly/tests/test_core
pytest packages/python/plotly/plotly/tests/test_orca
- store_artifacts:
path: plotly/tests/test_orca/images/linux/failed
python-3-5-orca:
docker:
- image: circleci/node:10.9-stretch-browsers
environment:
PYTHON_VERSION: 3.5
steps:
- checkout
- restore_cache:
keys:
- conda-35-v1-{{ checksum ".circleci/create_conda_optional_env.sh" }}
- run:
name: Create conda environment
command: .circleci/create_conda_optional_env.sh
- save_cache:
key: conda-35-v1-{{ checksum ".circleci/create_conda_optional_env.sh" }}
paths:
- /home/circleci/miniconda/
- run:
name: Run Tests
command: |
. /home/circleci/miniconda/etc/profile.d/conda.sh
conda activate circle_optional
pytest --disable-warnings packages/python/plotly/plotly/tests/test_core
pytest packages/python/plotly/plotly/tests/test_orca
- store_artifacts:
path: plotly/tests/test_orca/images/linux/failed
python-3-7-orca:
docker:
- image: circleci/node:10.9-stretch-browsers
environment:
PYTHON_VERSION: 3.7
steps:
- checkout
- restore_cache:
keys:
- conda-37-v1-{{ checksum ".circleci/create_conda_optional_env.sh" }}
- run:
name: Create conda environment
command: .circleci/create_conda_optional_env.sh
- save_cache:
key: conda-37-v1-{{ checksum ".circleci/create_conda_optional_env.sh" }}
paths:
- /home/circleci/miniconda/
- run:
name: Run Tests
command: |
. /home/circleci/miniconda/etc/profile.d/conda.sh
conda activate circle_optional
pytest --doctest-modules --ignore packages/python/plotly/plotly/tests --ignore packages/python/plotly/plotly/matplotlylib/mplexporter/tests packages/python/plotly/plotly
pytest --disable-warnings packages/python/plotly/plotly/tests/test_core
pytest packages/python/plotly/plotly/tests/test_orca
- store_artifacts:
path: plotly/tests/test_orca/images/linux/failed
plotlyjs_dev_build:
docker:
- image: circleci/python:3.7-stretch-node-browsers
environment:
PLOTLY_TOX_PYTHON_37: python3.7
LANG: en_US.UTF-8
steps:
- checkout
- run:
name: Install tox
command: "sudo pip install retrying tox black inflect"
- run:
name: Update jupyterlab-plotly version
command: "cd packages/python/plotly; python setup.py updateplotlywidgetversion"
- run:
name: Update plotly.js to dev
command: "cd packages/python/plotly; python setup.py updateplotlyjsdev"
- run:
name: Test with tox
command: |
cd packages/python/plotly
locale
tox -e py37-core -- -k 'not nodev'
no_output_timeout: 20m
- run:
name: Commit
command: |
cd packages/python/plotly
sudo mkdir /dist
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
git add -A
git commit -m "Codegen"
when: always
- run:
name: Build source distribution packages
command: |
cd packages/python/plotly
python setup.py sdist
sudo cp dist/* /dist
when: always
- run:
name: npm-pack widget
command: |
cd packages/javascript/jupyterlab-plotly/
npm install webpack
npm pack
sudo cp ./jupyterlab-plotly* /dist
when: always
- store_artifacts:
path: packages/python/plotly/dist
build-doc:
resource_class: xlarge
docker:
# specify the version you desire here
# use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers`
- image: circleci/python:3.6.8-node
working_directory: ~/project
steps:
- add_ssh_keys:
fingerprints:
- "dc:5f:39:48:00:b4:72:34:e1:d2:c4:e1:1f:d1:e2:ce" #plotlydocbot
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "doc/requirements.txt" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run:
name: install dependencies
command: |
cd doc
python3 -m venv venv
. venv/bin/activate
npm install [email protected]
npm install orca
pip uninstall -y plotly
pip install -r requirements.txt
if [ "${CIRCLE_BRANCH}" != "doc-prod" ]; then
pip uninstall -y plotly
cd ../packages/python/plotly
python3 setup.py install
cd ../../../doc
fi
echo 'export PATH="/home/circleci/project/doc/node_modules/.bin:$PATH"' >> $BASH_ENV
sudo apt-get install -y poppler-utils libxtst6 xvfb libgtk2.0-0 libgconf-2-4 libnss3 libasound2
cd ..
- save_cache:
paths:
- ./doc/venv
- ./doc/node_modules
key: v1-dependencies-{{ checksum "doc/requirements.txt" }}
- run:
name: make html
command: |
cd doc
. venv/bin/activate
echo ${mapbox_token} > python/.mapbox_token
make -kj8 || make -kj8
curl https://raw.githubusercontent.com/plotly/graphing-library-docs/master/front-matter-ci.py > front-matter-ci.py
curl https://raw.githubusercontent.com/plotly/graphing-library-docs/master/check-or-enforce-order.py > check-or-enforce-order.py
python front-matter-ci.py build/html
python check-or-enforce-order.py build/html
if [ "${CIRCLE_BRANCH}" == "doc-prod" ]; then
cd build/html
git init
git config user.name plotlydocbot
git config user.email [email protected]
git add *
git commit -m "build of https://github.com/plotly/plotly.py/commit/${CIRCLE_SHA1}"
git push --force [email protected]:plotly/plotly.py-docs.git master:built
rm -rf .git
cd ../..
fi
tar -zcf build/html.tgz build/html
rm -rf build/html build/ipynb
cd ..
- run:
name: trigger doc build
command: |
if [ "${CIRCLE_BRANCH}" == "doc-prod" ]; then
git clone --depth=1 https://github.com/plotly/graphing-library-docs.git
cd graphing-library-docs
git config user.name plotlydocbot
git config user.email [email protected]
git commit --allow-empty -m "deploying https://github.com/plotly/plotly.py/commit/${CIRCLE_SHA1}"
git push
cd ..
rm -rf graphing-library-docs
fi
- run:
name: make doc
command: |
cd doc
. venv/bin/activate
cd apidoc
make html
if [ "${CIRCLE_BRANCH}" == "doc-prod" ]; then
cd _build/html
touch .nojekyll
git init
git config user.name plotlydocbot
git config user.email [email protected]
git add *
git add .nojekyll
git commit -m "build of https://github.com/plotly/plotly.py/commit/${CIRCLE_SHA1}"
git push --force [email protected]:plotly/plotly.py-docs.git master:gh-pages
rm -rf .git
cd ../..
fi
cd ../..
- store_artifacts:
path: doc/build
destination: doc/build
workflows:
version: 2
code_formatting:
jobs:
- check-code-formatting
dev_build:
jobs:
- plotlyjs_dev_build
build:
jobs:
- python-2.7-core
- python-3.5-core
- python-3.6-core
- python-3.7-core
- python-3.7-percy
- python-2.7-optional
- python-3.5-optional
- python-3.6-optional
# 3.7 optional disabled due to current shapely incompatibility
# - python-3.7-optional
- python-2.7-plot_ly
- python-3.7-plot_ly:
requires:
- python-2.7-plot_ly
- python-2-7-orca
- python-3-5-orca
- python-3-7-orca
- build-doc