Skip to content

Commit b814495

Browse files
authored
Merge branch 'main' into dependabot/npm_and_yarn/js/lodash-4.18.1
2 parents 5f9e03a + 7935a69 commit b814495

105 files changed

Lines changed: 9635 additions & 16196 deletions

File tree

Some content is hidden

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

‎.github/workflows/build-doc.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
1818

1919
- name: Set up uv
20-
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
20+
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
2121
with:
22-
python-version: "3.9"
22+
python-version: "3.10"
2323

2424
- name: Install system dependencies
2525
run: sudo apt-get update && sudo apt-get install rename
@@ -56,14 +56,14 @@ jobs:
5656
python check-or-enforce-order.py build/html
5757
5858
- name: Upload HTML docs artifact
59-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
59+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
6060
with:
6161
name: doc-html
6262
path: doc/build/html/
6363

6464
- name: Create GitHub App token
6565
if: github.ref_name == 'doc-prod' && github.event_name == 'push'
66-
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
66+
uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0
6767
id: app-token
6868
with:
6969
app-id: ${{ vars.GRAPHING_LIBRARIES_CI_GHAPP_ID }}

‎.github/workflows/build-package.yml‎

Lines changed: 4 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -11,61 +11,21 @@ permissions:
1111
contents: read
1212

1313
jobs:
14-
plotlyjs-dev-build:
15-
name: plotly.js dev build
16-
runs-on: ubuntu-latest
17-
steps:
18-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
19-
- name: Set up Python
20-
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
21-
with:
22-
python-version: "3.12"
23-
- name: Set up Node
24-
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
25-
with:
26-
node-version: "22"
27-
- name: Set up uv
28-
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
29-
- name: Install dependencies
30-
run: |
31-
uv venv
32-
source .venv/bin/activate
33-
uv sync --locked --extra dev_optional
34-
- name: Update plotly.js to dev
35-
run: |
36-
source .venv/bin/activate
37-
python commands.py updateplotlyjsdev
38-
- name: Test core (excluding nodev)
39-
run: |
40-
source .venv/bin/activate
41-
pytest -k 'not nodev' tests/test_core
42-
- name: Build source distribution packages
43-
run: |
44-
source .venv/bin/activate
45-
uv sync --locked --extra dev_build
46-
python -m build --sdist --wheel -o dist
47-
- name: Upload dist artifacts
48-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
49-
with:
50-
name: plotlyjs-dev-build-dist
51-
path: dist/
52-
if-no-files-found: error
53-
5414
full-build:
5515
name: Full prod build
5616
runs-on: ubuntu-latest
5717
steps:
5818
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
5919
- name: Set up Python
60-
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
20+
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
6121
with:
6222
python-version: "3.12"
6323
- name: Set up Node
64-
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
24+
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
6525
with:
6626
node-version: "22"
6727
- name: Set up uv
68-
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
28+
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
6929
- name: PyPI Build
7030
run: |
7131
uv venv
@@ -82,7 +42,7 @@ jobs:
8242
run: |
8343
tar czf output.tgz output
8444
- name: Upload output artifact
85-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
45+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
8646
with:
8747
name: full-build-output
8848
path: output.tgz

‎.github/workflows/check-codegen.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ jobs:
1717
steps:
1818
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
1919
- name: Set up Python
20-
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
20+
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
2121
with:
2222
python-version: "3.x"
2323

2424
- name: Set up uv
25-
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
25+
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
2626

2727
- name: Install dependencies
2828
run: |

‎.github/workflows/check-formatting.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ jobs:
1717
steps:
1818
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
1919
- name: Set up Python
20-
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
20+
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
2121
with:
2222
python-version: "3.12"
2323
- name: Set up uv
24-
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
24+
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
2525
- name: Install dependencies
2626
run: |
2727
uv venv

‎.github/workflows/check-js-build.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
steps:
2121
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2222
- name: Set up Python
23-
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
23+
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
2424
with:
2525
python-version: "3.x"
2626

