GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — simplify CI and install extras by kushalkolar · Pull Request #698 · fastplotlib/fastplotlib Conversation
|
|
📚 Docs preview built and uploaded! https://www.fastplotlib.org/ver/simplify-ci |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
oh shit this is actually working 🤯 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
wow after lots of git actions bash wrangling and sed garbling my idea actually worked 😲 ! @clewis7 this will require a more thorough review XD |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| pytest -v examples | ||
| FASTPLOTLIB_NB_TESTS=1 pytest --nbmake examples/notebooks/ | ||
| - uses: actions/upload-artifact@v4 | ||
| if: ${{ failure() }} | ||
| with: | ||
| name: screenshot-diffs | ||
| path: | | ||
| examples/diffs | ||
| examples/notebooks/diffs | ||
|
|
||
| test-build-offscreen: | ||
| name: Test Linux, only offscreen | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 30 | ||
| if: ${{ !github.event.pull_request.draft }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - name: Test py311 | ||
| pyversion: '3.11' | ||
| - name: Test py312 | ||
| pyversion: '3.12' | ||
| - name: Test py313 | ||
| pyversion: '3.13' | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| lfs: true | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: ${{ matrix.pyversion }} | ||
| - name: Install llvmpipe and lavapipe for offscreen canvas | ||
| run: | | ||
| sudo apt-get update -y -qq | ||
| sudo apt-get install --no-install-recommends -y libegl1-mesa-dev libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers xorg-dev | ||
| - name: Install dev dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip setuptools | ||
| # remove pygfx from install_requires, we install using pygfx@main | ||
| sed -i "/pygfx/d" ./setup.py | ||
| pip install git+https://github.com/pygfx/pygfx.git@main | ||
| pip install -e ".["tests-desktop"]" | ||
| - name: Show wgpu backend | ||
| run: | ||
| python -c "from examples.tests.testutils import wgpu_backend; print(wgpu_backend)" | ||
| - name: fetch git lfs files | ||
| run: | | ||
| git lfs fetch --all | ||
| git lfs pull | ||
| - name: Test examples |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
git is stupid, this entire block is actually the previous non-notebooks test pipeline that came after afterwards
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| name: Test Linux | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 30 | ||
| timeout-minutes: 10 |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
we can go back to 10 mins now that we don't have python3.10 which required more time due to no imgui wheels existing for it.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| # 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/,$//")]" |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I copy pasted the sed from stackoverflow
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
nifty
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Oh wait I can use bash to exclude the ImageWidget nb for the pytest call when imgui doesn't exists |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM, very cool stuff! I like the pattern matching with sed
I will let you merge this one
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| # 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/,$//")]" |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
nifty
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
I wouldn't say I like the sed, it's an ugly garble but useful 😂 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Add test screenshots without imgui
There was an error while loading. Please reload this page.