Skip to content

Commit abaf46e

Browse files
committed
Merge remote-tracking branch 'origin/master' into scattergl_glpixelratio
2 parents 8ea156c + bd5ac04 commit abaf46e

File tree

1,398 files changed

+116290
-89312
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,398 files changed

+116290
-89312
lines changed

.circleci/config.yml

+141-39
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ version: 2.0
1010
jobs:
1111
install-and-cibuild:
1212
docker:
13-
- image: circleci/node:12.13.0
13+
- image: circleci/node:12.22.1
1414
working_directory: ~/plotly.js
1515
steps:
1616
- checkout
@@ -43,8 +43,8 @@ jobs:
4343
no-gl-jasmine:
4444
docker:
4545
# need '-browsers' version to test in real (xvfb-wrapped) browsers
46-
- image: circleci/node:12.13.0-browsers
47-
parallelism: 2
46+
- image: circleci/node:12.22.1-browsers
47+
parallelism: 8
4848
working_directory: ~/plotly.js
4949
steps:
5050
- attach_workspace:
@@ -56,8 +56,8 @@ jobs:
5656
webgl-jasmine:
5757
docker:
5858
# need '-browsers' version to test in real (xvfb-wrapped) browsers
59-
- image: circleci/node:12.13.0-browsers
60-
parallelism: 3
59+
- image: circleci/node:12.22.1-browsers
60+
parallelism: 8
6161
working_directory: ~/plotly.js
6262
steps:
6363
- attach_workspace:
@@ -66,60 +66,132 @@ jobs:
6666
name: Run jasmine tests (part B)
6767
command: ./.circleci/test.sh webgl-jasmine
6868

69-
no-gl-flaky-jasmine:
69+
flaky-no-gl-jasmine:
7070
docker:
7171
# need '-browsers' version to test in real (xvfb-wrapped) browsers
72-
- image: circleci/node:12.13.0-browsers
72+
- image: circleci/node:12.22.1-browsers
7373
working_directory: ~/plotly.js
7474
steps:
7575
- attach_workspace:
7676
at: ~/
7777
- run:
7878
name: Run jasmine tests (part C)
79-
command: ./.circleci/test.sh no-gl-flaky-jasmine
79+
command: ./.circleci/test.sh flaky-no-gl-jasmine
8080

81-
stable-image:
82-
docker:
83-
- image: plotly/testbed:latest
81+
make-baselines:
8482
parallelism: 4
85-
working_directory: /var/www/streambed/image_server/plotly.js/
83+
docker:
84+
- image: circleci/python:3.8.9
85+
working_directory: ~/plotly.js
8686
steps:
8787
- attach_workspace:
88-
at: /var/www/streambed/image_server/
88+
at: ~/
89+
- run:
90+
name: which pip3 version
91+
command: which pip3 && pip3 --version
92+
- run:
93+
name: install kaleido v0.2.1
94+
command: python3 -m pip install kaleido==0.2.1
95+
- run:
96+
name: install plotly.io v5.0.0
97+
command: python3 -m pip install plotly==5.0.0
98+
- run:
99+
name: install liberation2 fonts
100+
command: sudo apt-get install fonts-liberation2
101+
- run:
102+
name: install OpenSans fonts
103+
command: sudo apt-get install fonts-open-sans
89104
- run:
90-
name: Run and setup container
105+
name: install NotoSansCJK fonts
106+
command: sudo apt install fonts-noto-cjk
107+
- run:
108+
name: download google fonts e.g. Dosis, GravitasOne, NotoSansMono, NotoSans, NotoSerif, Old_Standard_TT, PT_Sans_Narrow, Raleway and Roboto
109+
command: python3 ./.circleci/download_google_fonts.py
110+
- run:
111+
name: install downloaded google fonts
91112
command: |
92-
supervisord &
93-
npm run docker -- setup
113+
sudo cp -r .circleci/fonts/ /usr/share/
114+
sudo fc-cache -f
115+
- run:
116+
name: create all png files
117+
command: ./.circleci/test.sh make-baselines
118+
- persist_to_workspace:
119+
root: ~/
120+
paths:
121+
- plotly.js
122+
123+
test-baselines:
124+
docker:
125+
- image: circleci/node:12.22.1
126+
working_directory: ~/plotly.js
127+
steps:
128+
- attach_workspace:
129+
at: ~/
94130
- run:
95-
name: Run image tests (part A)
96-
command: ./.circleci/test.sh stable-image
131+
name: compare pixels
132+
command: ./.circleci/test.sh test-image ; find build -maxdepth 1 -type f -delete
97133
- store_artifacts:
98134
path: build
99135
destination: /
100136

