Skip to content

separate CI workflow that uses release version of pygfx #709

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 5 commits into from
Jan 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
88 changes: 88 additions & 0 deletions .github/workflows/ci-pygfx-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main
types:
- opened
- reopened
- synchronize
- ready_for_review

jobs:
test-build-full:
name: Tests - pygfx release
timeout-minutes: 25
if: ${{ !github.event.pull_request.draft }}
strategy:
fail-fast: false
matrix:
python: ["3.11", "3.12", "3.13"]
imgui_dep: ["imgui", ""]
notebook_dep: ["notebook", ""]
os: ["ubuntu-latest", "macos-latest"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install llvmpipe and lavapipe for offscreen canvas
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt-get update -y -qq
sudo apt-get install --no-install-recommends -y ffmpeg libegl1-mesa-dev libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers xorg-dev
- name: Set up Homebrew
if: ${{ matrix.os == 'macos-latest' }}
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Install gsed
if: ${{ matrix.os == 'macos-latest' }}
run: |
brew install gnu-sed
echo "/opt/homebrew/opt/gnu-sed/libexec/gnubin" >> "$GITHUB_PATH"
- name: Install fastplotlib
run: |
# create string with one of: tests,imgui,notebook; test,imgui; test,notebook ; tests
# sed removes trailing comma
# install fastplotlib with given extras options from above
pip install -e ".[$(echo "tests,${{ matrix.imgui_dep }},${{ matrix.notebook_dep }}" | sed -e "s/,\+/,/g" -e "s/,$//")]"
- name: Show wgpu backend
run:
python -c "from examples.tests.testutils import wgpu_backend; print(wgpu_backend)"
- name: Test components
env:
WGPU_FORCE_OFFSCREEN: 1
run: |
pytest -v tests/
- name: Test examples
env:
WGPU_FORCE_OFFSCREEN: 1
run: |
pytest -v examples/
- name: Test examples notebooks, exclude ImageWidget notebook
if: ${{ matrix.notebook_dep == 'notebook' }}
env:
FASTPLOTLIB_NB_TESTS: 1
# test notebooks, exclude ImageWidget notebooks
run: pytest --nbmake $(find ./examples/notebooks/ -maxdepth 1 -type f -name "*.ipynb" ! -name "image_widget*.ipynb" -print | xargs)
- name: Test ImageWidget notebooks
# test image widget notebooks only if imgui is installed
if: ${{ matrix.notebook_dep == 'notebook' && matrix.imgui_dep == 'imgui' }}
env:
FASTPLOTLIB_NB_TESTS: 1
run: pytest --nbmake $(find ./examples/notebooks/ -maxdepth 1 -type f -name "image_widget*.ipynb" -print | xargs)
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: screenshot-diffs-${{ matrix.pyversion }}-${{ matrix.imgui_dep }}-${{ matrix.notebook_dep }}
path: |
examples/diffs
examples/notebooks/diffs
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ jobs:
python: ["3.11", "3.12", "3.13"]
imgui_dep: ["imgui", ""]
notebook_dep: ["notebook", ""]
pygfx_version: ["pygfx-release", "pygfx-main"]
os: ["ubuntu-latest", "macos-latest"]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -50,7 +49,6 @@ jobs:
brew install gnu-sed
echo "/opt/homebrew/opt/gnu-sed/libexec/gnubin" >> "$GITHUB_PATH"
- name: Install pygx from main
if: ${{ matrix.pygfx_version == 'pygfx-main' }}
run: |
python -m pip install --upgrade pip setuptools
# remove pygfx from install_requires, we install using pygfx@main
Expand Down
5 changes: 4 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,5 +304,8 @@ FASTPLOTLIB_NB_TESTS=1 pytest --nbmake examples/notebooks/

5) Update screenshots if necessary ([see testing](#testing-details))

6) Push and open a draft PR against `main`
6) Push and open a PR (pull request) against the `main` branch

> **Note:**
> The tests labeled "CI / Tests" must pass, but the tests labeled "CI / Tests - pygfx release" do not necessarily need to pass. The difference between these two workflows is "CI / Tests" uses the `main` branch of [`pygfx`](https://github.com/pygfx/pygfx) whereas "CI / Tests - pygfx release" uses the latest release of `pygfx`.
> Since `fastplotlib`, `pygfx`, and `wgpu` are all under rapid development we aim to keep `fastplotlib` up to date with `pygfx@main` until `pygfx` stabilizes. The workflow "CI / Tests - pygfx release" is to inform us if any test failures using the release version of `pygfx` are a significant release blocker for `fastplotlib`. Once you make a PR we will help guide you through any failures with "CI / Tests - pygfx release"!
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy