From e2d8c5667fd030b62505099fa64318e310d966af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Eertmans?= Date: Mon, 1 Jul 2024 18:19:24 +0200 Subject: [PATCH] fix(lib): Manim fixes, bump to >= 0.18, and tests (#447) * fix(lib): Manim fixes, bump to >= 0.18, and tests * chore(ci): tests and happy mypy * chore(deps): fix override * fix(tests): correct skipping * fix(ci): coverage * fix(docs): dead links * fix(tests): deps fixes * fix(deps): add missing override * fix(tests): correctly ignore * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * chore(tests): no filterwarning * chore(tests): add a check to see if we can install package * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * chore(ci): typo * fix(ci): typo * oops * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix(ci): double quote instead of single * chore(ci): add OSes requirements * chore(tests): removed `full-gl` extra * chore(ci): automatically cancel jobs * fix(docs): typo --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .github/workflows/tests.yml | 51 +++- .gitignore | 1 + .readthedocs.yaml | 5 +- CHANGELOG.md | 16 +- docs/source/gallery.md | 4 +- docs/source/installation.md | 2 - manim_slides/slide/manim.py | 33 ++- pyproject.toml | 65 ++--- requirements-dev.lock | 48 ++-- requirements.lock | 203 ++++++++++++++-- tests/test_slide.py | 459 ++++++++++++++++++++---------------- 11 files changed, 603 insertions(+), 284 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0420e36..5ed87a3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,7 +7,52 @@ on: name: Tests +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: + pip-install: + strategy: + fail-fast: false + matrix: + os: [macos-latest, ubuntu-latest, windows-latest] + pyversion: ['3.9', '3.10', '3.11', '3.12'] + extras: [pyside6-full, manimgl] + exclude: + - pyversion: '3.12' + extras: manimgl + runs-on: ${{ matrix.os }} + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.pyversion }} + cache: pip + + - name: Install manim dependencies on MacOS + if: matrix.os == 'macos-latest' + run: brew install ffmpeg py3cairo pango pkg-config scipy + + - name: Install manim dependencies on Ubuntu + if: matrix.os == 'ubuntu-latest' + run: | + sudo apt-get update + sudo apt-get install build-essential python3-dev libcairo2-dev libpango1.0-dev ffmpeg freeglut3-dev xvfb + nohup Xvfb $DISPLAY & + + - name: Install Windows dependencies + if: matrix.os == 'windows-latest' + run: choco install ffmpeg + + - name: Install package + shell: bash + env: + extras: ${{ matrix.extras }} + run: pip install ".[$extras]" pytest: strategy: fail-fast: false @@ -74,15 +119,9 @@ jobs: - name: Run pytest shell: bash - if: matrix.os != 'ubuntu-latest' || matrix.pyversion != '3.11' run: rye run pytest - - name: Run pytest and coverage - if: matrix.os == 'ubuntu-latest' && matrix.pyversion == '3.11' - run: rye run pytest --cov-report xml --cov=manim_slides tests/ - - name: Upload to codecov.io - if: matrix.os == 'ubuntu-latest' && matrix.pyversion == '3.11' uses: codecov/codecov-action@v4 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.gitignore b/.gitignore index 09cdb11..873bd6b 100644 --- a/.gitignore +++ b/.gitignore @@ -45,6 +45,7 @@ paper/paper.pdf paper/media/ # Others +.coverage coverage.xml rendering_times.csv diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 6124228..3796c97 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -15,4 +15,7 @@ sphinx: fail_on_warning: true python: install: - - requirements: requirements-dev.lock + - method: pip + path: . + extra_requirements: + - docs diff --git a/CHANGELOG.md b/CHANGELOG.md index f507f99..d014ca8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [samuelcolvin/rtoml#74](https://github.com/samuelcolvin/rtoml/issues/74) is solved. [#432](https://github.com/jeertmans/manim-slides/pull/432) +- Removed an old validation check that prevented setting `loop=True` with + `auto_next=True` on `next_slide()` + [#445](https://github.com/jeertmans/manim-slides/pull/445) +- Improved (and fixed) tests for Manim(GL), bumped minimal ManimCE version, + improved coverage, and override dependency conflicts. + [#447](https://github.com/jeertmans/manim-slides/pull/447) (unreleased-fixed)= ### Fixed @@ -28,12 +34,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed whitespace issue in default RevealJS template. [#442](https://github.com/jeertmans/manim-slides/pull/442) -(unreleased-chore)= -### Chore +(unreleased-removed)= +### Removed -- Removed an old validation check that prevented setting `loop=True` with - `auto_next=True` on `next_slide()` - [#445](https://github.com/jeertmans/manim-slides/pull/445) +- Removed `full-gl` extra, because it does not make sense to ship both + `manimgl` and `manim` together. + [#447](https://github.com/jeertmans/manim-slides/pull/447) (v5.1.7)= ## [v5.1.7](https://github.com/jeertmans/manim-slides/compare/v5.1.6...v5.1.7) diff --git a/docs/source/gallery.md b/docs/source/gallery.md index b9941ff..6b7d664 100644 --- a/docs/source/gallery.md +++ b/docs/source/gallery.md @@ -23,10 +23,10 @@ using Manim Slides presentations. Daniel publishes his presentations on *Cosmology, String Theory and related* topics on his -[personal website](https://panopepino.github.io/web_page/main_page/slides.html). +[personal website](https://panopepino.github.io/Web_Page/main_page/slides.html). For example, below are the slides of a seminar he gave titled -[Our Universe on a (Dark) Bubble](https://panopepino.github.io/web_page/main_page/presentations/2023_11_long/LS.html). +[Our Universe on a (Dark) Bubble](https://panopepino.github.io/Web_Page/main_page/presentations/2023_11_long/LS.html).