Skip to content

Commit 98955be

Browse files
authored
fix(deps): bump ManimGL>=1.7.2 (#506)
* fix(deps): bump ManimGL>=1.7.2 This bumps and fixes issues related to latest ManimGL version, as it includes breaking changes. * fix(docs): PR number * fix(deps): PySide6 issue See astral-sh/uv#10056 * fix(ci): headers
1 parent 2169938 commit 98955be

File tree

8 files changed

+52
-75
lines changed

8 files changed

+52
-75
lines changed

.github/workflows/tests.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
os: [macos-latest, ubuntu-latest, windows-latest]
19+
os: [macos-13, ubuntu-latest, windows-latest]
2020
pyversion: ['3.9', '3.10', '3.11', '3.12']
2121
extras: [pyside6-full, manimgl]
2222
exclude:
@@ -41,7 +41,9 @@ jobs:
4141
if: matrix.os == 'ubuntu-latest'
4242
run: |
4343
sudo apt-get update
44-
sudo apt-get install build-essential python3-dev libcairo2-dev libpango1.0-dev ffmpeg freeglut3-dev xvfb
44+
sudo apt install software-properties-common
45+
sudo add-apt-repository ppa:deadsnakes/ppa
46+
sudo apt-get install build-essential python${{ matrix.pyversion }}-dev libcairo2-dev libpango1.0-dev ffmpeg freeglut3-dev xvfb
4547
nohup Xvfb $DISPLAY &
4648
4749
- name: Install Windows dependencies

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3131
with Manim's.
3232
[#499](https://github.com/jeertmans/manim-slides/pull/499)
3333

34+
- Bump ManimGL to `>=1.7.2`, to remove `pyrr` from dependencies,
35+
and to avoid complex code for supporting both `1.7.1` and `>=1.7.2`,
36+
as the latter includes many breaking changes.
37+
[#506](https://github.com/jeertmans/manim-slides/pull/506)
38+
3439
(v5.1.10)=
3540
## [v5.1.10](https://github.com/jeertmans/manim-slides/compare/v5.1.9...v5.1.10)
3641

custom_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
style:
1+
camera:
22
background_color: '#000000'

manim_slides/render.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
Alias command to either
33
``manim render [OPTIONS] [ARGS]...`` or
4-
``manimgl [OPTIONS] [ARGS]...``.
4+
``manimgl -w [OPTIONS] [ARGS]...``.
55
66
This is especially useful for two reasons:
77
@@ -48,6 +48,6 @@ def render(ce: bool, gl: bool, args: tuple[str, ...]) -> None:
4848
if ce and gl:
4949
raise click.UsageError("You cannot specify both --CE and --GL renderers.")
5050
if gl:
51-
subprocess.run([sys.executable, "-m", "manimlib", *args])
51+
subprocess.run([sys.executable, "-m", "manimlib", "-w", *args])
5252
else:
5353
subprocess.run([sys.executable, "-m", "manim", "render", *args])

manim_slides/slide/manimlib.py

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,16 @@
22
from typing import Any, ClassVar, Optional
33

44
from manimlib import Scene, ThreeDCamera
5-
from manimlib.utils.file_ops import get_sorted_integer_files
65

76
from .base import BaseSlide
87

98

109
class Slide(BaseSlide, Scene): # type: ignore[misc]
1110
def __init__(self, *args: Any, **kwargs: Any) -> None:
1211
kwargs.setdefault("file_writer_config", {}).update(
13-
break_into_partial_movies=True,
14-
write_to_movie=True,
12+
subdivide_output=True,
1513
)
16-
# See: https://github.com/3b1b/manim/issues/2261
17-
if kwargs["file_writer_config"].setdefault("output_directory", ".") == "":
18-
kwargs["file_writer_config"]["output_directory"] = "."
1914

20-
kwargs["preview"] = False # Avoid opening a preview window
2115
super().__init__(*args, **kwargs)
2216

2317
@property
@@ -46,16 +40,9 @@ def _resolution(self) -> tuple[int, int]:
4640

4741
@property
4842
def _partial_movie_files(self) -> list[Path]:
49-
kwargs = {
50-
"remove_non_integer_files": True,
51-
"extension": self.file_writer.movie_file_extension,
52-
}
53-
return [
54-
Path(file)
55-
for file in get_sorted_integer_files(
56-
self.file_writer.partial_movie_directory, **kwargs
57-
)
58-
]
43+
partial_movie_directory = self.file_writer.partial_movie_directory
44+
extension = self.file_writer.movie_file_extension
45+
return sorted(partial_movie_directory.glob(f"*{extension}"))
5946

6047
@property
6148
def _show_progress_bar(self) -> bool:

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ full = [
5959
]
6060
magic = ["manim-slides[manim]", "ipython>=8.12.2"]
6161
manim = ["manim>=0.18.0"]
62-
manimgl = ["manimgl>=1.7.1", "pyrr"]
62+
manimgl = ["manimgl>=1.7.2"]
6363
pyqt6 = ["pyqt6>=6.7.0"]
6464
pyqt6-full = ["manim-slides[full,pyqt6]"]
65-
pyside6 = ["pyside6>=6.6.1"]
65+
pyside6 = ["pyside6>=6.6.1,!=6.8.1.1"]
6666
pyside6-full = ["manim-slides[full,pyside6]"]
6767
sphinx-directive = ["docutils>=0.20.1", "manim-slides[manim]"]
6868
tests = [

tests/test_slide.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,10 @@ def init_slide(cls: SlideType) -> Slide:
212212
if issubclass(cls, CESlide):
213213
return cls()
214214
elif issubclass(cls, GLSlide):
215-
from manimlib.config import get_configuration, parse_cli
216-
from manimlib.extract_scene import get_scene_config
215+
from manimlib.config import parse_cli
217216

218-
args = parse_cli()
219-
config = get_configuration(args)
220-
scene_config = get_scene_config(config)
221-
return cls(**scene_config)
217+
_args = parse_cli()
218+
return cls()
222219

223220
raise ValueError(f"Unsupported class {cls}")
224221

uv.lock

Lines changed: 31 additions & 45 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)