101-
flaky-image:
137+
make-exports:
102138
docker:
103-
- image: plotly/testbed:latest
104-
working_directory: /var/www/streambed/image_server/plotly.js/
139+
- image: circleci/python:3.8.9
140+
working_directory: ~/plotly.js
105141
steps:
106142
- attach_workspace:
107-
at: /var/www/streambed/image_server/
143+
at: ~/
108144
- run:
109-
name: Run and setup container
110-
command: |
111-
supervisord &
112-
npm run docker -- setup
145+
name: which pip3 version
146+
command: which pip3 && pip3 --version
147+
- run:
148+
name: install kaleido v0.2.1
149+
command: python3 -m pip install kaleido==0.2.1
150+
- run:
151+
name: install plotly.io v5.0.0
152+
command: python3 -m pip install plotly==5.0.0
153+
- run:
154+
name: install poppler-utils to have pdftops for exporting eps
155+
command: sudo apt-get install poppler-utils
113156
- run:
114-
name: Run image tests (part B)
115-
command: ./.circleci/test.sh flaky-image
157+
name: create svg, jpg, jpeg, webp, pdf and eps files
158+
command: python3 test/image/make_exports.py
159+
- persist_to_workspace:
160+
root: ~/
161+
paths:
162+
- plotly.js
163+
164+
test-exports:
165+
docker:
166+
- image: circleci/node:12.22.1
167+
working_directory: ~/plotly.js
168+
steps:
169+
- attach_workspace:
170+
at: ~/
171+
- run:
172+
name: test export sizes
173+
command: node test/image/export_test.js ; find build -maxdepth 1 -type f -delete
116174
- store_artifacts:
117175
path: build
118176
destination: /
119177

178+
mock-validation:
179+
docker:
180+
- image: circleci/node:12.22.1
181+
working_directory: ~/plotly.js
182+
steps:
183+
- attach_workspace:
184+
at: ~/
185+
- run:
186+
name: Test validation using node.js and jsdom
187+
command: npm run test-plain-obj
188+
- run:
189+
name: Validate mocks
190+
command: npm run test-mock
191+
120192
source-syntax:
121193
docker:
122-
- image: circleci/node:12.13.0
194+
- image: circleci/node:12.22.1
123195
working_directory: ~/plotly.js
124196
steps:
125197
- attach_workspace:
@@ -131,7 +203,7 @@ jobs:
131203
jasmine-bundle:
132204
docker:
133205
# need '-browsers' version to test in real (xvfb-wrapped) browsers
134-
- image: circleci/node:12.13.0-browsers
206+
- image: circleci/node:12.22.1-browsers
135207
working_directory: ~/plotly.js
136208
steps:
137209
- attach_workspace:
@@ -142,7 +214,7 @@ jobs:
142214

143215
publish-dist:
144216
docker:
145-
- image: circleci/node:12.13.0
217+
- image: circleci/node:12.22.1
146218
working_directory: ~/plotly.js
147219
steps:
148220
- attach_workspace:
@@ -170,9 +242,18 @@ jobs:
170242
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plotly.js
171243
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plotly.min.js
172244
echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plot-schema.json
173-
- run:
174-
name: Test validation using node.js and jsdom
175-
command: npm run test-plain-obj
245+
- persist_to_workspace:
246+
root: ~/
247+
paths:
248+
- plotly.js
249+
250+
test-dist1:
251+
docker:
252+
- image: circleci/node:12.22.1
253+
working_directory: ~/plotly.js
254+
steps:
255+
- attach_workspace:
256+
at: ~/
176257
- run:
177258
name: Test plotly.min.js import using requirejs
178259
command: npm run test-requirejs
@@ -182,13 +263,19 @@ jobs:
182263
- run:
183264
name: Test certain bundles against function constructors
184265
command: npm run no-new-func
266+
267+
test-dist2:
268+
docker:
269+
- image: circleci/node:12.22.1
270+
working_directory: ~/plotly.js
271+
steps:
272+
- attach_workspace:
273+
at: ~/
185274
- run:
186275
name: Test plotly bundles against es6
187276
command: npm run no-es6-dist
188277
- run:
189278
name: Test plotly bundles againt duplicate keys
190-
environment:
191-
NODE_OPTIONS: --max_old_space_size=4096
192279
command: npm run no-dup-keys
193280

