Skip to content

Commit 9085ed5

Browse files
committed
Merge branch 'master' into use-new-kaleido-for-image-tests
2 parents 86f5283 + 0bc4794 commit 9085ed5

File tree

239 files changed

+43419
-4891
lines changed

Some content is hidden

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

239 files changed

+43419
-4891
lines changed

.circleci/config.yml

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ jobs:
217217
make-baselines-virtual-webgl:
218218
parallelism: 8
219219
docker:
220-
- image: cimg/python:3.8.9-browsers
220+
- image: cimg/python:3.12.11-browsers
221221
working_directory: ~/plotly.js
222222
steps:
223223
- run: sudo apt-get update
@@ -228,6 +228,7 @@ jobs:
228228
chrome-version: "132.0.6834.110"
229229
- attach_workspace:
230230
at: ~/
231+
- run: sudo apt-get update
231232
- run:
232233
name: Install kaleido, plotly.io and required fonts
233234
command: .circleci/env_image.sh
@@ -241,7 +242,7 @@ jobs:
241242

242243
make-baselines-mathjax3:
243244
docker:
244-
- image: cimg/python:3.8.9-browsers
245+
- image: cimg/python:3.12.11-browsers
245246
working_directory: ~/plotly.js
246247
steps:
247248
- run: sudo apt-get update
@@ -252,6 +253,7 @@ jobs:
252253
chrome-version: "132.0.6834.110"
253254
- attach_workspace:
254255
at: ~/
256+
- run: sudo apt-get update
255257
- run:
256258
name: Install kaleido, plotly.io and required fonts
257259
command: .circleci/env_image.sh
@@ -266,7 +268,7 @@ jobs:
266268
make-baselines:
267269
parallelism: 12
268270
docker:
269-
- image: cimg/python:3.8.9-browsers
271+
- image: cimg/python:3.12.11-browsers
270272
working_directory: ~/plotly.js
271273
steps:
272274
- run: sudo apt-get update
@@ -277,6 +279,7 @@ jobs:
277279
chrome-version: "132.0.6834.110"
278280
- attach_workspace:
279281
at: ~/
282+
- run: sudo apt-get update
280283
- run:
281284
name: Install kaleido, plotly.io and required fonts
282285
command: .circleci/env_image.sh
@@ -291,7 +294,7 @@ jobs:
291294
make-baselines-b64:
292295
parallelism: 12
293296
docker:
294-
- image: cimg/python:3.8.9-browsers
297+
- image: cimg/python:3.12.11-browsers
295298
working_directory: ~/plotly.js
296299
steps:
297300
- run: sudo apt-get update
@@ -302,6 +305,7 @@ jobs:
302305
chrome-version: "132.0.6834.110"
303306
- attach_workspace:
304307
at: ~/
308+
- run: sudo apt-get update
305309
- run:
306310
name: Install kaleido, plotly.io and required fonts
307311
command: .circleci/env_image.sh
@@ -371,7 +375,7 @@ jobs:
371375

372376
make-exports:
373377
docker:
374-
- image: cimg/python:3.8.9-browsers
378+
- image: cimg/python:3.12.11-browsers
375379
working_directory: ~/plotly.js
376380
steps:
377381
- run: sudo apt-get update
@@ -382,6 +386,7 @@ jobs:
382386
chrome-version: "132.0.6834.110"
383387
- attach_workspace:
384388
at: ~/
389+
- run: sudo apt-get update
385390
- run:
386391
name: Install kaleido, plotly.io and required fonts
387392
command: .circleci/env_image.sh
@@ -392,7 +397,7 @@ jobs:
392397
sudo apt-get install poppler-utils
393398
- run:
394399
name: Create svg, jpg, jpeg, webp, pdf and eps files
395-
command: python3 test/image/make_exports.py
400+
command: sudo python3 test/image/make_exports.py
396401
- persist_to_workspace:
397402
root: ~/
398403
paths:
@@ -437,7 +442,7 @@ jobs:
437442
name: Run syntax tests on source files
438443
command: .circleci/test.sh source-syntax
439444

440-
publish-dist:
445+
publish-dist: &publish-dist
441446
docker:
442447
- image: cimg/node:18.20.4
443448
working_directory: ~/plotly.js
@@ -495,6 +500,11 @@ jobs:
495500
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")
496501
command: diff --unified --color dist/plot-schema.json test/plot-schema.json
497502

