Skip to content

Commit f8b50ea

Browse files
committed
Merge branch 'master' into alex/zoombutton-axes
2 parents b252c88 + bf6909b commit f8b50ea

File tree

322 files changed

+45939
-7233
lines changed

Some content is hidden

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

322 files changed

+45939
-7233
lines changed

.circleci/config.yml

Lines changed: 49 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
install-firefox: false
4545
install-geckodriver: false
4646
install-chrome: true
47-
chrome-version: "127.0.6533.119"
47+
chrome-version: "132.0.6834.110"
4848
- attach_workspace:
4949
at: ~/
5050
- run:
@@ -83,7 +83,7 @@ jobs:
8383
install-firefox: false
8484
install-geckodriver: false
8585
install-chrome: true
86-
chrome-version: "127.0.6533.119"
86+
chrome-version: "132.0.6834.110"
8787
- attach_workspace:
8888
at: ~/
8989
- run:
@@ -105,7 +105,7 @@ jobs:
105105
install-firefox: false
106106
install-geckodriver: false
107107
install-chrome: true
108-
chrome-version: "127.0.6533.119"
108+
chrome-version: "132.0.6834.110"
109109
- attach_workspace:
110110
at: ~/
111111
- run:
@@ -127,7 +127,7 @@ jobs:
127127
install-firefox: false
128128
install-geckodriver: false
129129
install-chrome: true
130-
chrome-version: "127.0.6533.119"
130+
chrome-version: "132.0.6834.110"
131131
- attach_workspace:
132132
at: ~/
133133
- run:
@@ -168,7 +168,7 @@ jobs:
168168
install-firefox: false
169169
install-geckodriver: false
170170
install-chrome: true
171-
chrome-version: "127.0.6533.119"
171+
chrome-version: "132.0.6834.110"
172172
- attach_workspace:
173173
at: ~/
174174
- run:
@@ -189,7 +189,7 @@ jobs:
189189
install-firefox: false
190190
install-geckodriver: false
191191
install-chrome: true
192-
chrome-version: "127.0.6533.119"
192+
chrome-version: "132.0.6834.110"
193193
- attach_workspace:
194194
at: ~/
195195
- run:
@@ -217,11 +217,12 @@ jobs:
217217
make-baselines-virtual-webgl:
218218
parallelism: 8
219219
docker:
220-
- image: circleci/python:3.8.9
220+
- image: cimg/python:3.12.11
221221
working_directory: ~/plotly.js
222222
steps:
223223
- attach_workspace:
224224
at: ~/
225+
- run: sudo apt-get update
225226
- run:
226227
name: Install kaleido, plotly.io and required fonts
227228
command: .circleci/env_image.sh
@@ -235,11 +236,12 @@ jobs:
235236

236237
make-baselines-mathjax3:
237238
docker:
238-
- image: circleci/python:3.8.9
239+
- image: cimg/python:3.12.11
239240
working_directory: ~/plotly.js
240241
steps:
241242
- attach_workspace:
242243
at: ~/
244+
- run: sudo apt-get update
243245
- run:
244246
name: Install kaleido, plotly.io and required fonts
245247
command: .circleci/env_image.sh
@@ -254,11 +256,12 @@ jobs:
254256
make-baselines:
255257
parallelism: 12
256258
docker:
257-
- image: circleci/python:3.8.9
259+
- image: cimg/python:3.12.11
258260
working_directory: ~/plotly.js
259261
steps:
260262
- attach_workspace:
261263
at: ~/
264+
- run: sudo apt-get update
262265
- run:
263266
name: Install kaleido, plotly.io and required fonts
264267
command: .circleci/env_image.sh
@@ -273,11 +276,12 @@ jobs:
273276
make-baselines-b64:
274277
parallelism: 12
275278
docker:
276-
- image: circleci/python:3.8.9
279+
- image: cimg/python:3.12.11
277280
working_directory: ~/plotly.js
278281
steps:
279282
- attach_workspace:
280283
at: ~/
284+
- run: sudo apt-get update
281285
- run:
282286
name: Install kaleido, plotly.io and required fonts
283287
command: .circleci/env_image.sh
@@ -347,11 +351,12 @@ jobs:
347351

348352
make-exports:
349353
docker:
350-
- image: circleci/python:3.8.9
354+
- image: cimg/python:3.12.11
351355
working_directory: ~/plotly.js
352356
steps:
353357
- attach_workspace:
354358
at: ~/
359+
- run: sudo apt-get update
355360
- run:
356361
name: Install kaleido, plotly.io and required fonts
357362
command: .circleci/env_image.sh
@@ -362,7 +367,7 @@ jobs:
362367
sudo apt-get install poppler-utils
363368
- run:
364369
name: Create svg, jpg, jpeg, webp, pdf and eps files
365-
command: python3 test/image/make_exports.py
370+
command: sudo python3 test/image/make_exports.py
366371
- persist_to_workspace:
367372
root: ~/
368373
paths:
@@ -407,7 +412,7 @@ jobs:
407412
name: Run syntax tests on source files
408413
command: .circleci/test.sh source-syntax
409414

