Skip to content

Commit

Permalink
chore(deps): bump ManimGL to 1.7.1
Browse files Browse the repository at this point in the history
Bump ManimGL's minimal version, so relax constraints on other deps and remove compatibility issues with Manim
  • Loading branch information
jeertmans committed Dec 10, 2024
1 parent 3bd8c38 commit c02915f
Show file tree
Hide file tree
Showing 6 changed files with 441 additions and 141 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
(unreleased)=
## [Unreleased](https://github.com/jeertmans/manim-slides/compare/v5.1.10...HEAD)

(unreleased-chore)=
### Chore

- Bump ManimGL to `>=1.7.1`, to remove conflicting dependencies
with Manim's.
[#498](https://github.com/jeertmans/manim-slides/pull/498)

(v5.1.10)=
## [v5.1.10](https://github.com/jeertmans/manim-slides/compare/v5.1.9...v5.1.10)

Expand Down
9 changes: 2 additions & 7 deletions docs/source/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,8 @@ ManimGL support is only guaranteed to work
on a very minimal set of versions, because it differs quite a lot from ManimCE,
and its development is not very active.

The typical issues are that (1) ManimGL needs an outdated NumPy version
and (2) ManimGL **should not** be installed from the GitHub repository,
at least not from the `main` branch, but from a version released to PyPI.

To solve the NumPy issue, you can safely downgrade NumPy to a version supported
by ManimGL,
while ignoring the possible *conflicting dependencies* messages from `pip` (or else).
The typical issue is that ManimGL `<1.7.1` needs an outdated NumPy version, but
can be resolved by manually downgrading NumPy, or upgrading ManimGL (**recommended**).

### Presenting

Expand Down
13 changes: 0 additions & 13 deletions docs/source/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,6 @@ please refer to their specific installation guidelines:
- [Manim](https://docs.manim.community/en/stable/installation.html)
- [ManimGL](https://3b1b.github.io/manim/getting_started/installation.html)

:::{warning}
If you install Manim from its git repository, as suggested by ManimGL,
make sure to first check out a supported version (e.g., `git checkout tags/v1.6.1`
for ManimGL), otherwise it might install an unsupported version of Manim!
See [#314](https://github.com/jeertmans/manim-slides/issues/314).

Also, note that ManimGL uses outdated dependencies, and may
not work out-of-the-box. One example is NumPy: ManimGL
does not specify any restriction on this package, but
only `numpy<1.25` will work, see
[#2053](https://github.com/3b1b/manim/issues/2053).
:::

<!-- end deps -->

## Pip Install
Expand Down
8 changes: 1 addition & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ full = [
]
magic = ["manim-slides[manim]", "ipython>=8.12.2"]
manim = ["manim>=0.18.0"]
manimgl = ["manimgl>=1.6.1;python_version<'3.12'"]
manimgl = ["manimgl>=1.7.1"]
pyqt6 = ["pyqt6>=6.7.0"]
pyqt6-full = ["manim-slides[full,pyqt6]"]
pyside6 = ["pyside6>=6.6.1"]
Expand Down Expand Up @@ -227,9 +227,3 @@ dev-dependencies = [
"pre-commit>=3.5.0",
"setuptools>=73.0.1",
]
override-dependencies = [
# Bypass constraints from ManimGL
"manimpango>=0.5.0,<1.0.0",
"numpy<=1.24;python_version < '3.12'",
"numpy>=1.26;python_version >= '3.12'",
]
27 changes: 3 additions & 24 deletions tests/test_slide.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import random
import shutil
import sys
from pathlib import Path
from typing import Any, Union

Expand All @@ -25,22 +24,14 @@
from manim_slides.defaults import FOLDER_PATH
from manim_slides.render import render
from manim_slides.slide.manim import Slide as CESlide
from manim_slides.slide.manimlib import Slide as GLSlide


class CEGLSlide(CESlide):
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, renderer=OpenGLRenderer(), **kwargs)


if sys.version_info >= (3, 12):

class _GLSlide:
pass

GLSlide = pytest.param(_GLSlide, marks=pytest.mark.skip())
else:
from manim_slides.slide.manimlib import Slide as GLSlide

SlideType = Union[type[CESlide], type[GLSlide], type[CEGLSlide]]
Slide = Union[CESlide, GLSlide, CEGLSlide]

Expand All @@ -49,13 +40,7 @@ class _GLSlide:
"renderer",
[
"--CE",
pytest.param(
"--GL",
marks=pytest.mark.skipif(
sys.version_info >= (3, 12),
reason="ManimGL requires numpy<1.25, which is outdated and Python < 3.12",
),
),
"--GL",
],
)
def test_render_basic_slide(
Expand Down Expand Up @@ -158,13 +143,7 @@ def test_clear_cache(
"renderer",
[
"--CE",
pytest.param(
"--GL",
marks=pytest.mark.skipif(
sys.version_info >= (3, 12),
reason="ManimGL requires numpy<1.25, which is outdated and Python < 3.12",
),
),
"--GL",
],
)
@pytest.mark.parametrize(
Expand Down
Loading

0 comments on commit c02915f

Please sign in to comment.