503+
publish-dist-node-v22:
504+
<<: *publish-dist
505+
docker:
506+
- image: cimg/node:22.14.0
507+
498508
test-stackgl-bundle:
499509
docker:
500510
- image: cimg/node:18.20.4
@@ -508,12 +518,33 @@ jobs:
508518
name: Bundle bundle-stackgl/index.js
509519
command: cd stackgl_modules && cp index.js INDEX.js && npm run bundle-stackgl
510520
- run:
511-
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.
521+
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.
512522
command: diff --unified --color stackgl_modules/INDEX.js stackgl_modules/index.js
513523
- store_artifacts:
514524
path: stackgl_modules/index.js
515525
destination: stackgl_modules/index.js
516526

527+
test-topojson-build:
528+
docker:
529+
- image: cimg/node:18.20.4
530+
working_directory: ~/plotly.js
531+
steps:
532+
- checkout
533+
- run:
534+
name: Set up build environment
535+
command: cd topojson && npm ci
536+
- run:
537+
name: Build topojson
538+
command: cd topojson && mv dist dist_backup && npm run build
539+
- run:
540+
name: Compare existing files with newly built files. Any difference is a failure. A failure might mean that the source data changed.
541+
command: diff -qr topojson/dist topojson/dist_backup
542+
- run:
543+
name: Compress artifacts
544+
command: tar -cvzf topojson.tar topojson/dist
545+
- store_artifacts:
546+
path: topojson.tar
547+
517548
workflows:
518549
version: 2
519550
build-and-test:
@@ -582,4 +613,8 @@ workflows:
582613

583614
- publish-dist
584615

616+
- publish-dist-node-v22
617+
585618
- test-stackgl-bundle
619+
620+
- test-topojson-build

.circleci/env_image.sh

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,19 @@ set -e
33
python3 --version
44
# install required fonts
55
sudo apt-get install fonts-liberation2 fonts-open-sans fonts-noto-cjk fonts-noto-color-emoji
6-
python3 -m pip install requests --progress-bar off
7-
python3 .circleci/download_google_fonts.py
6+
7+
# install pip
8+
sudo curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
9+
sudo python3 get-pip.py
10+
11+
# install additional fonts
12+
sudo python3 -m pip install requests
13+
sudo python3 .circleci/download_google_fonts.py
814
sudo cp -r .circleci/fonts/ /usr/share/
15+
sudo apt install fontconfig
916
sudo fc-cache -f
17+
1018
# install kaleido & plotly
11-
# python -m pip install "plotly[kaleido]==6.1.2" --progress-bar off
12-
# Once the next Plotly version is released, uncomment the line above, update the Plotly version,
13-
# and delete the line below.
14-
python3 -m pip install "git+https://github.com/plotly/plotly.py.git@0089b4d#egg=plotly[kaleido]" --progress-bar off
19+
python -m pip install "plotly[kaleido]==6.2.0" --progress-bar off
1520
# install numpy i.e. to convert arrays to typed arrays
1621
python3 -m pip install numpy==1.24.2

.circleci/test.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,24 +97,24 @@ case $1 in
9797
find $ROOT/test/image/mocks/gl* -type f -printf "%f\n"; \
9898
find $ROOT/test/image/mocks/map* -type f -printf "%f\n"; \
9999
} | sed 's/\.json$//1' | circleci tests split)
100-
python3 test/image/make_baseline.py virtual-webgl $SUITE || EXIT_STATE=$?
100+
sudo python3 test/image/make_baseline.py virtual-webgl $SUITE || EXIT_STATE=$?
101101
exit $EXIT_STATE
102102
;;
103103

104104
make-baselines-mathjax3)
105-
python3 test/image/make_baseline.py mathjax3 legend_mathjax_title_and_items mathjax parcats_grid_subplots table_latex_multitrace_scatter table_plain_birds table_wrapped_birds ternary-mathjax ternary-mathjax-title-place-subtitle || EXIT_STATE=$?
105+
sudo python3 test/image/make_baseline.py mathjax3 legend_mathjax_title_and_items mathjax parcats_grid_subplots table_latex_multitrace_scatter table_plain_birds table_wrapped_birds ternary-mathjax ternary-mathjax-title-place-subtitle || EXIT_STATE=$?
106106
exit $EXIT_STATE
107107
;;
108108

