Skip to content

Run noCI tests using GitHub workflows #7343

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Jun 5, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'origin/master' into fix-deprecated-tests
  • Loading branch information
archmoj committed Jun 5, 2025
commit 950ecd5880ac8c65de42b7b882e4077b47e6592b
23 changes: 15 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2.1
orbs:
browser-tools: circleci/browser-tools@1.4.8
browser-tools: circleci/browser-tools@1.5.1

# Inspired by:
# https://github.com/CircleCI-Public/circleci-demo-workflows/blob/workspace-forwarding/.circleci/config.yml
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
install-firefox: false
install-geckodriver: false
install-chrome: true
chrome-version: "127.0.6533.119"
chrome-version: "132.0.6834.110"
- attach_workspace:
at: ~/
- run:
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
install-firefox: false
install-geckodriver: false
install-chrome: true
chrome-version: "127.0.6533.119"
chrome-version: "132.0.6834.110"
- attach_workspace:
at: ~/
- run:
Expand All @@ -105,7 +105,7 @@ jobs:
install-firefox: false
install-geckodriver: false
install-chrome: true
chrome-version: "127.0.6533.119"
chrome-version: "132.0.6834.110"
- attach_workspace:
at: ~/
- run:
Expand All @@ -127,7 +127,7 @@ jobs:
install-firefox: false
install-geckodriver: false
install-chrome: true
chrome-version: "127.0.6533.119"
chrome-version: "132.0.6834.110"
- attach_workspace:
at: ~/
- run:
Expand Down Expand Up @@ -168,7 +168,7 @@ jobs:
install-firefox: false
install-geckodriver: false
install-chrome: true
chrome-version: "127.0.6533.119"
chrome-version: "132.0.6834.110"
- attach_workspace:
at: ~/
- run:
Expand All @@ -189,7 +189,7 @@ jobs:
install-firefox: false
install-geckodriver: false
install-chrome: true
chrome-version: "127.0.6533.119"
chrome-version: "132.0.6834.110"
- attach_workspace:
at: ~/
- run:
Expand Down Expand Up @@ -407,7 +407,7 @@ jobs:
name: Run syntax tests on source files
command: .circleci/test.sh source-syntax

publish-dist:
publish-dist: &publish-dist
docker:
- image: cimg/node:18.20.4
working_directory: ~/plotly.js
Expand Down Expand Up @@ -465,6 +465,11 @@ jobs:
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")
command: diff --unified --color dist/plot-schema.json test/plot-schema.json

publish-dist-node-v22:
<<: *publish-dist
docker:
- image: cimg/node:22.14.0

test-stackgl-bundle:
docker:
- image: cimg/node:18.20.4
Expand Down Expand Up @@ -552,4 +557,6 @@ workflows:

- publish-dist

- publish-dist-node-v22

- test-stackgl-bundle
116 changes: 54 additions & 62 deletions .circleci/download_google_fonts.py
Original file line number Diff line number Diff line change
@@ -1,90 +1,82 @@
import os

import requests

dirOut = '.circleci/fonts/truetype/googleFonts/'
dir_out = ".circleci/fonts/truetype/googleFonts/"


def download(repo, family, types, overwrite=True):
for t in types:
name = family + t + ".ttf"
url = repo + name + "?raw=true"
out_file = dir_out + name
print("Getting: ", url)
if os.path.exists(out_file) and not overwrite:
print(" => Already exists: ", out_file)
continue
req = requests.get(url, allow_redirects=False)
if req.status_code != 200:
# If we get a redirect, print an error so that we know to update the URL
if req.status_code == 302 or req.status_code == 301:
new_url = req.headers.get("Location")
print(f" => Redirected -- please update URL to: {new_url}")
raise RuntimeError(f"""
Download failed.
Status code: {req.status_code}
Message: {req.reason}
""")
open(out_file, "wb").write(req.content)

def download(repo, family, types) :
for t in types :
name = family + t + '.ttf'
url = repo + name + '?raw=true'
print(url)
req = requests.get(url, allow_redirects=True)
open(dirOut + name, 'wb').write(req.content)

download(
'https://github.com/googlefonts/noto-fonts/blob/main/hinted/ttf/NotoSansMono/',
'NotoSansMono',
[
'-Regular',
'-Bold'
]
"https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSansMono/hinted/ttf/",
"NotoSansMono",
["-Regular", "-Bold"],
)

download(
'https://github.com/googlefonts/noto-fonts/blob/main/hinted/ttf/NotoSans/',
'NotoSans',
[
'-Regular',
'-Italic',
'-Bold'
]
"https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSans/hinted/ttf/",
"NotoSans",
["-Regular", "-Italic", "-Bold"],
)

download(
'https://github.com/googlefonts/noto-fonts/blob/main/hinted/ttf/NotoSerif/',
'NotoSerif',
"https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSerif/hinted/ttf/",
"NotoSerif",
[
'-Regular',
'-Italic',
'-Bold',
'-BoldItalic',
]
"-Regular",
"-Italic",
"-Bold",
"-BoldItalic",
],
)