@@ -37,12 +37,12 @@ jobs:
3737
echo "✅ Version number $JSPROJECT_VERSION in $PKGJSON_PATH matches version number $PYPROJECT_VERSION in $PYPROJECT_PATH"
3838
fi
3939
- name: Install Node
40-
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
40+
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
4141
with:
4242
node-version: '22'
4343

4444
- name: Set up uv
45-
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
45+
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
4646

4747
- name: Copy current files to a temporary directory
4848
run: |
@@ -76,7 +76,7 @@ jobs:
7676
fi
7777
7878
- name: Store the build artifacts from plotly/labextension
79-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
79+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
8080
if: failure()
8181
with:
8282
name: labextension

‎.github/workflows/run-percy.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,19 @@ jobs:
2222
steps:
2323
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2424
- name: Set up Python
25-
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
25+
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
2626
with:
2727
python-version: "3.11"
2828
- name: Set up Node
29-
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
29+
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
3030
with:
3131
node-version: "22"
3232
- name: Set up Chrome
3333
uses: browser-actions/setup-chrome@48ad923757ca74d66703209fe939badbdf80f2f4 # v2.2.0
3434
with:
3535
install-chromedriver: true
3636
- name: Set up uv
37-
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
37+
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
3838
- name: Install requirements
3939
run: |
4040
uv venv

‎.github/workflows/run-pytest.yml‎