109109
make-baselines-b64)
110110
SUITE=$(find $ROOT/test/image/mocks/ -type f -printf "%f\n" | sed 's/\.json$//1' | circleci tests split)
111-
python3 test/image/make_baseline.py b64 $SUITE || EXIT_STATE=$?
111+
sudo python3 test/image/make_baseline.py b64 $SUITE || EXIT_STATE=$?
112112
exit $EXIT_STATE
113113
;;
114114

115115
make-baselines)
116116
SUITE=$(find $ROOT/test/image/mocks/ -type f -printf "%f\n" | sed 's/\.json$//1' | circleci tests split)
117-
python3 test/image/make_baseline.py $SUITE || EXIT_STATE=$?
117+
sudo python3 test/image/make_baseline.py $SUITE || EXIT_STATE=$?
118118
exit $EXIT_STATE
119119
;;
120120

.github/workflows/test.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3+
4+
name: No CI Test
5+
6+
on: push
7+
8+
jobs:
9+
build:
10+
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [18.x]
16+
17+
steps:
18+
- uses: browser-actions/setup-chrome@v1
19+
- uses: actions/checkout@v4
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
cache: 'npm'
25+
- run: chrome --version
26+
- run: ls
27+
- run: npm run pretest
28+
- run: npm ci
29+
- run: npm run cibuild
30+
- name: Run noCI tests
31+
uses: coactions/setup-xvfb@v1
32+
with:
33+
run: ./tasks/noci_test.sh jasmine

CHANGELOG.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,42 @@ To see all merged commits on the master branch that will be part of the next plo
99

1010
where X.Y.Z is the semver of most recent plotly.js release.
1111