194281
workflows:
@@ -205,13 +292,22 @@ workflows:
205292
- webgl-jasmine:
206293
requires:
207294
- install-and-cibuild
208-
- no-gl-flaky-jasmine:
295+
- flaky-no-gl-jasmine:
296+
requires:
297+
- install-and-cibuild
298+
- make-baselines:
209299
requires:
210300
- install-and-cibuild
211-
- stable-image:
301+
- test-baselines:
302+
requires:
303+
- make-baselines
304+
- make-exports:
212305
requires:
213306
- install-and-cibuild
214-
- flaky-image:
307+
- test-exports:
308+
requires:
309+
- make-exports
310+
- mock-validation:
215311
requires:
216312
- install-and-cibuild
217313
- source-syntax:
@@ -220,3 +316,9 @@ workflows:
220316
- publish-dist:
221317
requires:
222318
- install-and-cibuild
319+
- test-dist1:
320+
requires:
321+
- publish-dist
322+
- test-dist2:
323+
requires:
324+
- publish-dist

.circleci/download_google_fonts.py

+99
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
import requests
2+
3+
dirOut = '.circleci/fonts/truetype/googleFonts/'
4+
5+
def download(repo, family, types) :
6+
for t in types :
7+
name = family + t + '.ttf'
8+
url = repo + name + '?raw=true'
9+
print(url)
10+
req = requests.get(url, allow_redirects=True)
11+
open(dirOut + name, 'wb').write(req.content)
12+
13+
download(
14+
'https://github.com/eliheuer/dosis-vf/blob/master/fonts/static-fonts/',
15+
'Dosis',
16+
[
17+
'-Regular',
18+
'-Bold'
19+
]
20+
)
21+
22+
download(
23+
'https://github.com/googlefonts/noto-fonts/blob/main/hinted/ttf/NotoSansMono/',
24+
'NotoSansMono',
25+
[
26+
'-Regular',
27+
'-Bold'
28+
]
29+
)
30+
31+
download(
32+
'https://github.com/googlefonts/noto-fonts/blob/main/hinted/ttf/NotoSans/',
33+
'NotoSans',
34+
[
35+
'-Regular',
36+
'-Italic',
37+
'-Bold'
38+
]
39+
)
40+
41+
download(
42+
'https://github.com/googlefonts/noto-fonts/blob/main/hinted/ttf/NotoSerif/',
43+
'NotoSerif',
44+
[
45+
'-Regular',
46+
'-Italic',
47+
'-Bold',
48+
'-BoldItalic',
49+
]
50+
)
51+
52+
download(
53+
'https://github.com/google/fonts/blob/main/ofl/oldstandardtt/',
54+
'OldStandard',
55+
[
56+
'-Regular',
57+
'-Italic',
58+
'-Bold'
59+
]
60+
)
61+
62+
download(
63+
'https://github.com/google/fonts/blob/main/ofl/ptsansnarrow/',
64+
'PT_Sans-Narrow-Web',
65+
[
66+
'-Regular',
67+
'-Bold'
68+
]
69+
)
70+
71+
download(
72+
'https://github.com/impallari/Raleway/blob/master/fonts/v3.000%20Fontlab/TTF/',
73+
'Raleway',
74+
[
75+
'-Regular',
76+
'-Regular-Italic',
77+
'-Bold',
78+
'-Bold-Italic'
79+
]
80+
)
81+
82+
download(
83+
'https://github.com/googlefonts/roboto/blob/main/src/hinted/',
84+
'Roboto',
85+
[
86+
'-Regular',
87+
'-Italic',
88+
'-Bold',
89+
'-BoldItalic'
90+
]
91+
)
92+
93+
download(
94+
'https://github.com/expo/google-fonts/blob/master/font-packages/gravitas-one/',
95+
'GravitasOne',
96+
[
97+
'_400Regular'
98+
]
99+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*

0 commit comments

Comments
 (0)