Lines changed: 42 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
20+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
2121
steps:
2222
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2323
- name: Set up Python
24-
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
24+
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
2525
with:
2626
python-version: ${{ matrix.python-version }}
2727
- name: Set up uv
28-
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
28+
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
2929
- name: Install dependencies
3030
run: |
3131
uv venv
@@ -40,21 +40,22 @@ jobs:
4040
4141
test-optional:
4242
name: Optional tests (Python ${{ matrix.python-version }})
43-
runs-on: ubuntu-latest
43+
# ubuntu is pinned due to timezone-related test failures on ubuntu-latest
44+
runs-on: ubuntu-24.04
4445
strategy:
4546
fail-fast: false
4647
matrix:
47-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
48+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
4849
steps:
4950
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
5051
- name: Set up Python
51-
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
52+
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
5253
with:
5354
python-version: ${{ matrix.python-version }}
5455
- name: Set up Chrome for Pytest
5556
uses: ./.github/actions/setup-chrome-for-pytest
5657
- name: Set up uv
57-
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
58+
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
5859
- name: Install dependencies
5960
run: |
6061
uv venv
@@ -88,25 +89,26 @@ jobs:
8889
8990
test-optional-legacy-pandas:
9091
name: Optional tests (Python ${{ matrix.python-version }}, pandas ${{ matrix.pandas-version }})
91-
runs-on: ubuntu-latest
92+
# ubuntu is pinned due to timezone-related test failures on ubuntu-latest
93+
runs-on: ubuntu-24.04
9294
strategy:
9395
fail-fast: false
9496
matrix:
9597
include:
96-
- python-version: "3.9"
98+
- python-version: "3.10"
9799
pandas-version: "1"
98100
- python-version: "3.11"
99101
pandas-version: "2"
100102
steps:
101103
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
102104
- name: Set up Python
103-
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
105+
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
104106
with:
105107
python-version: ${{ matrix.python-version }}
106108
- name: Set up Chrome for browser tests
107109
uses: ./.github/actions/setup-chrome-for-pytest
108110
- name: Set up uv
109-
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
111+
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
110112
- name: Install dependencies
111113
run: |
112114
uv venv
@@ -143,15 +145,15 @@ jobs:
143145
steps:
144146
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
145147
- name: Set up Python
146-
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
148+
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
147149
with:
148150
python-version: "3.12"
149151
- name: Set up Chrome
150152
uses: browser-actions/setup-chrome@48ad923757ca74d66703209fe939badbdf80f2f4 # v2.2.0
151153
with:
152154
install-chromedriver: true
153155
- name: Set up uv
154-
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
156+
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
155157
- name: Install dependencies
156158
run: |
157159
uv venv
@@ -164,3 +166,30 @@ jobs:
164166
run: |
165167
source .venv/bin/activate
166168
python -m pytest tests/test_optional/test_kaleido/test_kaleido_v0_error.py
169+
170+
test-matplotlylib:
171+
name: Matplotlylib tests (Python ${{ matrix.python-version }})
172+
runs-on: ubuntu-latest
173+
strategy:
174+
fail-fast: false
175+
matrix:
176+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
177+
steps:
178+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
179+
- name: Set up Python
180+
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
181+
with:
182+
python-version: ${{ matrix.python-version }}
183+
- name: Set up uv
184+
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
185+
- name: Install dependencies
186+
run: |
187+
uv venv
188+
source .venv/bin/activate
189+
uv lock --check
190+
uv sync --locked --extra dev_matplotlib
191+
python --version
192+
- name: Test matplotlylib
193+
run: |
194+
source .venv/bin/activate
195+
python -m pytest plotly/matplotlylib/tests plotly/matplotlylib/mplexporter/tests
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Test plotly.js dev
2+
3+
# Run codegen and the core tests against the plot-schema.json on plotly.js main
4+
# once a week. This catches plotly.js schema changes that break codegen or
5+
# validation before the next plotly.js release.
6+
on:
7+
schedule:
8+
- cron: "0 9 * * 1" # Monday 09:00 UTC
9+
workflow_dispatch:
10+
inputs:
11+
plotlyjs_ref:
12+
description: "plotly.js branch, tag, or commit SHA to test"
13+
required: false
14+
default: "main"
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
test-plotlyjs-dev:
21+
name: Test against plotly.js dev schema
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
25+
with:
26+
persist-credentials: false
27+
- name: Set up Python
28+
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
29+
with:
30+
python-version: "3.12"
31+
- name: Set up uv
32+
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
33+
- name: Install dependencies
34+
run: |
35+
uv venv
36+
source .venv/bin/activate
37+
uv sync --locked --extra dev_optional
38+
- name: Download plot-schema.json from plotly.js
39+
# plotly.js CI keeps test/plot-schema.json identical to the built schema
40+
env:
41+
PLOTLYJS_REF: ${{ inputs.plotlyjs_ref || 'main' }}
42+
run: |
43+
curl -fsSL -o codegen/resources/plot-schema.json \
44+
"https://raw.githubusercontent.com/plotly/plotly.js/${PLOTLYJS_REF}/test/plot-schema.json"
45+
- name: Run codegen
46+
run: |
47+
source .venv/bin/activate
48+
python commands.py codegen
49+
- name: Test core (excluding nodev)
50+
run: |
51+
source .venv/bin/activate
52+
pytest -k 'not nodev' tests/test_core
53+
54+
report-failure:
55+
name: Open an issue for a failed scheduled run
56+
needs: test-plotlyjs-dev
57+
# Manual runs can test any plotly.js ref, so only report scheduled runs
58+
if: failure() && github.event_name == 'schedule'
59+
runs-on: ubuntu-latest
60+
permissions:
61+
issues: write
62+
steps:
63+
- name: Open or update the failure issue
64+
env:
65+
GH_TOKEN: ${{ github.token }}
66+
GH_REPO: ${{ github.repository }}
67+
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
68+
TITLE: "Weekly plotly.js dev test failed"
69+
run: |
70+
BODY="The weekly test against the plot-schema.json on plotly.js main failed: ${RUN_URL}"
71+
# Comment on an open issue from an earlier failure instead of opening a duplicate
72+
EXISTING=$(gh issue list --state open --search "in:title \"${TITLE}\"" \
73+
--json number,title --jq "map(select(.title == \"${TITLE}\")) | .[0].number // empty")
74+
if [ -n "${EXISTING}" ]; then
75+
gh issue comment "${EXISTING}" --body "${BODY}"
76+
else
77+
gh issue create --title "${TITLE}" --body "${BODY}"
78+
fi

0 commit comments

Comments
 (0)