From 50eb7ca7666dfda0f96423951113e0e53fc52b60 Mon Sep 17 00:00:00 2001 From: Kushal Kolar Date: Fri, 24 Jan 2025 20:39:31 -0500 Subject: [PATCH 1/4] add job that uses release version of pygfx --- .github/workflows/ci.yml | 63 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b12687a34..513c9dafc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,7 +82,70 @@ jobs: examples/diffs examples/notebooks/diffs +jobs: + test-using-pygfx-release: + name: Test Linux pygfx release + runs-on: ubuntu-latest + 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", ""] + 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 + 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: 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: + PYGFX_EXPECT_LAVAPIPE: true + run: | + WGPU_FORCE_OFFSCREEN=1 pytest -v tests/ + - name: Test examples + env: + PYGFX_EXPECT_LAVAPIPE: true + run: | + WGPU_FORCE_OFFSCREEN=1 pytest -v examples/ + - name: Test examples notebooks, exclude ImageWidget notebook + if: ${{ matrix.notebook_dep == 'notebook' }} + env: + PYGFX_EXPECT_LAVAPIPE: true + # test notebooks, exclude ImageWidget notebooks + run: FASTPLOTLIB_NB_TESTS=1 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: + PYGFX_EXPECT_LAVAPIPE: true + run: FASTPLOTLIB_NB_TESTS=1 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 + # test-build-full-mac: # name: Test Mac, notebook + glfw # runs-on: macos-14 From c3335760b820f57687dbb93aef630895b2686816 Mon Sep 17 00:00:00 2001 From: Kushal Kolar Date: Fri, 24 Jan 2025 20:43:56 -0500 Subject: [PATCH 2/4] Update ci.yml --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 513c9dafc..4ce291c73 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -81,8 +81,7 @@ jobs: path: | examples/diffs examples/notebooks/diffs - -jobs: + test-using-pygfx-release: name: Test Linux pygfx release runs-on: ubuntu-latest From ff67efffe31ced1f240616a50d351dce89d50dff Mon Sep 17 00:00:00 2001 From: Kushal Kolar Date: Fri, 24 Jan 2025 21:05:43 -0500 Subject: [PATCH 3/4] too complicated, just add pygfx release/main to matrix --- .github/workflows/ci.yml | 66 ++-------------------------------------- 1 file changed, 3 insertions(+), 63 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ce291c73..ce3dcbb97 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,6 +25,7 @@ jobs: python: ["3.11", "3.12", "3.13"] imgui_dep: ["imgui", ""] notebook_dep: ["notebook", ""] + pygfx_version: ["pygfx-release", "pygfx-main"] steps: - uses: actions/checkout@v4 with: @@ -38,6 +39,7 @@ jobs: 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: Install pygx from main + if: ${{ matrix.pygfx_version == 'pygfx-release' }} run: | python -m pip install --upgrade pip setuptools # remove pygfx from install_requires, we install using pygfx@main @@ -81,70 +83,8 @@ jobs: path: | examples/diffs examples/notebooks/diffs - - test-using-pygfx-release: - name: Test Linux pygfx release - runs-on: ubuntu-latest - 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", ""] - 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 - 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: 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: - PYGFX_EXPECT_LAVAPIPE: true - run: | - WGPU_FORCE_OFFSCREEN=1 pytest -v tests/ - - name: Test examples - env: - PYGFX_EXPECT_LAVAPIPE: true - run: | - WGPU_FORCE_OFFSCREEN=1 pytest -v examples/ - - name: Test examples notebooks, exclude ImageWidget notebook - if: ${{ matrix.notebook_dep == 'notebook' }} - env: - PYGFX_EXPECT_LAVAPIPE: true - # test notebooks, exclude ImageWidget notebooks - run: FASTPLOTLIB_NB_TESTS=1 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: - PYGFX_EXPECT_LAVAPIPE: true - run: FASTPLOTLIB_NB_TESTS=1 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 - + # test-build-full-mac: # name: Test Mac, notebook + glfw # runs-on: macos-14 From a6a816f488cbf450b512fe7ce6c16fd0d831997d Mon Sep 17 00:00:00 2001 From: Kushal Kolar Date: Fri, 24 Jan 2025 21:13:32 -0500 Subject: [PATCH 4/4] other way around --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ce3dcbb97..5b93cb317 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,7 @@ jobs: 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: Install pygx from main - if: ${{ matrix.pygfx_version == 'pygfx-release' }} + if: ${{ matrix.pygfx_version == 'pygfx-main' }} run: | python -m pip install --upgrade pip setuptools # remove pygfx from install_requires, we install using pygfx@main 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