From 231bc6255a5b32d430486d190fca672a20582451 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Thu, 5 Mar 2026 11:24:10 -0500 Subject: [PATCH 01/26] Create tests.yml --- .github/workflows/tests.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000000..0d35c2d1678 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,26 @@ +name: Tests + +on: + push: + branches: + - migrate-to-gh-actions + pull_request: + branches: + - migrate-to-gh-actions + +jobs: + check-code-formatting: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: Install uv + uses: astral-sh/setup-uv@v7 + with: + python-version: "3.12" + + - name: Install dependencies + run: uv sync --extra dev_core + + - name: Check code formatting with ruff + run: uv run ruff format --check . From 6090379f162631bd826c892584c1e6da9665f773 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Thu, 5 Mar 2026 11:28:59 -0500 Subject: [PATCH 02/26] test formatting --- plotly/io/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plotly/io/__init__.py b/plotly/io/__init__.py index e2d68242da1..ff45f7d060f 100644 --- a/plotly/io/__init__.py +++ b/plotly/io/__init__.py @@ -1,7 +1,7 @@ # ruff: noqa: F401 from _plotly_utils.importers import relative_import -from typing import TYPE_CHECKING +from typing import TYPE_CHECKING if TYPE_CHECKING: from ._kaleido import ( From d2ac9c1946d1b3dbafddaca4e24a086ad1bd1d4c Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Thu, 5 Mar 2026 11:33:24 -0500 Subject: [PATCH 03/26] Update MIGRATION_GUIDE.md --- MIGRATION_GUIDE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/MIGRATION_GUIDE.md b/MIGRATION_GUIDE.md index b7fec3cf9db..b4186e5acac 100644 --- a/MIGRATION_GUIDE.md +++ b/MIGRATION_GUIDE.md @@ -88,6 +88,7 @@ f2.layout.title = 'Age and Diabetes Factors' f2 ``` + ![Simple Subplots](example_images/subplot_methods.png) ## Breaking Changes From 3182c45a4546cdd8d5b061d1dd3f54a7f8520c81 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Thu, 5 Mar 2026 11:44:49 -0500 Subject: [PATCH 04/26] add core tests --- .github/workflows/tests.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0d35c2d1678..35ddfbb0cd6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -24,3 +24,29 @@ jobs: - name: Check code formatting with ruff run: uv run ruff format --check . + + test-core: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] + steps: + - uses: actions/checkout@v6 + + - name: Install uv + uses: astral-sh/setup-uv@v7 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: uv sync --extra dev_core + + - name: List installed packages + run: | + uv pip list + uv run python --version + + - name: Test core + run: uv run pytest tests/test_core + timeout-minutes: 20 From 78479b264689a10fe3626d96d0cf1e640c8bbd3e Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Thu, 5 Mar 2026 16:20:38 -0500 Subject: [PATCH 05/26] Revert "test formatting" This reverts commit 6090379f162631bd826c892584c1e6da9665f773. --- plotly/io/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plotly/io/__init__.py b/plotly/io/__init__.py index ff45f7d060f..e2d68242da1 100644 --- a/plotly/io/__init__.py +++ b/plotly/io/__init__.py @@ -1,7 +1,7 @@ # ruff: noqa: F401 from _plotly_utils.importers import relative_import -from typing import TYPE_CHECKING +from typing import TYPE_CHECKING if TYPE_CHECKING: from ._kaleido import ( From bbd4f52b2144fca0c3dffbda8121e540bf72f0c8 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Thu, 5 Mar 2026 16:29:49 -0500 Subject: [PATCH 06/26] test gh action --- tests/test_core/test_colors/test_colors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_core/test_colors/test_colors.py b/tests/test_core/test_colors/test_colors.py index 9f53344bd8d..cd7907a9f89 100644 --- a/tests/test_core/test_colors/test_colors.py +++ b/tests/test_core/test_colors/test_colors.py @@ -140,7 +140,7 @@ def test_get_colorscale(self): # test non-capitalised access self.assertEqual( colors.make_colorscale(colors.sequential.haline), - colors.get_colorscale("haline"), + colors.get_colorscale("viridis"), # Wrong colorscale - intentional failure ) # test capitalised access self.assertEqual( From 009beb92fdf15e6eccba57e0fa2d1a659594bd4a Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Thu, 5 Mar 2026 16:31:10 -0500 Subject: [PATCH 07/26] Revert "test gh action" This reverts commit bbd4f52b2144fca0c3dffbda8121e540bf72f0c8. --- tests/test_core/test_colors/test_colors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_core/test_colors/test_colors.py b/tests/test_core/test_colors/test_colors.py index cd7907a9f89..9f53344bd8d 100644 --- a/tests/test_core/test_colors/test_colors.py +++ b/tests/test_core/test_colors/test_colors.py @@ -140,7 +140,7 @@ def test_get_colorscale(self): # test non-capitalised access self.assertEqual( colors.make_colorscale(colors.sequential.haline), - colors.get_colorscale("viridis"), # Wrong colorscale - intentional failure + colors.get_colorscale("haline"), ) # test capitalised access self.assertEqual( From e1db3fd9f2a00d5eae5ccc074db724975696b123 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Fri, 6 Mar 2026 10:13:33 -0500 Subject: [PATCH 08/26] add new build doc workflow --- .github/workflows/build-doc.yml | 35 +++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/build-doc.yml diff --git a/.github/workflows/build-doc.yml b/.github/workflows/build-doc.yml new file mode 100644 index 00000000000..477eb54bf99 --- /dev/null +++ b/.github/workflows/build-doc.yml @@ -0,0 +1,35 @@ +name: Build Documentation + +on: + push: + branches: + - migrate-to-gh-actions + pull_request: + branches: + - migrate-to-gh-actions + +jobs: + build-doc: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: Install uv + uses: astral-sh/setup-uv@v7 + with: + python-version: "3.9" + + - name: Install system dependencies + run: sudo apt-get update && sudo apt-get install rename + + - name: Install doc dependencies + run: | + cd doc + uv venv + uv pip install -r requirements.txt + uv pip install -e .. + + - name: List installed packages + run: | + cd doc + uv pip list From 67f3fe307887d5042026a85a55ed48a8cb220dd9 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Fri, 6 Mar 2026 10:22:19 -0500 Subject: [PATCH 09/26] Update build-doc.yml --- .github/workflows/build-doc.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build-doc.yml b/.github/workflows/build-doc.yml index 477eb54bf99..b8c375d620b 100644 --- a/.github/workflows/build-doc.yml +++ b/.github/workflows/build-doc.yml @@ -27,6 +27,11 @@ jobs: cd doc uv venv uv pip install -r requirements.txt + + - name: Install plotly in editable mode + if: github.ref_name != 'doc-prod' + run: | + cd doc uv pip install -e .. - name: List installed packages From aae7584598c06a62705aad7ae86b12e986172a45 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Fri, 6 Mar 2026 10:27:16 -0500 Subject: [PATCH 10/26] remove tests workflow --- .github/workflows/tests.yml | 52 ------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index 35ddfbb0cd6..00000000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Tests - -on: - push: - branches: - - migrate-to-gh-actions - pull_request: - branches: - - migrate-to-gh-actions - -jobs: - check-code-formatting: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - - name: Install uv - uses: astral-sh/setup-uv@v7 - with: - python-version: "3.12" - - - name: Install dependencies - run: uv sync --extra dev_core - - - name: Check code formatting with ruff - run: uv run ruff format --check . - - test-core: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] - steps: - - uses: actions/checkout@v6 - - - name: Install uv - uses: astral-sh/setup-uv@v7 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: uv sync --extra dev_core - - - name: List installed packages - run: | - uv pip list - uv run python --version - - - name: Test core - run: uv run pytest tests/test_core - timeout-minutes: 20 From 6a79b0294f4ee7524b1ed8b0ca18488cac02371b Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Fri, 6 Mar 2026 10:36:40 -0500 Subject: [PATCH 11/26] Update build-doc.yml --- .github/workflows/build-doc.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/build-doc.yml b/.github/workflows/build-doc.yml index b8c375d620b..cfd0d1ac2d3 100644 --- a/.github/workflows/build-doc.yml +++ b/.github/workflows/build-doc.yml @@ -38,3 +38,21 @@ jobs: run: | cd doc uv pip list + + - name: Build HTML docs + env: + MAPBOX_TOKEN: ${{ secrets.MAPBOX_TOKEN }} + run: | + cd doc + echo "${MAPBOX_TOKEN}" > python/.mapbox_token + uv run make -kj8 || uv run make -kj8 + curl https://raw.githubusercontent.com/plotly/graphing-library-docs/master/front-matter-ci.py > front-matter-ci.py + curl https://raw.githubusercontent.com/plotly/graphing-library-docs/master/check-or-enforce-order.py > check-or-enforce-order.py + uv run python front-matter-ci.py build/html + uv run python check-or-enforce-order.py build/html + + - name: Upload docs artifact + uses: actions/upload-artifact@v4 + with: + name: doc-build + path: doc/build/ From a6620b54f98c85333e66baa62e5abcf6a1852111 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Fri, 6 Mar 2026 10:39:53 -0500 Subject: [PATCH 12/26] Update build-doc.yml --- .github/workflows/build-doc.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-doc.yml b/.github/workflows/build-doc.yml index cfd0d1ac2d3..2ee31c315b1 100644 --- a/.github/workflows/build-doc.yml +++ b/.github/workflows/build-doc.yml @@ -44,12 +44,13 @@ jobs: MAPBOX_TOKEN: ${{ secrets.MAPBOX_TOKEN }} run: | cd doc + source .venv/bin/activate echo "${MAPBOX_TOKEN}" > python/.mapbox_token - uv run make -kj8 || uv run make -kj8 + make -kj8 || make -kj8 curl https://raw.githubusercontent.com/plotly/graphing-library-docs/master/front-matter-ci.py > front-matter-ci.py curl https://raw.githubusercontent.com/plotly/graphing-library-docs/master/check-or-enforce-order.py > check-or-enforce-order.py - uv run python front-matter-ci.py build/html - uv run python check-or-enforce-order.py build/html + python front-matter-ci.py build/html + python check-or-enforce-order.py build/html - name: Upload docs artifact uses: actions/upload-artifact@v4 From ad464cb87541a8e5d4ca6fd2fcec6b4de05ab479 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Fri, 6 Mar 2026 11:36:11 -0500 Subject: [PATCH 13/26] only save html files --- .github/workflows/build-doc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-doc.yml b/.github/workflows/build-doc.yml index 2ee31c315b1..e08be5ca3c3 100644 --- a/.github/workflows/build-doc.yml +++ b/.github/workflows/build-doc.yml @@ -56,4 +56,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: doc-build - path: doc/build/ + path: doc/build/html/ From fa90dc74daaa3d6e51f4d386eccb22b61b9d5a36 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Fri, 6 Mar 2026 11:50:53 -0500 Subject: [PATCH 14/26] add api reference build to artifacts --- .circleci/config.yml | 18 ++++++++++-------- .github/workflows/build-doc.yml | 22 ++++++++++++++++++++-- 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2a4a72ef062..bc2bb0ac665 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -409,13 +409,12 @@ jobs: # For the API doc, we need to use the local version of plotly # since we are tweaking the source because of # graph_objs/graph_objects + uv pip uninstall plotly + cd .. + uv pip install -e . + cd doc/apidoc + make html if [ "${CIRCLE_BRANCH}" == "doc-prod" ]; then - uv pip uninstall plotly - cd .. - uv pip install -e . - cd doc - cd apidoc - make html cd _build/html touch .nojekyll git init @@ -430,8 +429,11 @@ jobs: fi - store_artifacts: - path: doc/build - destination: doc/build + path: doc/build/html + destination: doc-html + - store_artifacts: + path: doc/apidoc/_build/html + destination: apidoc workflows: code_formatting: diff --git a/.github/workflows/build-doc.yml b/.github/workflows/build-doc.yml index e08be5ca3c3..1e3fc6bc6aa 100644 --- a/.github/workflows/build-doc.yml +++ b/.github/workflows/build-doc.yml @@ -52,8 +52,26 @@ jobs: python front-matter-ci.py build/html python check-or-enforce-order.py build/html - - name: Upload docs artifact + - name: Upload HTML docs artifact uses: actions/upload-artifact@v4 with: - name: doc-build + name: doc-html path: doc/build/html/ + + - name: Build API docs + run: | + cd doc + source .venv/bin/activate + # For the API doc, we need to use the local version of plotly + # since we are tweaking the source because of + # graph_objs/graph_objects + uv pip uninstall plotly + uv pip install -e .. + cd apidoc + make html + + - name: Upload API docs artifact + uses: actions/upload-artifact@v4 + with: + name: apidoc-build + path: doc/apidoc/_build/html/ From bb8798aa9129b3e5f0537a3b66c4bce012d2693a Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Fri, 6 Mar 2026 13:37:14 -0500 Subject: [PATCH 15/26] Update requirements.txt --- doc/requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/requirements.txt b/doc/requirements.txt index 8f8a77ef3e3..ccd83633597 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -33,6 +33,7 @@ requests scikit-image==0.20.0 scikit-learn scipy==1.9.1 +setuptools<=81 shapely==2.0.5 sphinx==3.5.4 sphinx_bootstrap_theme From 4f27e9e8b170292182287b4d3aee19825877e79f Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Fri, 6 Mar 2026 14:04:58 -0500 Subject: [PATCH 16/26] Update config.yml --- .circleci/config.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bc2bb0ac665..80e77ca9c20 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -428,12 +428,15 @@ jobs: cd ../.. fi + - run: + name: tar apidoc artifact + command: tar -czf doc/apidoc/apidoc.tgz -C doc/apidoc/_build html - store_artifacts: path: doc/build/html destination: doc-html - store_artifacts: - path: doc/apidoc/_build/html - destination: apidoc + path: doc/apidoc/apidoc.tgz + destination: apidoc.tgz workflows: code_formatting: From 58b46ab35cf291bc38eb3413fa9d1899d047f344 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Fri, 6 Mar 2026 16:39:12 -0500 Subject: [PATCH 17/26] Update config.yml --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 80e77ca9c20..4462ec5b222 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -432,8 +432,8 @@ jobs: name: tar apidoc artifact command: tar -czf doc/apidoc/apidoc.tgz -C doc/apidoc/_build html - store_artifacts: - path: doc/build/html - destination: doc-html + path: doc/build/html.tgz + destination: doc-html.tgz - store_artifacts: path: doc/apidoc/apidoc.tgz destination: apidoc.tgz From 1f0df2ee625f94ef61e486d27f268742058314e4 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Mon, 9 Mar 2026 11:27:47 -0400 Subject: [PATCH 18/26] store all artifacts for testing --- .circleci/config.yml | 4 ++++ .github/workflows/build-doc.yml | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4462ec5b222..92d14dcaa25 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -384,6 +384,7 @@ jobs: cd ../.. fi tar -zcf build/html.tgz build/html + tar -zcf build/ipynb.tgz build/ipynb rm -rf build/html build/ipynb cd .. @@ -434,6 +435,9 @@ jobs: - store_artifacts: path: doc/build/html.tgz destination: doc-html.tgz + - store_artifacts: + path: doc/build/ipynb.tgz + destination: ipynb.tgz - store_artifacts: path: doc/apidoc/apidoc.tgz destination: apidoc.tgz diff --git a/.github/workflows/build-doc.yml b/.github/workflows/build-doc.yml index 1e3fc6bc6aa..17c010ce097 100644 --- a/.github/workflows/build-doc.yml +++ b/.github/workflows/build-doc.yml @@ -58,6 +58,12 @@ jobs: name: doc-html path: doc/build/html/ + - name: Upload notebooks artifact + uses: actions/upload-artifact@v4 + with: + name: doc-ipynb + path: doc/build/ipynb/ + - name: Build API docs run: | cd doc From 1d05f5dfb31f1acd08405ff5cbb91051251437e9 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Mon, 16 Mar 2026 13:04:08 -0400 Subject: [PATCH 19/26] remove build doc --- .circleci/config.yml | 120 ------------------------------------------- 1 file changed, 120 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 92d14dcaa25..0c50b2ec401 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -323,125 +323,6 @@ jobs: - store_artifacts: path: output.tgz - build-doc: - resource_class: xlarge - docker: - - image: cimg/python:3.9-browsers - - steps: - - add_ssh_keys: - fingerprints: - - "dc:5f:39:48:00:b4:72:34:e1:d2:c4:e1:1f:d1:e2:ce" #plotlydocbot - - - checkout - - browser-tools/install-chrome - - browser-tools/install-chromedriver - - run: - name: Install dependencies - command: | - cd doc - sudo apt-get update - sudo apt-get install rename - curl -LsSf https://astral.sh/uv/install.sh | sh - uv venv - source .venv/bin/activate - uv pip install -r requirements.txt - cd .. - if [ "${CIRCLE_BRANCH}" != "doc-prod" ]; then - uv pip uninstall plotly - uv pip install -e . - fi - - - run: - name: make html - command: | - cd doc - source .venv/bin/activate - echo ${mapbox_token} > python/.mapbox_token - make -kj8 || make -kj8 - curl https://raw.githubusercontent.com/plotly/graphing-library-docs/master/front-matter-ci.py > front-matter-ci.py - curl https://raw.githubusercontent.com/plotly/graphing-library-docs/master/check-or-enforce-order.py > check-or-enforce-order.py - python front-matter-ci.py build/html - python check-or-enforce-order.py build/html - if [ "${CIRCLE_BRANCH}" == "doc-prod" ]; then - cd build/html - git init - git config user.name plotlydocbot - git config user.email accounts@plot.ly - git add * - git commit -m "build of https://github.com/plotly/plotly.py/commit/${CIRCLE_SHA1}" - git push --force git@github.com:plotly/plotly.py-docs.git master:built - rm -rf .git - cd ../.. - cd build/ipynb - git init - git config user.name plotlydocbot - git config user.email accounts@plot.ly - git add * - git commit -m "build of https://github.com/plotly/plotly.py/commit/${CIRCLE_SHA1}" - git push --force git@github.com:plotly/plotly.py-docs.git master:built_ipynb - rm -rf .git - cd ../.. - fi - tar -zcf build/html.tgz build/html - tar -zcf build/ipynb.tgz build/ipynb - rm -rf build/html build/ipynb - cd .. - - - run: - name: trigger doc build - command: | - if [ "${CIRCLE_BRANCH}" == "doc-prod" ]; then - git clone --depth=1 https://github.com/plotly/graphing-library-docs.git - cd graphing-library-docs - git config user.name plotlydocbot - git config user.email accounts@plot.ly - git commit --allow-empty -m "deploying https://github.com/plotly/plotly.py/commit/${CIRCLE_SHA1}" - git push - cd .. - rm -rf graphing-library-docs - fi - - - run: - name: make doc - command: | - cd doc - source .venv/bin/activate - # For the API doc, we need to use the local version of plotly - # since we are tweaking the source because of - # graph_objs/graph_objects - uv pip uninstall plotly - cd .. - uv pip install -e . - cd doc/apidoc - make html - if [ "${CIRCLE_BRANCH}" == "doc-prod" ]; then - cd _build/html - touch .nojekyll - git init - git config user.name plotlydocbot - git config user.email accounts@plot.ly - git add * - git add .nojekyll - git commit -m "build of https://github.com/plotly/plotly.py/commit/${CIRCLE_SHA1}" - git push --force git@github.com:plotly/plotly.py-docs.git master:gh-pages - rm -rf .git - cd ../.. - fi - - - run: - name: tar apidoc artifact - command: tar -czf doc/apidoc/apidoc.tgz -C doc/apidoc/_build html - - store_artifacts: - path: doc/build/html.tgz - destination: doc-html.tgz - - store_artifacts: - path: doc/build/ipynb.tgz - destination: ipynb.tgz - - store_artifacts: - path: doc/apidoc/apidoc.tgz - destination: apidoc.tgz - workflows: code_formatting: jobs: @@ -485,4 +366,3 @@ workflows: python_version: - "3.12" - python_311_percy - - build-doc From dff6abcf431794da82bea5b452696ebaba0cfe6c Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Mon, 16 Mar 2026 13:06:40 -0400 Subject: [PATCH 20/26] Update build-doc.yml --- .github/workflows/build-doc.yml | 93 +++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/.github/workflows/build-doc.yml b/.github/workflows/build-doc.yml index 17c010ce097..700cfde5ff4 100644 --- a/.github/workflows/build-doc.yml +++ b/.github/workflows/build-doc.yml @@ -26,17 +26,20 @@ jobs: run: | cd doc uv venv + source .venv/bin/activate uv pip install -r requirements.txt - name: Install plotly in editable mode if: github.ref_name != 'doc-prod' run: | cd doc + source .venv/bin/activate uv pip install -e .. - name: List installed packages run: | cd doc + source .venv/bin/activate uv pip list - name: Build HTML docs @@ -65,6 +68,7 @@ jobs: path: doc/build/ipynb/ - name: Build API docs + if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push' run: | cd doc source .venv/bin/activate @@ -77,7 +81,96 @@ jobs: make html - name: Upload API docs artifact + if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push' uses: actions/upload-artifact@v4 with: name: apidoc-build path: doc/apidoc/_build/html/ + + # Deploy steps — currently using test branches for validation + # TODO: Change branch trigger to 'doc-prod' and deploy branches to 'built', 'built_ipynb', 'gh-pages' + - name: Create GitHub App token + if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push' + uses: actions/create-github-app-token@v2 + id: app-token + with: + app-id: ${{ vars.GRAPHING_LIBRARIES_CI_GHAPP_ID }} + private-key: ${{ secrets.GRAPHING_LIBRARIES_CI_GHAPP_PRIVATE_KEY }} + owner: ${{ github.repository_owner }} + repositories: plotly.py-docs,graphing-library-docs + + - name: Checkout plotly.py-docs (built-test) + if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push' + uses: actions/checkout@v6 + with: + repository: plotly/plotly.py-docs + ref: built-test + token: ${{ steps.app-token.outputs.token }} + path: plotly.py-docs-html + + - name: Deploy HTML docs + if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push' + run: | + git config --global user.name plotlydocbot + git config --global user.email accounts@plot.ly + rm -rf plotly.py-docs-html/* + cp -r doc/build/html/* plotly.py-docs-html/ + cd plotly.py-docs-html + git add . + git commit -m "build of https://github.com/plotly/plotly.py/commit/${{ github.sha }}" || echo "No changes to commit" + git push --force + + - name: Checkout plotly.py-docs (built_ipynb-test) + if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push' + uses: actions/checkout@v6 + with: + repository: plotly/plotly.py-docs + ref: built_ipynb-test + token: ${{ steps.app-token.outputs.token }} + path: plotly.py-docs-ipynb + + - name: Deploy notebooks + if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push' + run: | + rm -rf plotly.py-docs-ipynb/* + cp -r doc/build/ipynb/* plotly.py-docs-ipynb/ + cd plotly.py-docs-ipynb + git add . + git commit -m "build of https://github.com/plotly/plotly.py/commit/${{ github.sha }}" || echo "No changes to commit" + git push --force + + - name: Checkout plotly.py-docs (gh-pages-test) + if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push' + uses: actions/checkout@v6 + with: + repository: plotly/plotly.py-docs + ref: gh-pages-test + token: ${{ steps.app-token.outputs.token }} + path: plotly.py-docs-api + + - name: Deploy API docs + if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push' + run: | + rm -rf plotly.py-docs-api/* + cp -r doc/apidoc/_build/html/* plotly.py-docs-api/ + touch plotly.py-docs-api/.nojekyll + cd plotly.py-docs-api + git add . + git commit -m "build of https://github.com/plotly/plotly.py/commit/${{ github.sha }}" || echo "No changes to commit" + git push --force + + - name: Checkout graphing-library-docs + if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push' + uses: actions/checkout@v6 + with: + repository: plotly/graphing-library-docs + ref: test-trigger + token: ${{ steps.app-token.outputs.token }} + path: graphing-library-docs + + - name: Trigger downstream doc build + if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push' + run: | + cd graphing-library-docs + git commit --allow-empty -m "deploying https://github.com/plotly/plotly.py/commit/${{ github.sha }}" + git push From 4e98be7cf198d1b8a6faa099e9fe2892d3f0a21b Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Mon, 16 Mar 2026 14:31:17 -0400 Subject: [PATCH 21/26] remove notebook and api docs artifacts --- .github/workflows/build-doc.yml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/.github/workflows/build-doc.yml b/.github/workflows/build-doc.yml index 700cfde5ff4..b4989f9654c 100644 --- a/.github/workflows/build-doc.yml +++ b/.github/workflows/build-doc.yml @@ -61,12 +61,6 @@ jobs: name: doc-html path: doc/build/html/ - - name: Upload notebooks artifact - uses: actions/upload-artifact@v4 - with: - name: doc-ipynb - path: doc/build/ipynb/ - - name: Build API docs if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push' run: | @@ -80,13 +74,6 @@ jobs: cd apidoc make html - - name: Upload API docs artifact - if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push' - uses: actions/upload-artifact@v4 - with: - name: apidoc-build - path: doc/apidoc/_build/html/ - # Deploy steps — currently using test branches for validation # TODO: Change branch trigger to 'doc-prod' and deploy branches to 'built', 'built_ipynb', 'gh-pages' - name: Create GitHub App token From 3ae60745cb033cdab1e84268b0662938dbda1ccb Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Tue, 17 Mar 2026 10:30:55 -0400 Subject: [PATCH 22/26] change step order --- .github/workflows/build-doc.yml | 59 +++++++++++++++++---------------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/.github/workflows/build-doc.yml b/.github/workflows/build-doc.yml index b4989f9654c..d8a43a97b89 100644 --- a/.github/workflows/build-doc.yml +++ b/.github/workflows/build-doc.yml @@ -34,6 +34,7 @@ jobs: run: | cd doc source .venv/bin/activate + uv pip uninstall plotly uv pip install -e .. - name: List installed packages @@ -61,19 +62,6 @@ jobs: name: doc-html path: doc/build/html/ - - name: Build API docs - if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push' - run: | - cd doc - source .venv/bin/activate - # For the API doc, we need to use the local version of plotly - # since we are tweaking the source because of - # graph_objs/graph_objects - uv pip uninstall plotly - uv pip install -e .. - cd apidoc - make html - # Deploy steps — currently using test branches for validation # TODO: Change branch trigger to 'doc-prod' and deploy branches to 'built', 'built_ipynb', 'gh-pages' - name: Create GitHub App token @@ -126,6 +114,35 @@ jobs: git commit -m "build of https://github.com/plotly/plotly.py/commit/${{ github.sha }}" || echo "No changes to commit" git push --force + - name: Checkout graphing-library-docs + if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push' + uses: actions/checkout@v6 + with: + repository: plotly/graphing-library-docs + ref: test-trigger + token: ${{ steps.app-token.outputs.token }} + path: graphing-library-docs + + - name: Trigger downstream doc build + if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push' + run: | + cd graphing-library-docs + git commit --allow-empty -m "deploying https://github.com/plotly/plotly.py/commit/${{ github.sha }}" + git push + + - name: Build API docs + if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push' + run: | + cd doc + source .venv/bin/activate + # For the API doc, we need to use the local version of plotly + # since we are tweaking the source because of + # graph_objs/graph_objects + uv pip uninstall plotly + uv pip install -e .. + cd apidoc + make html + - name: Checkout plotly.py-docs (gh-pages-test) if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push' uses: actions/checkout@v6 @@ -145,19 +162,3 @@ jobs: git add . git commit -m "build of https://github.com/plotly/plotly.py/commit/${{ github.sha }}" || echo "No changes to commit" git push --force - - - name: Checkout graphing-library-docs - if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push' - uses: actions/checkout@v6 - with: - repository: plotly/graphing-library-docs - ref: test-trigger - token: ${{ steps.app-token.outputs.token }} - path: graphing-library-docs - - - name: Trigger downstream doc build - if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push' - run: | - cd graphing-library-docs - git commit --allow-empty -m "deploying https://github.com/plotly/plotly.py/commit/${{ github.sha }}" - git push From 52a0d06b4ba0b5bb6e515e7c0800fb01d0222a08 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Tue, 17 Mar 2026 10:49:46 -0400 Subject: [PATCH 23/26] test build --- doc/python/static-image-generation-migration.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/python/static-image-generation-migration.md b/doc/python/static-image-generation-migration.md index f6476a9cb93..2a7631ae2d0 100644 --- a/doc/python/static-image-generation-migration.md +++ b/doc/python/static-image-generation-migration.md @@ -80,4 +80,5 @@ If you are migrating from Orca, the following config settings do not apply to Ka ## Multiple Image Export Plotly.py 6.1 includes a `write_images` function (`plotly.io.write_images`), which we recommend over `write_image` when exporting more than one figure. Calling `write_images` with a list of figures (or dicts representing figures) to export provides better performance than multiple calls with `write_image`. See the [Write Multiple Images](/python/static-image-export#write-multiple-images) section for more details. + From 783a9536c70fc8983559d07f0d20d5054cce9235 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Tue, 17 Mar 2026 12:09:27 -0400 Subject: [PATCH 24/26] Update build-doc.yml --- .github/workflows/build-doc.yml | 40 +++++++++++++++------------------ 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build-doc.yml b/.github/workflows/build-doc.yml index d8a43a97b89..8e994093cfd 100644 --- a/.github/workflows/build-doc.yml +++ b/.github/workflows/build-doc.yml @@ -3,10 +3,8 @@ name: Build Documentation on: push: branches: - - migrate-to-gh-actions + - doc-prod pull_request: - branches: - - migrate-to-gh-actions jobs: build-doc: @@ -62,10 +60,8 @@ jobs: name: doc-html path: doc/build/html/ - # Deploy steps — currently using test branches for validation - # TODO: Change branch trigger to 'doc-prod' and deploy branches to 'built', 'built_ipynb', 'gh-pages' - name: Create GitHub App token - if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push' + if: github.ref_name == 'doc-prod' && github.event_name == 'push' uses: actions/create-github-app-token@v2 id: app-token with: @@ -74,17 +70,17 @@ jobs: owner: ${{ github.repository_owner }} repositories: plotly.py-docs,graphing-library-docs - - name: Checkout plotly.py-docs (built-test) - if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push' + - name: Checkout plotly.py-docs (built) + if: github.ref_name == 'doc-prod' && github.event_name == 'push' uses: actions/checkout@v6 with: repository: plotly/plotly.py-docs - ref: built-test + ref: built token: ${{ steps.app-token.outputs.token }} path: plotly.py-docs-html - name: Deploy HTML docs - if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push' + if: github.ref_name == 'doc-prod' && github.event_name == 'push' run: | git config --global user.name plotlydocbot git config --global user.email accounts@plot.ly @@ -95,17 +91,17 @@ jobs: git commit -m "build of https://github.com/plotly/plotly.py/commit/${{ github.sha }}" || echo "No changes to commit" git push --force - - name: Checkout plotly.py-docs (built_ipynb-test) - if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push' + - name: Checkout plotly.py-docs (built_ipynb) + if: github.ref_name == 'doc-prod' && github.event_name == 'push' uses: actions/checkout@v6 with: repository: plotly/plotly.py-docs - ref: built_ipynb-test + ref: built_ipynb token: ${{ steps.app-token.outputs.token }} path: plotly.py-docs-ipynb - name: Deploy notebooks - if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push' + if: github.ref_name == 'doc-prod' && github.event_name == 'push' run: | rm -rf plotly.py-docs-ipynb/* cp -r doc/build/ipynb/* plotly.py-docs-ipynb/ @@ -115,23 +111,23 @@ jobs: git push --force - name: Checkout graphing-library-docs - if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push' + if: github.ref_name == 'doc-prod' && github.event_name == 'push' uses: actions/checkout@v6 with: repository: plotly/graphing-library-docs - ref: test-trigger + ref: master token: ${{ steps.app-token.outputs.token }} path: graphing-library-docs - name: Trigger downstream doc build - if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push' + if: github.ref_name == 'doc-prod' && github.event_name == 'push' run: | cd graphing-library-docs git commit --allow-empty -m "deploying https://github.com/plotly/plotly.py/commit/${{ github.sha }}" git push - name: Build API docs - if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push' + if: github.ref_name == 'doc-prod' && github.event_name == 'push' run: | cd doc source .venv/bin/activate @@ -143,17 +139,17 @@ jobs: cd apidoc make html - - name: Checkout plotly.py-docs (gh-pages-test) - if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push' + - name: Checkout plotly.py-docs (gh-pages) + if: github.ref_name == 'doc-prod' && github.event_name == 'push' uses: actions/checkout@v6 with: repository: plotly/plotly.py-docs - ref: gh-pages-test + ref: gh-pages token: ${{ steps.app-token.outputs.token }} path: plotly.py-docs-api - name: Deploy API docs - if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push' + if: github.ref_name == 'doc-prod' && github.event_name == 'push' run: | rm -rf plotly.py-docs-api/* cp -r doc/apidoc/_build/html/* plotly.py-docs-api/ From 400aed388f912531ed4d092a71421dd3a4678577 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Tue, 17 Mar 2026 14:51:22 -0400 Subject: [PATCH 25/26] Apply suggestion from @LiamConnors --- doc/python/static-image-generation-migration.md | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/python/static-image-generation-migration.md b/doc/python/static-image-generation-migration.md index 2a7631ae2d0..f6476a9cb93 100644 --- a/doc/python/static-image-generation-migration.md +++ b/doc/python/static-image-generation-migration.md @@ -80,5 +80,4 @@ If you are migrating from Orca, the following config settings do not apply to Ka ## Multiple Image Export Plotly.py 6.1 includes a `write_images` function (`plotly.io.write_images`), which we recommend over `write_image` when exporting more than one figure. Calling `write_images` with a list of figures (or dicts representing figures) to export provides better performance than multiple calls with `write_image`. See the [Write Multiple Images](/python/static-image-export#write-multiple-images) section for more details. - From 700b472571275bc57002ad084d2fa736b9c515dd Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Tue, 17 Mar 2026 14:51:37 -0400 Subject: [PATCH 26/26] Apply suggestion from @LiamConnors --- MIGRATION_GUIDE.md | 1 - 1 file changed, 1 deletion(-) diff --git a/MIGRATION_GUIDE.md b/MIGRATION_GUIDE.md index b4186e5acac..b7fec3cf9db 100644 --- a/MIGRATION_GUIDE.md +++ b/MIGRATION_GUIDE.md @@ -88,7 +88,6 @@ f2.layout.title = 'Age and Diabetes Factors' f2 ``` - ![Simple Subplots](example_images/subplot_methods.png) ## Breaking Changes