download(
'https://github.com/google/fonts/blob/main/ofl/oldstandardtt/',
'OldStandard',
[
'-Regular',
'-Italic',
'-Bold'
]
"https://raw.githubusercontent.com/google/fonts/refs/heads/main/ofl/oldstandardtt/",
"OldStandard",
["-Regular", "-Italic", "-Bold"],
)

download(
'https://github.com/google/fonts/blob/main/ofl/ptsansnarrow/',
'PT_Sans-Narrow-Web',
[
'-Regular',
'-Bold'
]
"https://raw.githubusercontent.com/google/fonts/refs/heads/main/ofl/ptsansnarrow/",
"PT_Sans-Narrow-Web",
["-Regular", "-Bold"],
)

download(
'https://github.com/impallari/Raleway/blob/master/fonts/v3.000%20Fontlab/TTF/',
'Raleway',
[
'-Regular',
'-Regular-Italic',
'-Bold',
'-Bold-Italic'
]
"https://raw.githubusercontent.com/impallari/Raleway/refs/heads/master/fonts/v3.000%20Fontlab/TTF/",
"Raleway",
["-Regular", "-Regular-Italic", "-Bold", "-Bold-Italic"],
)

download(
'https://github.com/googlefonts/roboto/blob/main/src/hinted/',
'Roboto',
[
'-Regular',
'-Italic',
'-Bold',
'-BoldItalic'
]
"https://raw.githubusercontent.com/googlefonts/roboto-2/refs/heads/main/src/hinted/",
"Roboto",
["-Regular", "-Italic", "-Bold", "-BoldItalic"],
)

download(
'https://github.com/expo/google-fonts/blob/master/font-packages/gravitas-one/',
'GravitasOne',
[
'_400Regular'
]
"https://raw.githubusercontent.com/expo/google-fonts/refs/heads/main/font-packages/gravitas-one/400Regular/",
"GravitasOne",
["_400Regular"],
)
9 changes: 5 additions & 4 deletions .circleci/env_image.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/bin/sh
set -e
# install required fonts
sudo apt-get install fonts-liberation2 fonts-open-sans fonts-noto-cjk fonts-noto-color-emoji && \
sudo python3 .circleci/download_google_fonts.py && \
sudo cp -r .circleci/fonts/ /usr/share/ && \
sudo fc-cache -f && \
sudo apt-get install fonts-liberation2 fonts-open-sans fonts-noto-cjk fonts-noto-color-emoji
sudo python3 .circleci/download_google_fonts.py
sudo cp -r .circleci/fonts/ /usr/share/
sudo fc-cache -f
# install kaleido & plotly
sudo python3 -m pip install kaleido==0.2.1 plotly==5.5.0 --progress-bar off
# install numpy i.e. to convert arrays to typed arrays
Expand Down
1 change: 0 additions & 1 deletion .circleci/fonts/truetype/googleFonts/.gitignore

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
21 changes: 17 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,20 @@ To see all merged commits on the master branch that will be part of the next plo

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

## [3.0.0-rc.2] -- 2024-12-16
## [3.0.1] -- 2025-02-18