12+
## [3.0.3] -- 2025-07-23
13+
14+
### Fixed
15+
- Remove detailed description of font options [[7348](https://github.com/plotly/plotly.js/pull/7348)]
16+
17+
18+
## [3.0.2] -- 2025-07-22
19+
20+
### Fixed
21+
- Fix installing dependencies in node v22 [[#7381](https://github.com/plotly/plotly.js/pull/7381)], with thanks to @chaigh-uk for the contribution!
22+
- Fix Persian calendar leap year [[#7456](https://github.com/plotly/plotly.js/pull/7456)]
23+
- Fix scroll wheel zoom for geo subplots in Safari [#7474](https://github.com/plotly/plotly.js/pull/7474)
24+
- Add method to check for WebKit WebView user agent string [[#7479](https://github.com/plotly/plotly.js/pull/7479)]
25+
- Fix edit colorbar title [7487](https://github.com/plotly/plotly.js/pull/7487)
26+
27+
28+
## [3.1.0-rc.0] -- 2025-07-15
29+
30+
### Added
31+
- Add property `zerolinelayer` to cartesian axes to allow drawing zeroline above traces [[#7269](https://github.com/plotly/plotly.js/pull/7269)]
32+
- Add `pattern.path` attribute as an alternative to the preset `pattern.shape` values, so you can use any SVG path string as a pattern fill. [[#7280](https://github.com/plotly/plotly.js/pull/7280)]
33+
- Allow configuration of horizontal legend max height [[#7359](https://github.com/plotly/plotly.js/pull/7359)]
34+
- Add support for ticklabelposition "inside"/"outside" for category axes with `tickson` set to "boundaries" [[#7420](https://github.com/plotly/plotly.js/pull/7420)],
35+
with thanks to @my-tien for the contribution!
36+
37+
### Changed
38+
- Switch to United Nations (coastlines, countries, land, ocean) + Natural Earth (lakes, rivers, subunits) geodata for building topojson used in geo plot [[#7393](https://github.com/plotly/plotly.js/pull/7393)]
39+
- Make 'png' all caps [[#7400](https://github.com/plotly/plotly.js/pull/7400)]
40+
41+
### Fixed
42+
- Fix installing dependencies in node v22 [[#7381](https://github.com/plotly/plotly.js/pull/7381)], with thanks to @chaigh-uk for the contribution!
43+
- Fix performance warning in scattergl traces, [[#7390](https://github.com/plotly/plotly.js/pull/7390)], with thanks to @MzyzzG for the contribution!
44+
- Move css-loader and other dependencies into devDependencies section [[#7407](https://github.com/plotly/plotly.js/pull/7407)]
45+
- Fix Persian calendar leap year [[#7456](https://github.com/plotly/plotly.js/pull/7456)]
46+
47+
1248
## [3.0.1] -- 2025-02-18
1349

1450
### Changed

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ authors:
99
- family-names: "Samimi"
1010
given-names: "Mojtaba"
1111
title: "Open source Plotly charting library"
12-
version: 3.0.1
12+
version: 3.1.0-rc.0
1313
doi: 10.5281/zenodo.13964707
14-
date-released: 2025-01-27
14+
date-released: 2025-07-15
1515
url: "https://github.com/plotly/plotly.js"

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plo
6262
6363
```html
6464
<head>
65-
<script src="https://cdn.plot.ly/plotly-3.0.1.min.js" charset="utf-8"></script>
65+
<script src="https://cdn.plot.ly/plotly-3.1.0-rc.0.min.js" charset="utf-8"></script>
6666
</head>
6767
<body>
6868
<div id="gd"></div>
@@ -79,7 +79,7 @@ You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plo
7979
Alternatively you may consider using [native ES6 import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) in the script tag.
8080
```html
8181
<script type="module">
82-
import "https://cdn.plot.ly/plotly-3.0.1.min.js"
82+
import "https://cdn.plot.ly/plotly-3.1.0-rc.0.min.js"
8383
Plotly.newPlot("gd", [{ y: [1, 2, 3] }])
8484
</script>
8585
```
@@ -89,7 +89,7 @@ Fastly supports Plotly.js with free CDN service. Read more at <https://www.fastl
8989
### Un-minified versions are also available on CDN
9090
While non-minified source files may contain characters outside UTF-8, it is recommended that you specify the `charset` when loading those bundles.
9191
```html
92-
<script src="https://cdn.plot.ly/plotly-3.0.1.js" charset="utf-8"></script>
92+
<script src="https://cdn.plot.ly/plotly-3.1.0-rc.0.js" charset="utf-8"></script>
9393
```
9494

9595
> Please note that as of v2 the "plotly-latest" outputs (e.g. https://cdn.plot.ly/plotly-latest.min.js) will no longer be updated on the CDN, and will stay at the last v1 patch v1.58.5. Therefore, to use the CDN with plotly.js v2 and higher, you must specify an exact plotly.js version.

build/plotcss.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,12 @@ var rules = {
3434
"X .ease-bg": "-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;",
3535
"X .modebar--hover>:not(.watermark)": "opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;",
3636
"X:hover .modebar--hover .modebar-group": "opacity:1;",
37+
"X:focus-within .modebar--hover .modebar-group": "opacity:1;",
3738
"X .modebar-group": "float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;",
38-
"X .modebar-btn": "position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;",
39-
"X .modebar-btn svg": "position:relative;top:2px;",
39+
"X .modebar-group a": "display:grid;place-content:center;",
40+
"X .modebar-btn": "position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);",
41+
"X .modebar-btn svg": "position:relative;",
42+
"X .modebar-btn:focus-visible": "outline:1px solid #000;outline-offset:1px;border-radius:3px;",
4043
"X .modebar.vertical": "display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;",
4144
"X .modebar.vertical svg": "top:-1px;",
4245
"X .modebar.vertical .modebar-group": "display:block;float:none;padding-left:0px;padding-bottom:8px;",

devtools/regl_codegen/devtools.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,5 +158,3 @@ function handleOnLoad() {
158158
window.close();
159159
});
160160
}
161-
162-
module.exports = Tabs;

devtools/test_dashboard/devtools.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ var Tabs = {
1717
Plotly.setPlotConfig({
1818

1919
// use local topojson files
20-
topojsonURL: '../../node_modules/sane-topojson/dist/',
21-
20+
topojsonURL: "../../topojson/dist",
2221
// register mapbox access token
2322
// run `npm run preset` if you haven't yet
2423
mapboxAccessToken: credentials.MAPBOX_ACCESS_TOKEN,
@@ -268,5 +267,3 @@ function handleOnLoad() {
268267
Tabs.setPlotConfig();
269268
plotFromHash();
270269
}
271-
272-
module.exports = Tabs;

0 commit comments

Comments
 (0)