410-
publish-dist:
415+
publish-dist: &publish-dist
411416
docker:
412417
- image: cimg/node:18.20.4
413418
working_directory: ~/plotly.js
@@ -465,6 +470,11 @@ jobs:
465470
name: Test plot-schema.json diff - If failed, after (npm start) you could run (npm run schema && git add test/plot-schema.json && git commit -m "update plot-schema diff")
466471
command: diff --unified --color dist/plot-schema.json test/plot-schema.json
467472

473+
publish-dist-node-v22:
474+
<<: *publish-dist
475+
docker:
476+
- image: cimg/node:22.14.0
477+
468478
test-stackgl-bundle:
469479
docker:
470480
- image: cimg/node:18.20.4
@@ -478,12 +488,33 @@ jobs:
478488
name: Bundle bundle-stackgl/index.js
479489
command: cd stackgl_modules && cp index.js INDEX.js && npm run bundle-stackgl
480490
- run:
481-
name: Test stackgl_modules/index.js diff - If failed please remember this file in auto generated and you should not modify it directly until a dependeny change. To suggest changes please submit pull request to the relevant dependency.
491+
name: Test stackgl_modules/index.js diff - If failed please remember this file in auto generated and you should not modify it directly until a dependency change. To suggest changes please submit pull request to the relevant dependency.
482492
command: diff --unified --color stackgl_modules/INDEX.js stackgl_modules/index.js
483493
- store_artifacts:
484494
path: stackgl_modules/index.js
485495
destination: stackgl_modules/index.js
486496

497+
test-topojson-build:
498+
docker:
499+
- image: cimg/node:18.20.4
500+
working_directory: ~/plotly.js
501+
steps:
502+
- checkout
503+
- run:
504+
name: Set up build environment
505+
command: cd topojson && npm ci
506+
- run:
507+
name: Build topojson
508+
command: cd topojson && mv dist dist_backup && npm run build
509+
- run:
510+
name: Compare existing files with newly built files. Any difference is a failure. A failure might mean that the source data changed.
511+
command: diff -qr topojson/dist topojson/dist_backup
512+
- run:
513+
name: Compress artifacts
514+
command: tar -cvzf topojson.tar topojson/dist
515+
- store_artifacts:
516+
path: topojson.tar
517+
487518
workflows:
488519
version: 2
489520
build-and-test:
@@ -552,4 +583,8 @@ workflows:
552583

553584
- publish-dist
554585

586+
- publish-dist-node-v22
587+
555588
- test-stackgl-bundle
589+
590+
- test-topojson-build

.circleci/download_google_fonts.py

Lines changed: 54 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,82 @@
1+
import os
2+
13
import requests
24

3-
dirOut = '.circleci/fonts/truetype/googleFonts/'
5+
dir_out = ".circleci/fonts/truetype/googleFonts/"
6+
7+
8+
def download(repo, family, types, overwrite=True):
9+
for t in types:
10+
name = family + t + ".ttf"
11+
url = repo + name + "?raw=true"
12+
out_file = dir_out + name
13+
print("Getting: ", url)
14+
if os.path.exists(out_file) and not overwrite:
15+
print(" => Already exists: ", out_file)
16+
continue
17+
req = requests.get(url, allow_redirects=False)
18+
if req.status_code != 200:
19+
# If we get a redirect, print an error so that we know to update the URL
20+
if req.status_code == 302 or req.status_code == 301:
21+
new_url = req.headers.get("Location")
22+
print(f" => Redirected -- please update URL to: {new_url}")
23+
raise RuntimeError(f"""
24+
Download failed.
25+
Status code: {req.status_code}
26+
Message: {req.reason}
27+
""")
28+
open(out_file, "wb").write(req.content)
429

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)
1230

1331
download(
14-
'https://github.com/googlefonts/noto-fonts/blob/main/hinted/ttf/NotoSansMono/',
15-
'NotoSansMono',
16-
[
17-
'-Regular',
18-
'-Bold'
19-
]
32+
"https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSansMono/hinted/ttf/",
33+
"NotoSansMono",
34+
["-Regular", "-Bold"],
2035
)
2136

2237
download(
23-
'https://github.com/googlefonts/noto-fonts/blob/main/hinted/ttf/NotoSans/',
24-
'NotoSans',
25-
[
26-
'-Regular',
27-
'-Italic',
28-
'-Bold'
29-
]
38+
"https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSans/hinted/ttf/",
39+
"NotoSans",
40+
["-Regular", "-Italic", "-Bold"],
3041
)
3142