### Changed
- Update `color-rgba` from 2.1.1 to 3.0.0 to fix hsl color conversion bug [[#7325](https://github.com/plotly/plotly.js/pull/7325)]

### Fixed
- Fix click event handling for plots in shadow DOM elements [[#7357](https://github.com/plotly/plotly.js/pull/7357)]
- Fix hoverlabels and other text labels with null values templated in [[#7360](https://github.com/plotly/plotly.js/pull/7360)]
- Fix importing plotly.js via require on pages with [AMD](https://en.wikipedia.org/wiki/Asynchronous_module_definition) [[#7367](https://github.com/plotly/plotly.js/pull/7367)]
- Update Romanian locale [[#7351](https://github.com/plotly/plotly.js/pull/7351)]
- Update Italian locale [[#4425](https://github.com/plotly/plotly.js/pull/4425)]
- Update Turkish locale [[#7352](https://github.com/plotly/plotly.js/pull/7352)]

## [3.0.0] -- 2025-01-27

### Removed
- Drop support for passing a string to the `title` attribute, and drop support for deprecated attributes `titlefont`, `titleposition`, `titleside`, and `titleoffset` (use `title.text`, `title.font`, `title.side`, `title.offset` instead)[[#7212](https://github.com/plotly/plotly.js/pull/7212)]
Expand Down Expand Up @@ -639,7 +652,7 @@ Drop support for deprecated `bardir` attribute (use `orientation` instead) [[#72
## [2.15.1] -- 2022-10-11

### Fixed
- Fix latest version of plotly.js main module on npm
- Fix latest version of plotly.js main module on npm


## [2.15.0] -- 2022-10-06
Expand All @@ -658,9 +671,9 @@ Drop support for deprecated `bardir` attribute (use `orientation` instead) [[#72
- Fix automargin to update axis titles in redraws [[#6312](https://github.com/plotly/plotly.js/pull/6312)]
- Fix exporting patterns with transparent color [[#6318](https://github.com/plotly/plotly.js/pull/6318)]
- Fix exporting text on empty slices [[#6335](https://github.com/plotly/plotly.js/pull/6335)]
- Disable interactions for `treemap`, `icicle`, `sunburst`, `pie`, `funnelarea`,
- Disable interactions for `treemap`, `icicle`, `sunburst`, `pie`, `funnelarea`,
`parcats`, `parcoords` and `sankey` traces when `staticPlot` is set to true [[#6296](https://github.com/plotly/plotly.js/pull/6296)]


## [2.14.0] -- 2022-08-10

Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ authors:
- family-names: "Samimi"
given-names: "Mojtaba"
title: "Open source Plotly charting library"
version: 3.0.0-rc.2
version: 3.0.1
doi: 10.5281/zenodo.13964707
date-released: 2024-09-10
date-released: 2025-01-27
url: "https://github.com/plotly/plotly.js"
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plo

```html
<head>
<script src="https://cdn.plot.ly/plotly-3.0.0-rc.2.min.js" charset="utf-8"></script>
<script src="https://cdn.plot.ly/plotly-3.0.1.min.js" charset="utf-8"></script>
</head>
<body>
<div id="gd"></div>
Expand All @@ -79,7 +79,7 @@ You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plo
Alternatively you may consider using [native ES6 import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) in the script tag.
```html
<script type="module">
import "https://cdn.plot.ly/plotly-3.0.0-rc.2.min.js"
import "https://cdn.plot.ly/plotly-3.0.1.min.js"
Plotly.newPlot("gd", [{ y: [1, 2, 3] }])
</script>
```
Expand All @@ -89,7 +89,7 @@ Fastly supports Plotly.js with free CDN service. Read more at <https://www.fastl
### Un-minified versions are also available on CDN
While non-minified source files may contain characters outside UTF-8, it is recommended that you specify the `charset` when loading those bundles.
```html
<script src="https://cdn.plot.ly/plotly-3.0.0-rc.2.js" charset="utf-8"></script>
<script src="https://cdn.plot.ly/plotly-3.0.1.js" charset="utf-8"></script>
```

> 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.
Expand Down
2 changes: 1 addition & 1 deletion devtools/test_dashboard/devtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ var Tabs = {
};
},

// Save a png snapshot and display it below the plot
// Save a PNG snapshot and display it below the plot
snapshot: function(id) {
var gd = Tabs.getGraph(id);

Expand Down
2 changes: 1 addition & 1 deletion devtools/test_dashboard/index-mathjax3.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ <h4>no MathJax: Apple: $2, Orange: $3</h4>
}
};
</script>
<script src="../../node_modules/mathjax-v3/es5/tex-svg.js"></script>
<script src="../../node_modules/@plotly/mathjax-v3/es5/tex-svg.js"></script>
<script charset="utf-8" id="source" src="../../build/plotly.js" type="module"></script>
<script charset="utf-8" src="../../build/test_dashboard-bundle.js"></script>
</body>
Expand Down
2 changes: 1 addition & 1 deletion devtools/test_dashboard/index-mathjax3chtml.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
}
};
</script>
<script src="../../node_modules/mathjax-v3/es5/tex-chtml.js"></script>
<script src="../../node_modules/@plotly/mathjax-v3/es5/tex-chtml.js"></script>

<script charset="utf-8" id="source" src="../../build/plotly.js" type="module"></script>
<script charset="utf-8" src="../../build/test_dashboard-bundle.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion devtools/test_dashboard/index-strict.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</div>
<div id="snapshot"></div>

<script src="../../node_modules/mathjax-v2/MathJax.js?config=TeX-AMS-MML_SVG"></script>
<script src="../../node_modules/@plotly/mathjax-v2/MathJax.js?config=TeX-AMS-MML_SVG"></script>
<script charset="utf-8" id="source" src="../../build/plotly.js"></script>
<script charset="utf-8" src="../../build/test_dashboard-bundle.js"></script>
</body>
Expand Down
2 changes: 1 addition & 1 deletion devtools/test_dashboard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</div>
<div id="snapshot"></div>

<script src="../../node_modules/mathjax-v2/MathJax.js?config=TeX-AMS-MML_SVG"></script>
<script src="../../node_modules/@plotly/mathjax-v2/MathJax.js?config=TeX-AMS-MML_SVG"></script>
<script charset="utf-8" id="source" src="../../build/plotly.js"></script>
<script charset="utf-8" src="../../build/test_dashboard-bundle.js"></script>
</body>
Expand Down
Loading
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.