From 1a4eac3846016e422c5fd6febf62a0bd0028511e Mon Sep 17 00:00:00 2001 From: Emily KL <4672118+emilykl@users.noreply.github.com> Date: Thu, 26 Mar 2026 14:59:35 -0400 Subject: [PATCH 1/8] first draft --- .circleci/config.yml | 368 -------------------------------- .github/workflows/ci-builds.yml | 81 +++++++ .github/workflows/ci-format.yml | 26 +++ .github/workflows/ci-percy.yml | 58 +++++ .github/workflows/ci-tests.yml | 174 +++++++++++++++ 5 files changed, 339 insertions(+), 368 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/ci-builds.yml create mode 100644 .github/workflows/ci-format.yml create mode 100644 .github/workflows/ci-percy.yml create mode 100644 .github/workflows/ci-tests.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 0c50b2ec40..0000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,368 +0,0 @@ -version: 2.1 - -orbs: - browser-tools: circleci/browser-tools@1.4.8 - -executors: - docker-container: - parameters: - python_version: - description: "python version" - default: "3.12" - type: string - docker: - - image: cimg/python:<>-browsers - -commands: - test_core: - steps: - - checkout - - browser-tools/install-chrome - - browser-tools/install-chromedriver - - run: - name: Install dependencies - command: | - curl -LsSf https://astral.sh/uv/install.sh | sh - uv venv - source .venv/bin/activate - uv lock --check - uv sync --extra dev_core - - run: - name: List installed packages and python version - command: | - source .venv/bin/activate - uv pip list - python --version - - run: - name: Test core - command: | - source .venv/bin/activate - python -m pytest tests/test_core - no_output_timeout: 20m - - test_optional: - parameters: - pandas_version: - type: string - numpy_version: - type: string - steps: - - checkout - - browser-tools/install-chrome - - browser-tools/install-chromedriver - - run: - name: Install dependencies - command: | - curl -LsSf https://astral.sh/uv/install.sh | sh - uv venv - source .venv/bin/activate - uv sync --extra dev_optional - - - when: - condition: - not: - equal: - - <> - - "" - steps: - - run: - name: Install pandas - command: | - source .venv/bin/activate - uv pip install pandas==<> numpy==<> - - - run: - name: Test core - command: | - source .venv/bin/activate - python -m pytest tests/test_core - no_output_timeout: 20m - - run: - name: List installed packages and python version - command: | - source .venv/bin/activate - uv pip list - python --version - - run: - name: Test optional - command: | - source .venv/bin/activate - python -m pytest tests/test_optional - no_output_timeout: 40m - - run: - name: Test utils - command: | - source .venv/bin/activate - python -m pytest tests/test_plotly_utils/ - no_output_timeout: 20m - - run: - name: Test io - command: | - source .venv/bin/activate - python -m pytest tests/test_io - no_output_timeout: 20m - - run: - name: Test dependencies not imported - command: | - source .venv/bin/activate - python -m pytest -x test_init/test_dependencies_not_imported.py - - run: - name: Test lazy imports - command: | - source .venv/bin/activate - python -m pytest -x test_init/test_lazy_imports.py - - test_io_kaleido_v0: - steps: - - checkout - - browser-tools/install-chrome - - browser-tools/install-chromedriver - - run: - name: Install dependencies - command: | - curl -LsSf https://astral.sh/uv/install.sh | sh - uv venv - source .venv/bin/activate - uv sync --extra dev_optional - # Install Kaleido v0 instead of the v1 specified in requirements_optional.txt - uv pip uninstall kaleido - uv pip install kaleido==0.2.1 - - run: - name: List installed packages and python version - command: | - source .venv/bin/activate - uv pip list - python --version - - run: - name: Test plotly.io image output with Kaleido v0 - command: | - source .venv/bin/activate - python -m pytest tests/test_optional/test_kaleido - no_output_timeout: 20m - -jobs: - check-code-formatting: - docker: - - image: cimg/python:3.12 - - steps: - - checkout - - run: - name: Install ruff - command: | - uv venv - source .venv/bin/activate - uv sync --extra dev_core - - run: - name: Check handwritten code with ruff - command: | - source .venv/bin/activate - ruff format --check . - - test_core_py: - parameters: - python_version: - default: "3.12" - type: string - executor: - name: docker-container - python_version: <> - steps: - - test_core - - test_optional_py: - parameters: - python_version: - default: "3.12" - type: string - pandas_version: - default: "" - type: string - numpy_version: - default: "" - type: string - executor: - name: docker-container - python_version: <> - steps: - - test_optional: - pandas_version: <> - numpy_version: <> - - test_kaleido_v0: - parameters: - python_version: - default: "3.12" - type: string - executor: - name: docker-container - python_version: <> - steps: - - test_io_kaleido_v0 - - # Percy - python_311_percy: - docker: - - image: cimg/python:3.11-browsers - environment: - PERCY_ENABLED: True - PERCY_PROJECT: plotly/plotly.py - resource_class: large - - steps: - - checkout - - browser-tools/install-chrome - - browser-tools/install-chromedriver - - run: - name: Inject Percy Environment variables - command: | - echo 'export PERCY_TOKEN="$PERCY_PYTHON_TOKEN_V0"' >> $BASH_ENV - - run: - name: Install requirements - command: | - curl -LsSf https://astral.sh/uv/install.sh | sh - uv venv - source .venv/bin/activate - uv sync --extra dev_optional - - - run: - name: Build HTML figures (Pandas 2) - command: | - source .venv/bin/activate - python tests/percy/plotly-express.py - - run: - name: Build HTML figures (Pandas 1) and compare - command: | - source .venv/bin/activate - mkdir tests/percy/pandas2 - mv tests/percy/*.html tests/percy/pandas2/ - uv pip install pandas==1.5.3 numpy==1.26.4 - python tests/percy/plotly-express.py - python tests/percy/compare-pandas.py - rm -rf tests/percy/pandas2 - - run: - name: List installed packages and python version - command: | - source .venv/bin/activate - uv pip list - python --version - - run: - name: Run percy snapshots - command: | - npm i @percy/cli - npx percy snapshot -c tests/percy/snapshots.yml tests/percy/ - rm tests/percy/*.html - - plotlyjs_dev_build: - docker: - - image: cimg/python:3.12-node - environment: - LANG: en_US.UTF-8 - resource_class: large - - steps: - - checkout - - run: - name: Install dependencies - command: | - curl -LsSf https://astral.sh/uv/install.sh | sh - uv venv - source .venv/bin/activate - uv sync --extra dev_optional - - run: - name: Update plotly.js to dev - command: | - source .venv/bin/activate - python commands.py updateplotlyjsdev - - run: - name: Test core - command: | - source .venv/bin/activate - locale - pytest -k 'not nodev' tests/test_core - no_output_timeout: 20m - - run: - name: Build source distribution packages - command: | - source .venv/bin/activate - uv sync --extra dev_build - python -m build --sdist --wheel -o dist - when: always - - store_artifacts: - path: dist/ - - full_build: - docker: - - image: cimg/python:3.12-node - environment: - LANG: en_US.UTF-8 - resource_class: large - - steps: - - checkout - - run: - name: PyPI Build - command: | - curl -LsSf https://astral.sh/uv/install.sh | sh - uv venv - source .venv/bin/activate - uv sync --extra dev_build - cd js - npm ci - npm run build - cd .. - python -m build --sdist --wheel -o dist - cp -R dist output - git status - - - run: - name: Zip output - command: | - tar czf output.tgz output - - - store_artifacts: - path: output.tgz - -workflows: - code_formatting: - jobs: - - check-code-formatting - dev_build: - jobs: - - plotlyjs_dev_build - release_build: - jobs: - - full_build - build: - jobs: - - test_core_py: - matrix: - parameters: - python_version: - - "3.8" - - "3.9" - - "3.10" - - "3.11" - - "3.12" - - "3.13" - - test_optional_py: - matrix: - parameters: - python_version: - - "3.8" - - "3.9" - - "3.10" - - "3.11" - - "3.12" - - "3.13" - - test_optional_py: - name: "test_optional_py-3.9_pandas-1.2.4" - python_version: "3.9" - pandas_version: "1.2.4" - numpy_version: "1.26.4" - - test_kaleido_v0: - matrix: - parameters: - python_version: - - "3.12" - - python_311_percy diff --git a/.github/workflows/ci-builds.yml b/.github/workflows/ci-builds.yml new file mode 100644 index 0000000000..ffa2783aee --- /dev/null +++ b/.github/workflows/ci-builds.yml @@ -0,0 +1,81 @@ +name: CI Builds + +on: + push: + pull_request: + +jobs: + plotlyjs-dev-build: + name: plotlyjs_dev_build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: "22" + - name: Install dependencies + run: | + curl -LsSf https://astral.sh/uv/install.sh | sh + uv venv + source .venv/bin/activate + uv sync --extra dev_optional + - name: Update plotly.js to dev + run: | + source .venv/bin/activate + python commands.py updateplotlyjsdev + - name: Test core (excluding nodev) + run: | + source .venv/bin/activate + pytest -k 'not nodev' tests/test_core + - name: Build source distribution packages + run: | + source .venv/bin/activate + uv sync --extra dev_build + python -m build --sdist --wheel -o dist + - name: Upload dist artifacts + uses: actions/upload-artifact@v4 + with: + name: plotlyjs-dev-build-dist + path: dist/ + if-no-files-found: error + + full-build: + name: full_build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: "22" + - name: PyPI Build + run: | + curl -LsSf https://astral.sh/uv/install.sh | sh + uv venv + source .venv/bin/activate + uv sync --extra dev_build + cd js + npm ci + npm run build + cd .. + python -m build --sdist --wheel -o dist + cp -R dist output + git status + - name: Zip output + run: | + tar czf output.tgz output + - name: Upload output artifact + uses: actions/upload-artifact@v4 + with: + name: full-build-output + path: output.tgz + if-no-files-found: error diff --git a/.github/workflows/ci-format.yml b/.github/workflows/ci-format.yml new file mode 100644 index 0000000000..064a09495e --- /dev/null +++ b/.github/workflows/ci-format.yml @@ -0,0 +1,26 @@ +name: CI Formatting + +on: + push: + pull_request: + +jobs: + check-code-formatting: + name: check-code-formatting + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + - name: Install dependencies + run: | + curl -LsSf https://astral.sh/uv/install.sh | sh + uv venv + source .venv/bin/activate + uv sync --extra dev_core + - name: Check handwritten code with ruff + run: | + source .venv/bin/activate + ruff format --check . diff --git a/.github/workflows/ci-percy.yml b/.github/workflows/ci-percy.yml new file mode 100644 index 0000000000..edfd768861 --- /dev/null +++ b/.github/workflows/ci-percy.yml @@ -0,0 +1,58 @@ +name: CI Percy + +on: + push: + pull_request: + workflow_dispatch: + +jobs: + python-311-percy: + name: python_311_percy + runs-on: ubuntu-latest + env: + PERCY_ENABLED: "True" + PERCY_PROJECT: plotly/plotly.py + PERCY_TOKEN: ${{ secrets.PERCY_PYTHON_TOKEN_V0 }} + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: "22" + - name: Set up Chrome + uses: browser-actions/setup-chrome@v1 + - name: Set up Chromedriver + uses: nanasess/setup-chromedriver@v2 + - name: Install requirements + run: | + curl -LsSf https://astral.sh/uv/install.sh | sh + uv venv + source .venv/bin/activate + uv sync --extra dev_optional + - name: Build HTML figures (Pandas 2) + run: | + source .venv/bin/activate + python tests/percy/plotly-express.py + - name: Build HTML figures (Pandas 1) and compare + run: | + source .venv/bin/activate + mkdir tests/percy/pandas2 + mv tests/percy/*.html tests/percy/pandas2/ + uv pip install pandas==1.5.3 numpy==1.26.4 + python tests/percy/plotly-express.py + python tests/percy/compare-pandas.py + rm -rf tests/percy/pandas2 + - name: List installed packages and python version + run: | + source .venv/bin/activate + uv pip list + python --version + - name: Run percy snapshots + run: | + npm i @percy/cli + npx percy snapshot -c tests/percy/snapshots.yml tests/percy/ + rm tests/percy/*.html diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml new file mode 100644 index 0000000000..b829602585 --- /dev/null +++ b/.github/workflows/ci-tests.yml @@ -0,0 +1,174 @@ +name: CI Tests + +on: + push: + pull_request: + +jobs: + test-core: + name: test_core_py (${{ matrix.python-version }}) + 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@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Set up Chrome + uses: browser-actions/setup-chrome@v1 + with: + install-chromedriver: true + - name: Install dependencies + run: | + curl -LsSf https://astral.sh/uv/install.sh | sh + uv venv + source .venv/bin/activate + uv lock --check + uv sync --extra dev_core + - name: List installed packages and python version + run: | + source .venv/bin/activate + uv pip list + python --version + - name: Test core + run: | + source .venv/bin/activate + python -m pytest tests/test_core + + test-optional: + name: test_optional_py (${{ matrix.python-version }}) + 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@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Set up Chrome + uses: browser-actions/setup-chrome@v1 + with: + install-chromedriver: true + - name: Install dependencies + run: | + curl -LsSf https://astral.sh/uv/install.sh | sh + uv venv + source .venv/bin/activate + uv sync --extra dev_optional + - name: Test core + run: | + source .venv/bin/activate + python -m pytest tests/test_core + - name: List installed packages and python version + run: | + source .venv/bin/activate + uv pip list + python --version + - name: Test optional + run: | + source .venv/bin/activate + python -m pytest tests/test_optional + - name: Test utils + run: | + source .venv/bin/activate + python -m pytest tests/test_plotly_utils/ + - name: Test io + run: | + source .venv/bin/activate + python -m pytest tests/test_io + - name: Test dependencies not imported + run: | + source .venv/bin/activate + python -m pytest -x test_init/test_dependencies_not_imported.py + - name: Test lazy imports + run: | + source .venv/bin/activate + python -m pytest -x test_init/test_lazy_imports.py + + test-optional-legacy-pandas: + name: test_optional_py-3.9_pandas-1.2.4 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.9" + - name: Set up Chrome + uses: browser-actions/setup-chrome@v1 + with: + install-chromedriver: true + - name: Install dependencies + run: | + curl -LsSf https://astral.sh/uv/install.sh | sh + uv venv + source .venv/bin/activate + uv sync --extra dev_optional + uv pip install pandas==1.2.4 numpy==1.26.4 + - name: Test core + run: | + source .venv/bin/activate + python -m pytest tests/test_core + - name: List installed packages and python version + run: | + source .venv/bin/activate + uv pip list + python --version + - name: Test optional + run: | + source .venv/bin/activate + python -m pytest tests/test_optional + - name: Test utils + run: | + source .venv/bin/activate + python -m pytest tests/test_plotly_utils/ + - name: Test io + run: | + source .venv/bin/activate + python -m pytest tests/test_io + - name: Test dependencies not imported + run: | + source .venv/bin/activate + python -m pytest -x test_init/test_dependencies_not_imported.py + - name: Test lazy imports + run: | + source .venv/bin/activate + python -m pytest -x test_init/test_lazy_imports.py + + test-kaleido-v0: + name: test_kaleido_v0 (3.12) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + - name: Set up Chrome + uses: browser-actions/setup-chrome@v1 + with: + install-chromedriver: true + - name: Install dependencies + run: | + curl -LsSf https://astral.sh/uv/install.sh | sh + uv venv + source .venv/bin/activate + uv sync --extra dev_optional + uv pip uninstall kaleido + uv pip install kaleido==0.2.1 + - name: List installed packages and python version + run: | + source .venv/bin/activate + uv pip list + python --version + - name: Test plotly.io image output with Kaleido v0 + run: | + source .venv/bin/activate + python -m pytest tests/test_optional/test_kaleido From 89b3f084cffe0428dda6aeb5d74664bd805f686a Mon Sep 17 00:00:00 2001 From: Emily KL <4672118+emilykl@users.noreply.github.com> Date: Fri, 27 Mar 2026 13:58:29 -0400 Subject: [PATCH 2/8] use setup-chrome v2 --- .github/workflows/ci-percy.yml | 6 +++--- .github/workflows/ci-tests.yml | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci-percy.yml b/.github/workflows/ci-percy.yml index edfd768861..f36f6d7c47 100644 --- a/.github/workflows/ci-percy.yml +++ b/.github/workflows/ci-percy.yml @@ -24,9 +24,9 @@ jobs: with: node-version: "22" - name: Set up Chrome - uses: browser-actions/setup-chrome@v1 - - name: Set up Chromedriver - uses: nanasess/setup-chromedriver@v2 + uses: browser-actions/setup-chrome@v2.1.1 + with: + install-chromedriver: true - name: Install requirements run: | curl -LsSf https://astral.sh/uv/install.sh | sh diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index b829602585..e219ebd48b 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -19,7 +19,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Set up Chrome - uses: browser-actions/setup-chrome@v1 + uses: browser-actions/setup-chrome@v2.1.1 with: install-chromedriver: true - name: Install dependencies @@ -53,7 +53,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Set up Chrome - uses: browser-actions/setup-chrome@v1 + uses: browser-actions/setup-chrome@v2.1.1 with: install-chromedriver: true - name: Install dependencies @@ -102,7 +102,7 @@ jobs: with: python-version: "3.9" - name: Set up Chrome - uses: browser-actions/setup-chrome@v1 + uses: browser-actions/setup-chrome@v2.1.1 with: install-chromedriver: true - name: Install dependencies @@ -152,7 +152,7 @@ jobs: with: python-version: "3.12" - name: Set up Chrome - uses: browser-actions/setup-chrome@v1 + uses: browser-actions/setup-chrome@v2.1.1 with: install-chromedriver: true - name: Install dependencies From 59031af4a788331c7049a09ea5408f914f538bc1 Mon Sep 17 00:00:00 2001 From: Emily KL <4672118+emilykl@users.noreply.github.com> Date: Fri, 27 Mar 2026 16:15:56 -0400 Subject: [PATCH 3/8] add step to check chrome install (fail fast) --- .github/workflows/ci-builds.yml | 1 + .github/workflows/ci-format.yml | 1 + .github/workflows/ci-percy.yml | 1 + .github/workflows/ci-tests.yml | 8 ++++---- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-builds.yml b/.github/workflows/ci-builds.yml index ffa2783aee..e05b76bf79 100644 --- a/.github/workflows/ci-builds.yml +++ b/.github/workflows/ci-builds.yml @@ -3,6 +3,7 @@ name: CI Builds on: push: pull_request: + types: [opened, reopened] jobs: plotlyjs-dev-build: diff --git a/.github/workflows/ci-format.yml b/.github/workflows/ci-format.yml index 064a09495e..534853fe5a 100644 --- a/.github/workflows/ci-format.yml +++ b/.github/workflows/ci-format.yml @@ -3,6 +3,7 @@ name: CI Formatting on: push: pull_request: + types: [opened, reopened] jobs: check-code-formatting: diff --git a/.github/workflows/ci-percy.yml b/.github/workflows/ci-percy.yml index f36f6d7c47..9736fd4d4c 100644 --- a/.github/workflows/ci-percy.yml +++ b/.github/workflows/ci-percy.yml @@ -3,6 +3,7 @@ name: CI Percy on: push: pull_request: + types: [opened, reopened] workflow_dispatch: jobs: diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index e219ebd48b..fd310d062e 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -3,6 +3,7 @@ name: CI Tests on: push: pull_request: + types: [opened, reopened] jobs: test-core: @@ -18,10 +19,6 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - name: Set up Chrome - uses: browser-actions/setup-chrome@v2.1.1 - with: - install-chromedriver: true - name: Install dependencies run: | curl -LsSf https://astral.sh/uv/install.sh | sh @@ -56,6 +53,9 @@ jobs: uses: browser-actions/setup-chrome@v2.1.1 with: install-chromedriver: true + - name: Check whether we can access Chrome from Python + run: | + python -c "import webbrowser; webbrowser.get()" - name: Install dependencies run: | curl -LsSf https://astral.sh/uv/install.sh | sh From 4d1e4a4937df463b5e289443b93e6b2ddfae35b7 Mon Sep 17 00:00:00 2001 From: Emily KL <4672118+emilykl@users.noreply.github.com> Date: Fri, 27 Mar 2026 16:49:43 -0400 Subject: [PATCH 4/8] debugging --- .github/workflows/ci-tests.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index fd310d062e..6ec829bbe8 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -50,9 +50,20 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Set up Chrome + id: setup-chrome uses: browser-actions/setup-chrome@v2.1.1 with: install-chromedriver: true + - name: Print installed Chrome and Chromedriver paths and versions + run: | + echo "Chrome path: ${{ steps.setup-chrome.outputs.chrome-path }}" + echo "Chrome version: ${{ steps.setup-chrome.outputs.chrome-path }} --version" + echo "Chromedriver path: ${{ steps.setup-chrome.outputs.chromedriver-path }}" + echo "Chromedriver version: ${{ steps.setup-chrome.outputs.chromedriver-path }} --version" + echo "chrome --version: $(chrome --version)" + - name: Print Python webbrowser standard browser list + run: | + python -c "import webbrowser; webbrowser.register_standard_browsers(); print(webbrowser._tryorder)" - name: Check whether we can access Chrome from Python run: | python -c "import webbrowser; webbrowser.get()" From 7b122b81a4cdd0b3de20610114ae49f2b37adb5d Mon Sep 17 00:00:00 2001 From: Emily KL <4672118+emilykl@users.noreply.github.com> Date: Fri, 27 Mar 2026 16:53:57 -0400 Subject: [PATCH 5/8] set BROWSER env var --- .github/workflows/ci-tests.yml | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 6ec829bbe8..e08ea8b7b4 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -56,11 +56,16 @@ jobs: install-chromedriver: true - name: Print installed Chrome and Chromedriver paths and versions run: | - echo "Chrome path: ${{ steps.setup-chrome.outputs.chrome-path }}" - echo "Chrome version: ${{ steps.setup-chrome.outputs.chrome-path }} --version" - echo "Chromedriver path: ${{ steps.setup-chrome.outputs.chromedriver-path }}" - echo "Chromedriver version: ${{ steps.setup-chrome.outputs.chromedriver-path }} --version" + CHROME_PATH="${{ steps.setup-chrome.outputs.chrome-path }}" + CHROMEDRIVER_PATH="${{ steps.setup-chrome.outputs.chromedriver-path }}" + echo "Chrome path: $CHROME_PATH" + echo "Chrome version: $($CHROME_PATH --version)" + echo "Chromedriver path: $CHROMEDRIVER_PATH" + echo "Chromedriver version: $($CHROMEDRIVER_PATH --version)" echo "chrome --version: $(chrome --version)" + - name: Set BROWSER env var + run: | + echo "BROWSER=${{ steps.setup-chrome.outputs.chrome-path }}" >> $GITHUB_ENV - name: Print Python webbrowser standard browser list run: | python -c "import webbrowser; webbrowser.register_standard_browsers(); print(webbrowser._tryorder)" @@ -113,9 +118,28 @@ jobs: with: python-version: "3.9" - name: Set up Chrome + id: setup-chrome uses: browser-actions/setup-chrome@v2.1.1 with: install-chromedriver: true + - name: Print installed Chrome and Chromedriver paths and versions + run: | + CHROME_PATH="${{ steps.setup-chrome.outputs.chrome-path }}" + CHROMEDRIVER_PATH="${{ steps.setup-chrome.outputs.chromedriver-path }}" + echo "Chrome path: $CHROME_PATH" + echo "Chrome version: $($CHROME_PATH --version)" + echo "Chromedriver path: $CHROMEDRIVER_PATH" + echo "Chromedriver version: $($CHROMEDRIVER_PATH --version)" + echo "chrome --version: $(chrome --version)" + - name: Set BROWSER env var + run: | + echo "BROWSER=${{ steps.setup-chrome.outputs.chrome-path }}" >> $GITHUB_ENV + - name: Print Python webbrowser standard browser list + run: | + python -c "import webbrowser; webbrowser.register_standard_browsers(); print(webbrowser._tryorder)" + - name: Check whether we can access Chrome from Python + run: | + python -c "import webbrowser; webbrowser.get()" - name: Install dependencies run: | curl -LsSf https://astral.sh/uv/install.sh | sh From 1d0d5de49c8de9023c908cbc29a06de84bf1d168 Mon Sep 17 00:00:00 2001 From: Emily KL <4672118+emilykl@users.noreply.github.com> Date: Fri, 3 Apr 2026 12:10:15 -0400 Subject: [PATCH 6/8] standardize workflow names --- .github/workflows/{ci-builds.yml => build-package.yml} | 2 +- .github/workflows/{ci-format.yml => check-formatting.yml} | 2 +- .github/workflows/{ci-percy.yml => run-percy.yml} | 0 .github/workflows/{ci-tests.yml => run-pytest.yml} | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename .github/workflows/{ci-builds.yml => build-package.yml} (97%) rename .github/workflows/{ci-format.yml => check-formatting.yml} (95%) rename .github/workflows/{ci-percy.yml => run-percy.yml} (100%) rename .github/workflows/{ci-tests.yml => run-pytest.yml} (99%) diff --git a/.github/workflows/ci-builds.yml b/.github/workflows/build-package.yml similarity index 97% rename from .github/workflows/ci-builds.yml rename to .github/workflows/build-package.yml index e05b76bf79..ffaab751b3 100644 --- a/.github/workflows/ci-builds.yml +++ b/.github/workflows/build-package.yml @@ -1,4 +1,4 @@ -name: CI Builds +name: Build (Prod version and dev plotly.js version) on: push: diff --git a/.github/workflows/ci-format.yml b/.github/workflows/check-formatting.yml similarity index 95% rename from .github/workflows/ci-format.yml rename to .github/workflows/check-formatting.yml index 534853fe5a..1df2385cd5 100644 --- a/.github/workflows/ci-format.yml +++ b/.github/workflows/check-formatting.yml @@ -1,4 +1,4 @@ -name: CI Formatting +name: Check code formatting on: push: diff --git a/.github/workflows/ci-percy.yml b/.github/workflows/run-percy.yml similarity index 100% rename from .github/workflows/ci-percy.yml rename to .github/workflows/run-percy.yml diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/run-pytest.yml similarity index 99% rename from .github/workflows/ci-tests.yml rename to .github/workflows/run-pytest.yml index e08ea8b7b4..dc952323a9 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/run-pytest.yml @@ -1,4 +1,4 @@ -name: CI Tests +name: Run Pytest test suites on: push: From 5e1e0ec80b35152e943cbac5044d6692c934b006 Mon Sep 17 00:00:00 2001 From: Emily KL <4672118+emilykl@users.noreply.github.com> Date: Fri, 3 Apr 2026 12:16:34 -0400 Subject: [PATCH 7/8] remove pandas 1 2 comparison --- .github/workflows/run-percy.yml | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/.github/workflows/run-percy.yml b/.github/workflows/run-percy.yml index 9736fd4d4c..c7e5140745 100644 --- a/.github/workflows/run-percy.yml +++ b/.github/workflows/run-percy.yml @@ -1,4 +1,4 @@ -name: CI Percy +name: Run Percy on: push: @@ -38,20 +38,6 @@ jobs: run: | source .venv/bin/activate python tests/percy/plotly-express.py - - name: Build HTML figures (Pandas 1) and compare - run: | - source .venv/bin/activate - mkdir tests/percy/pandas2 - mv tests/percy/*.html tests/percy/pandas2/ - uv pip install pandas==1.5.3 numpy==1.26.4 - python tests/percy/plotly-express.py - python tests/percy/compare-pandas.py - rm -rf tests/percy/pandas2 - - name: List installed packages and python version - run: | - source .venv/bin/activate - uv pip list - python --version - name: Run percy snapshots run: | npm i @percy/cli From 90978355ba2c7b89aa74b9428eb877aaeb562823 Mon Sep 17 00:00:00 2001 From: Emily KL <4672118+emilykl@users.noreply.github.com> Date: Fri, 3 Apr 2026 17:03:35 -0400 Subject: [PATCH 8/8] bump github workflows to latest version --- .github/workflows/build-package.yml | 16 ++++++++-------- .github/workflows/check-formatting.yml | 4 ++-- .github/workflows/check-js-build.yml | 8 ++++---- .github/workflows/run-percy.yml | 6 +++--- .github/workflows/run-pytest.yml | 16 ++++++++-------- .github/workflows/test-release.yml | 10 +++++----- 6 files changed, 30 insertions(+), 30 deletions(-) diff --git a/.github/workflows/build-package.yml b/.github/workflows/build-package.yml index ffaab751b3..a12124341d 100644 --- a/.github/workflows/build-package.yml +++ b/.github/workflows/build-package.yml @@ -10,13 +10,13 @@ jobs: name: plotlyjs_dev_build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: "3.12" - name: Set up Node - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: "22" - name: Install dependencies @@ -39,7 +39,7 @@ jobs: uv sync --extra dev_build python -m build --sdist --wheel -o dist - name: Upload dist artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: plotlyjs-dev-build-dist path: dist/ @@ -49,13 +49,13 @@ jobs: name: full_build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: "3.12" - name: Set up Node - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: "22" - name: PyPI Build @@ -75,7 +75,7 @@ jobs: run: | tar czf output.tgz output - name: Upload output artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: full-build-output path: output.tgz diff --git a/.github/workflows/check-formatting.yml b/.github/workflows/check-formatting.yml index 1df2385cd5..fb855d6253 100644 --- a/.github/workflows/check-formatting.yml +++ b/.github/workflows/check-formatting.yml @@ -10,9 +10,9 @@ jobs: name: check-code-formatting runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: "3.12" - name: Install dependencies diff --git a/.github/workflows/check-js-build.yml b/.github/workflows/check-js-build.yml index e1c645d608..4f49a21b26 100644 --- a/.github/workflows/check-js-build.yml +++ b/.github/workflows/check-js-build.yml @@ -5,9 +5,9 @@ jobs: name: Check JS version number and build artifacts runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: "3.x" @@ -24,7 +24,7 @@ jobs: echo "✅ Version number $JSPROJECT_VERSION in $PKGJSON_PATH matches version number $PYPROJECT_VERSION in $PYPROJECT_PATH" fi - name: Install Node - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: '22' @@ -59,7 +59,7 @@ jobs: fi - name: Store the build artifacts from plotly/labextension - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 if: failure() with: name: labextension diff --git a/.github/workflows/run-percy.yml b/.github/workflows/run-percy.yml index c7e5140745..9b3f36fdac 100644 --- a/.github/workflows/run-percy.yml +++ b/.github/workflows/run-percy.yml @@ -15,13 +15,13 @@ jobs: PERCY_PROJECT: plotly/plotly.py PERCY_TOKEN: ${{ secrets.PERCY_PYTHON_TOKEN_V0 }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: "3.11" - name: Set up Node - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: "22" - name: Set up Chrome diff --git a/.github/workflows/run-pytest.yml b/.github/workflows/run-pytest.yml index dc952323a9..ea904918d7 100644 --- a/.github/workflows/run-pytest.yml +++ b/.github/workflows/run-pytest.yml @@ -14,9 +14,9 @@ jobs: matrix: python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - name: Install dependencies @@ -44,9 +44,9 @@ jobs: matrix: python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - name: Set up Chrome @@ -112,9 +112,9 @@ jobs: name: test_optional_py-3.9_pandas-1.2.4 runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: "3.9" - name: Set up Chrome @@ -181,9 +181,9 @@ jobs: name: test_kaleido_v0 (3.12) runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: "3.12" - name: Set up Chrome diff --git a/.github/workflows/test-release.yml b/.github/workflows/test-release.yml index 19c87193e1..35749dae6d 100644 --- a/.github/workflows/test-release.yml +++ b/.github/workflows/test-release.yml @@ -9,16 +9,16 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: persist-credentials: false - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: "3.x" - name: Install Node - uses: actions/setup-node@v2 + uses: actions/setup-node@v6 with: node-version: '22' @@ -41,7 +41,7 @@ jobs: - name: Build a binary wheel and a source tarball run: python3 -m build - name: Store the distribution packages - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: python-package-distributions path: dist/ @@ -61,7 +61,7 @@ jobs: steps: - name: Download all the dists - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v7 with: name: python-package-distributions path: dist/