3243
download(
33-
'https://github.com/googlefonts/noto-fonts/blob/main/hinted/ttf/NotoSerif/',
34-
'NotoSerif',
44+
"https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSerif/hinted/ttf/",
45+
"NotoSerif",
3546
[
36-
'-Regular',
37-
'-Italic',
38-
'-Bold',
39-
'-BoldItalic',
40-
]
47+
"-Regular",
48+
"-Italic",
49+
"-Bold",
50+
"-BoldItalic",
51+
],
4152
)
4253

4354
download(
44-
'https://github.com/google/fonts/blob/main/ofl/oldstandardtt/',
45-
'OldStandard',
46-
[
47-
'-Regular',
48-
'-Italic',
49-
'-Bold'
50-
]
55+
"https://raw.githubusercontent.com/google/fonts/refs/heads/main/ofl/oldstandardtt/",
56+
"OldStandard",
57+
["-Regular", "-Italic", "-Bold"],
5158
)
5259

5360
download(
54-
'https://github.com/google/fonts/blob/main/ofl/ptsansnarrow/',
55-
'PT_Sans-Narrow-Web',
56-
[
57-
'-Regular',
58-
'-Bold'
59-
]
61+
"https://raw.githubusercontent.com/google/fonts/refs/heads/main/ofl/ptsansnarrow/",
62+
"PT_Sans-Narrow-Web",
63+
["-Regular", "-Bold"],
6064
)
6165

6266
download(
63-
'https://github.com/impallari/Raleway/blob/master/fonts/v3.000%20Fontlab/TTF/',
64-
'Raleway',
65-
[
66-
'-Regular',
67-
'-Regular-Italic',
68-
'-Bold',
69-
'-Bold-Italic'
70-
]
67+
"https://raw.githubusercontent.com/impallari/Raleway/refs/heads/master/fonts/v3.000%20Fontlab/TTF/",
68+
"Raleway",
69+
["-Regular", "-Regular-Italic", "-Bold", "-Bold-Italic"],
7170
)
7271

7372
download(
74-
'https://github.com/googlefonts/roboto/blob/main/src/hinted/',
75-
'Roboto',
76-
[
77-
'-Regular',
78-
'-Italic',
79-
'-Bold',
80-
'-BoldItalic'
81-
]
73+
"https://raw.githubusercontent.com/googlefonts/roboto-2/refs/heads/main/src/hinted/",
74+
"Roboto",
75+
["-Regular", "-Italic", "-Bold", "-BoldItalic"],
8276
)
8377

8478
download(
85-
'https://github.com/expo/google-fonts/blob/master/font-packages/gravitas-one/',
86-
'GravitasOne',
87-
[
88-
'_400Regular'
89-
]
79+
"https://raw.githubusercontent.com/expo/google-fonts/refs/heads/main/font-packages/gravitas-one/400Regular/",
80+
"GravitasOne",
81+
["_400Regular"],
9082
)

.circleci/env_image.sh

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11
#!/bin/sh
2+
set -e
23
# install required fonts
3-
sudo apt-get install fonts-liberation2 fonts-open-sans fonts-noto-cjk fonts-noto-color-emoji && \
4-
sudo python3 .circleci/download_google_fonts.py && \
5-
sudo cp -r .circleci/fonts/ /usr/share/ && \
6-
sudo fc-cache -f && \
4+
sudo apt-get install fonts-liberation2 fonts-open-sans fonts-noto-cjk fonts-noto-color-emoji
5+
6+
# install pip
7+
sudo curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
8+
sudo python3 get-pip.py
9+
10+
# install additional fonts
11+
sudo python3 -m pip install requests
12+
sudo python3 .circleci/download_google_fonts.py
13+
sudo cp -r .circleci/fonts/ /usr/share/
14+
sudo apt install fontconfig
15+
sudo fc-cache -f
16+
717
# install kaleido & plotly
8-
sudo python3 -m pip install kaleido==0.2.1 plotly==5.5.0 --progress-bar off
18+
sudo python3 -m pip install kaleido==0.2.1 plotly==6.2.0 --progress-bar off
19+
920
# install numpy i.e. to convert arrays to typed arrays
1021
sudo python3 -m pip install numpy==1.24.2

.circleci/fonts/truetype/googleFonts/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.
37.7 KB
Binary file not shown.
617 KB
Binary file not shown.
624 KB
Binary file not shown.
607 KB
Binary file not shown.
597 KB
Binary file not shown.
582 KB
Binary file not shown.

0 commit comments

Comments
 (0)