mirror of
https://github.com/jeertmans/manim-slides.git
synced 2025-07-04 15:37:58 +08:00
fix(lib): deprecation warnings (#467)
* fix(lib): deprecation warnings * fix(tests): collect tests in the correct order * fix(tests): ignore pydub warning * fix(tests): correctly ignore warnings * fix(ci): do we need faulthandler?
This commit is contained in:
1
.github/workflows/tests.yml
vendored
1
.github/workflows/tests.yml
vendored
@ -63,7 +63,6 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
QT_QPA_PLATFORM: offscreen
|
QT_QPA_PLATFORM: offscreen
|
||||||
MANIM_SLIDES_VERBOSITY: error
|
MANIM_SLIDES_VERBOSITY: error
|
||||||
PYTHONFAULTHANDLER: 1
|
|
||||||
DISPLAY: :99
|
DISPLAY: :99
|
||||||
GITHUB_WORKFLOWS: 1
|
GITHUB_WORKFLOWS: 1
|
||||||
steps:
|
steps:
|
||||||
|
@ -34,8 +34,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
[#447](https://github.com/jeertmans/manim-slides/pull/447)
|
[#447](https://github.com/jeertmans/manim-slides/pull/447)
|
||||||
- Improved issue templates.
|
- Improved issue templates.
|
||||||
[#456](https://github.com/jeertmans/manim-slides/pull/456)
|
[#456](https://github.com/jeertmans/manim-slides/pull/456)
|
||||||
- Enhancer the error message when the slides folder does not exist.
|
- Enhanced the error message when the slides folder does not exist.
|
||||||
[#462](https://github.com/jeertmans/manim-slides/pull/462)
|
[#462](https://github.com/jeertmans/manim-slides/pull/462)
|
||||||
|
- Fixed deprecation warnings.
|
||||||
|
[#467](https://github.com/jeertmans/manim-slides/pull/467)
|
||||||
|
|
||||||
(unreleased-fixed)=
|
(unreleased-fixed)=
|
||||||
### Fixed
|
### Fixed
|
||||||
|
@ -13,6 +13,8 @@ from pydantic import (
|
|||||||
FilePath,
|
FilePath,
|
||||||
PositiveInt,
|
PositiveInt,
|
||||||
PrivateAttr,
|
PrivateAttr,
|
||||||
|
conset,
|
||||||
|
field_serializer,
|
||||||
field_validator,
|
field_validator,
|
||||||
model_validator,
|
model_validator,
|
||||||
)
|
)
|
||||||
@ -47,20 +49,13 @@ def key_id(name: str) -> PositiveInt:
|
|||||||
class Key(BaseModel): # type: ignore[misc]
|
class Key(BaseModel): # type: ignore[misc]
|
||||||
"""Represents a list of key codes, with optionally a name."""
|
"""Represents a list of key codes, with optionally a name."""
|
||||||
|
|
||||||
ids: list[PositiveInt] = Field(unique=True)
|
ids: conset(PositiveInt, min_length=1) # type: ignore[valid-type]
|
||||||
name: Optional[str] = None
|
name: Optional[str] = None
|
||||||
|
|
||||||
__signal: Signal = PrivateAttr(default_factory=Signal)
|
__signal: Signal = PrivateAttr(default_factory=Signal)
|
||||||
|
|
||||||
@field_validator("ids")
|
|
||||||
@classmethod
|
|
||||||
def ids_is_non_empty_set(cls, ids: set[Any]) -> set[Any]:
|
|
||||||
if len(ids) <= 0:
|
|
||||||
raise ValueError("Key's ids must be a non-empty set")
|
|
||||||
return ids
|
|
||||||
|
|
||||||
def set_ids(self, *ids: int) -> None:
|
def set_ids(self, *ids: int) -> None:
|
||||||
self.ids = list(set(ids))
|
self.ids = set(ids)
|
||||||
|
|
||||||
def match(self, key_id: int) -> bool:
|
def match(self, key_id: int) -> bool:
|
||||||
m = key_id in self.ids
|
m = key_id in self.ids
|
||||||
@ -77,6 +72,10 @@ class Key(BaseModel): # type: ignore[misc]
|
|||||||
def connect(self, function: Receiver) -> None:
|
def connect(self, function: Receiver) -> None:
|
||||||
self.__signal.connect(function)
|
self.__signal.connect(function)
|
||||||
|
|
||||||
|
@field_serializer("ids")
|
||||||
|
def serialize_dt(self, ids: set[int]) -> list[int]:
|
||||||
|
return list(self.ids)
|
||||||
|
|
||||||
|
|
||||||
class Keys(BaseModel): # type: ignore[misc]
|
class Keys(BaseModel): # type: ignore[misc]
|
||||||
QUIT: Key = Field(default_factory=lambda: Key(ids=[key_id("Q")], name="QUIT"))
|
QUIT: Key = Field(default_factory=lambda: Key(ids=[key_id("Q")], name="QUIT"))
|
||||||
@ -180,7 +179,7 @@ class BaseSlideConfig(BaseModel): # type: ignore
|
|||||||
fun_kwargs = {
|
fun_kwargs = {
|
||||||
key: value
|
key: value
|
||||||
for key, value in kwargs.items()
|
for key, value in kwargs.items()
|
||||||
if key not in cls.__fields__
|
if key not in cls.model_fields
|
||||||
}
|
}
|
||||||
fun_kwargs[arg_name] = cls(**kwargs)
|
fun_kwargs[arg_name] = cls(**kwargs)
|
||||||
return fun(*args, **fun_kwargs)
|
return fun(*args, **fun_kwargs)
|
||||||
@ -194,7 +193,7 @@ class BaseSlideConfig(BaseModel): # type: ignore
|
|||||||
default=field_info.default,
|
default=field_info.default,
|
||||||
annotation=field_info.annotation,
|
annotation=field_info.annotation,
|
||||||
)
|
)
|
||||||
for field_name, field_info in cls.__fields__.items()
|
for field_name, field_info in cls.model_fields.items()
|
||||||
]
|
]
|
||||||
|
|
||||||
sig = sig.replace(parameters=parameters)
|
sig = sig.replace(parameters=parameters)
|
||||||
@ -231,7 +230,7 @@ class PreSlideConfig(BaseSlideConfig):
|
|||||||
return cls(
|
return cls(
|
||||||
start_animation=start_animation,
|
start_animation=start_animation,
|
||||||
end_animation=end_animation,
|
end_animation=end_animation,
|
||||||
**base_slide_config.dict(),
|
**base_slide_config.model_dump(),
|
||||||
)
|
)
|
||||||
|
|
||||||
@field_validator("start_animation", "end_animation")
|
@field_validator("start_animation", "end_animation")
|
||||||
@ -277,7 +276,7 @@ class SlideConfig(BaseSlideConfig):
|
|||||||
def from_pre_slide_config_and_files(
|
def from_pre_slide_config_and_files(
|
||||||
cls, pre_slide_config: PreSlideConfig, file: Path, rev_file: Path
|
cls, pre_slide_config: PreSlideConfig, file: Path, rev_file: Path
|
||||||
) -> "SlideConfig":
|
) -> "SlideConfig":
|
||||||
return cls(file=file, rev_file=rev_file, **pre_slide_config.dict())
|
return cls(file=file, rev_file=rev_file, **pre_slide_config.model_dump())
|
||||||
|
|
||||||
|
|
||||||
class PresentationConfig(BaseModel): # type: ignore[misc]
|
class PresentationConfig(BaseModel): # type: ignore[misc]
|
||||||
|
@ -432,7 +432,7 @@ class RevealJS(Converter):
|
|||||||
with open(dest, "w") as f:
|
with open(dest, "w") as f:
|
||||||
revealjs_template = Template(self.load_template())
|
revealjs_template = Template(self.load_template())
|
||||||
|
|
||||||
options = self.dict()
|
options = self.model_dump()
|
||||||
options["assets_dir"] = assets_dir
|
options["assets_dir"] = assets_dir
|
||||||
|
|
||||||
has_notes = any(
|
has_notes = any(
|
||||||
@ -692,7 +692,7 @@ def convert(
|
|||||||
try:
|
try:
|
||||||
cls = Converter.from_string(fmt)
|
cls = Converter.from_string(fmt)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
logger.warn(
|
logger.warning(
|
||||||
f"Could not guess conversion format from {dest!s}, defaulting to HTML."
|
f"Could not guess conversion format from {dest!s}, defaulting to HTML."
|
||||||
)
|
)
|
||||||
cls = RevealJS
|
cls = RevealJS
|
||||||
|
@ -228,7 +228,7 @@ class ManimSlidesMagic(Magics): # type: ignore
|
|||||||
# TODO: FIXME
|
# TODO: FIXME
|
||||||
# Seems like files are blocked so date-uri is the only working option...
|
# Seems like files are blocked so date-uri is the only working option...
|
||||||
if kwargs.get("data_uri", "false").lower().strip() == "false":
|
if kwargs.get("data_uri", "false").lower().strip() == "false":
|
||||||
logger.warn(
|
logger.warning(
|
||||||
"data_uri option is currently automatically enabled, "
|
"data_uri option is currently automatically enabled, "
|
||||||
"because using local video files does not seem to work properly."
|
"because using local video files does not seem to work properly."
|
||||||
)
|
)
|
||||||
|
@ -33,7 +33,7 @@ def _list_scenes(folder: Path) -> list[str]:
|
|||||||
except (
|
except (
|
||||||
Exception
|
Exception
|
||||||
) as e: # Could not parse this file as a proper presentation config
|
) as e: # Could not parse this file as a proper presentation config
|
||||||
logger.warn(
|
logger.warning(
|
||||||
f"Something went wrong with parsing presentation config `{filepath}`: {e}"
|
f"Something went wrong with parsing presentation config `{filepath}`: {e}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -319,7 +319,7 @@ class Player(QMainWindow): # type: ignore[misc]
|
|||||||
elif -self.presentations_count <= index < 0:
|
elif -self.presentations_count <= index < 0:
|
||||||
self.__current_presentation_index = index + self.presentations_count
|
self.__current_presentation_index = index + self.presentations_count
|
||||||
else:
|
else:
|
||||||
logger.warn(f"Could not set presentation index to {index}.")
|
logger.warning(f"Could not set presentation index to {index}.")
|
||||||
return
|
return
|
||||||
|
|
||||||
self.presentation_changed.emit()
|
self.presentation_changed.emit()
|
||||||
@ -343,7 +343,7 @@ class Player(QMainWindow): # type: ignore[misc]
|
|||||||
elif -self.current_slides_count <= index < 0:
|
elif -self.current_slides_count <= index < 0:
|
||||||
self.__current_slide_index = index + self.current_slides_count
|
self.__current_slide_index = index + self.current_slides_count
|
||||||
else:
|
else:
|
||||||
logger.warn(f"Could not set slide index to {index}.")
|
logger.warning(f"Could not set slide index to {index}.")
|
||||||
return
|
return
|
||||||
|
|
||||||
self.slide_changed.emit()
|
self.slide_changed.emit()
|
||||||
|
@ -19,7 +19,7 @@ def concatenate_video_files(files: list[Path], dest: Path) -> None:
|
|||||||
if len(container.streams.video) > 0:
|
if len(container.streams.video) > 0:
|
||||||
yield file
|
yield file
|
||||||
else:
|
else:
|
||||||
logger.warn(
|
logger.warning(
|
||||||
f"Skipping video file {file} because it does "
|
f"Skipping video file {file} because it does "
|
||||||
"not contain any video stream. "
|
"not contain any video stream. "
|
||||||
"This is probably caused by Manim, see: "
|
"This is probably caused by Manim, see: "
|
||||||
|
@ -63,7 +63,7 @@ class Wizard(QWidget): # type: ignore
|
|||||||
|
|
||||||
self.layout = QGridLayout()
|
self.layout = QGridLayout()
|
||||||
|
|
||||||
for i, (key, value) in enumerate(self.config.keys.dict().items()):
|
for i, (key, value) in enumerate(self.config.keys.model_dump().items()):
|
||||||
# Create label for key name information
|
# Create label for key name information
|
||||||
label = QLabel()
|
label = QLabel()
|
||||||
key_info = value["name"] or key
|
key_info = value["name"] or key
|
||||||
@ -97,7 +97,7 @@ class Wizard(QWidget): # type: ignore
|
|||||||
|
|
||||||
def save_config(self) -> None:
|
def save_config(self) -> None:
|
||||||
try:
|
try:
|
||||||
Config.model_validate(self.config.dict())
|
Config.model_validate(self.config.model_dump())
|
||||||
except ValueError:
|
except ValueError:
|
||||||
msg = QMessageBox()
|
msg = QMessageBox()
|
||||||
msg.setIcon(QMessageBox.Critical)
|
msg.setIcon(QMessageBox.Critical)
|
||||||
|
@ -30,10 +30,8 @@ dependencies = [
|
|||||||
"qtpy>=2.4.1",
|
"qtpy>=2.4.1",
|
||||||
"requests>=2.28.1",
|
"requests>=2.28.1",
|
||||||
"rich>=13.3.2",
|
"rich>=13.3.2",
|
||||||
"rtoml==0.9.0;sys_platform=='win32' and python_version<'3.13'",
|
"rtoml>=0.11.0",
|
||||||
"rtoml>=0.9.0;sys_platform!='win32' or python_version>='3.13'",
|
|
||||||
"tqdm>=4.64.1",
|
"tqdm>=4.64.1",
|
||||||
"pytest-missing-modules>=0.1.0",
|
|
||||||
]
|
]
|
||||||
description = "Tool for live presentations using manim"
|
description = "Tool for live presentations using manim"
|
||||||
dynamic = ["readme", "version"]
|
dynamic = ["readme", "version"]
|
||||||
@ -70,6 +68,7 @@ tests = [
|
|||||||
"pytest>=7.4.0",
|
"pytest>=7.4.0",
|
||||||
"pytest-cov>=4.1.0",
|
"pytest-cov>=4.1.0",
|
||||||
"pytest-env>=0.8.2",
|
"pytest-env>=0.8.2",
|
||||||
|
"pytest-missing-modules>=0.1.0",
|
||||||
"pytest-qt>=4.2.0",
|
"pytest-qt>=4.2.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -185,6 +184,13 @@ env = [
|
|||||||
"QT_API=pyside6",
|
"QT_API=pyside6",
|
||||||
"QT_QPA_PLATFORM=offscreen",
|
"QT_QPA_PLATFORM=offscreen",
|
||||||
]
|
]
|
||||||
|
filterwarnings = [
|
||||||
|
"error",
|
||||||
|
'''ignore:'audioop' is deprecated:DeprecationWarning''',
|
||||||
|
'ignore:pkg_resources is deprecated as an API:DeprecationWarning',
|
||||||
|
'ignore::DeprecationWarning:pkg_resources.*:',
|
||||||
|
'ignore::SyntaxWarning:pydub.*:',
|
||||||
|
]
|
||||||
|
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
extend-exclude = ["manim_slides/resources.py"]
|
extend-exclude = ["manim_slides/resources.py"]
|
||||||
|
@ -48,16 +48,10 @@ click-default-group==1.2.4
|
|||||||
# via manim-slides
|
# via manim-slides
|
||||||
cloup==3.0.5
|
cloup==3.0.5
|
||||||
# via manim
|
# via manim
|
||||||
colour==0.1.5
|
|
||||||
# via manimgl
|
|
||||||
comm==0.2.2
|
comm==0.2.2
|
||||||
# via ipykernel
|
# via ipykernel
|
||||||
contourpy==1.2.1
|
|
||||||
# via matplotlib
|
|
||||||
coverage==7.6.1
|
coverage==7.6.1
|
||||||
# via pytest-cov
|
# via pytest-cov
|
||||||
cycler==0.12.1
|
|
||||||
# via matplotlib
|
|
||||||
debugpy==1.8.5
|
debugpy==1.8.5
|
||||||
# via ipykernel
|
# via ipykernel
|
||||||
decorator==5.1.1
|
decorator==5.1.1
|
||||||
@ -79,8 +73,6 @@ fastjsonschema==2.20.0
|
|||||||
# via nbformat
|
# via nbformat
|
||||||
filelock==3.15.4
|
filelock==3.15.4
|
||||||
# via virtualenv
|
# via virtualenv
|
||||||
fonttools==4.53.1
|
|
||||||
# via matplotlib
|
|
||||||
furo==2024.8.6
|
furo==2024.8.6
|
||||||
# via manim-slides
|
# via manim-slides
|
||||||
glcontext==3.0.0
|
glcontext==3.0.0
|
||||||
@ -98,10 +90,8 @@ ipykernel==6.29.5
|
|||||||
ipython==8.26.0
|
ipython==8.26.0
|
||||||
# via ipykernel
|
# via ipykernel
|
||||||
# via manim-slides
|
# via manim-slides
|
||||||
# via manimgl
|
|
||||||
isosurfaces==0.1.2
|
isosurfaces==0.1.2
|
||||||
# via manim
|
# via manim
|
||||||
# via manimgl
|
|
||||||
jedi==0.19.1
|
jedi==0.19.1
|
||||||
# via ipython
|
# via ipython
|
||||||
jinja2==3.1.4
|
jinja2==3.1.4
|
||||||
@ -125,22 +115,16 @@ jupyter-core==5.7.2
|
|||||||
# via nbformat
|
# via nbformat
|
||||||
jupyterlab-pygments==0.3.0
|
jupyterlab-pygments==0.3.0
|
||||||
# via nbconvert
|
# via nbconvert
|
||||||
kiwisolver==1.4.5
|
|
||||||
# via matplotlib
|
|
||||||
lxml==5.3.0
|
lxml==5.3.0
|
||||||
# via manim-slides
|
# via manim-slides
|
||||||
# via python-pptx
|
# via python-pptx
|
||||||
manim==0.18.1
|
manim==0.18.1
|
||||||
# via manim-slides
|
# via manim-slides
|
||||||
manimgl==1.6.1
|
|
||||||
# via manim-slides
|
|
||||||
manimpango==0.5.0
|
manimpango==0.5.0
|
||||||
# via --override (workspace)
|
# via --override (workspace)
|
||||||
# via manim
|
# via manim
|
||||||
# via manimgl
|
|
||||||
mapbox-earcut==1.0.2
|
mapbox-earcut==1.0.2
|
||||||
# via manim
|
# via manim
|
||||||
# via manimgl
|
|
||||||
markdown-it-py==3.0.0
|
markdown-it-py==3.0.0
|
||||||
# via mdit-py-plugins
|
# via mdit-py-plugins
|
||||||
# via myst-parser
|
# via myst-parser
|
||||||
@ -148,8 +132,6 @@ markdown-it-py==3.0.0
|
|||||||
markupsafe==2.1.5
|
markupsafe==2.1.5
|
||||||
# via jinja2
|
# via jinja2
|
||||||
# via nbconvert
|
# via nbconvert
|
||||||
matplotlib==3.9.2
|
|
||||||
# via manimgl
|
|
||||||
matplotlib-inline==0.1.7
|
matplotlib-inline==0.1.7
|
||||||
# via ipykernel
|
# via ipykernel
|
||||||
# via ipython
|
# via ipython
|
||||||
@ -161,13 +143,9 @@ mistune==3.0.2
|
|||||||
# via nbconvert
|
# via nbconvert
|
||||||
moderngl==5.11.1
|
moderngl==5.11.1
|
||||||
# via manim
|
# via manim
|
||||||
# via manimgl
|
|
||||||
# via moderngl-window
|
# via moderngl-window
|
||||||
moderngl-window==2.4.6
|
moderngl-window==2.4.6
|
||||||
# via manim
|
# via manim
|
||||||
# via manimgl
|
|
||||||
mpmath==1.3.0
|
|
||||||
# via sympy
|
|
||||||
multipledispatch==1.0.0
|
multipledispatch==1.0.0
|
||||||
# via pyrr
|
# via pyrr
|
||||||
myst-parser==4.0.0
|
myst-parser==4.0.0
|
||||||
@ -188,23 +166,19 @@ networkx==3.3
|
|||||||
# via manim
|
# via manim
|
||||||
nodeenv==1.9.1
|
nodeenv==1.9.1
|
||||||
# via pre-commit
|
# via pre-commit
|
||||||
numpy==1.24.0
|
numpy==2.1.0
|
||||||
# via --override (workspace)
|
# via --override (workspace)
|
||||||
# via contourpy
|
|
||||||
# via ipython
|
# via ipython
|
||||||
# via isosurfaces
|
# via isosurfaces
|
||||||
# via manim
|
# via manim
|
||||||
# via manim-slides
|
# via manim-slides
|
||||||
# via manimgl
|
|
||||||
# via mapbox-earcut
|
# via mapbox-earcut
|
||||||
# via matplotlib
|
|
||||||
# via moderngl-window
|
# via moderngl-window
|
||||||
# via networkx
|
# via networkx
|
||||||
# via pyrr
|
# via pyrr
|
||||||
# via scipy
|
# via scipy
|
||||||
packaging==24.1
|
packaging==24.1
|
||||||
# via ipykernel
|
# via ipykernel
|
||||||
# via matplotlib
|
|
||||||
# via nbconvert
|
# via nbconvert
|
||||||
# via pytest
|
# via pytest
|
||||||
# via qtpy
|
# via qtpy
|
||||||
@ -220,8 +194,6 @@ pexpect==4.9.0
|
|||||||
pillow==10.4.0
|
pillow==10.4.0
|
||||||
# via manim
|
# via manim
|
||||||
# via manim-slides
|
# via manim-slides
|
||||||
# via manimgl
|
|
||||||
# via matplotlib
|
|
||||||
# via moderngl-window
|
# via moderngl-window
|
||||||
# via python-pptx
|
# via python-pptx
|
||||||
platformdirs==4.2.2
|
platformdirs==4.2.2
|
||||||
@ -259,21 +231,15 @@ pydantic-settings==2.4.0
|
|||||||
# via bump-my-version
|
# via bump-my-version
|
||||||
pydub==0.25.1
|
pydub==0.25.1
|
||||||
# via manim
|
# via manim
|
||||||
# via manimgl
|
|
||||||
pyglet==2.0.17
|
pyglet==2.0.17
|
||||||
# via moderngl-window
|
# via moderngl-window
|
||||||
pygments==2.18.0
|
pygments==2.18.0
|
||||||
# via furo
|
# via furo
|
||||||
# via ipython
|
# via ipython
|
||||||
# via manim
|
# via manim
|
||||||
# via manimgl
|
|
||||||
# via nbconvert
|
# via nbconvert
|
||||||
# via rich
|
# via rich
|
||||||
# via sphinx
|
# via sphinx
|
||||||
pyopengl==3.1.7
|
|
||||||
# via manimgl
|
|
||||||
pyparsing==3.1.4
|
|
||||||
# via matplotlib
|
|
||||||
pyqt6==6.7.1
|
pyqt6==6.7.1
|
||||||
# via manim-slides
|
# via manim-slides
|
||||||
pyqt6-qt6==6.7.2
|
pyqt6-qt6==6.7.2
|
||||||
@ -305,13 +271,11 @@ pytest-qt==4.4.0
|
|||||||
# via manim-slides
|
# via manim-slides
|
||||||
python-dateutil==2.9.0.post0
|
python-dateutil==2.9.0.post0
|
||||||
# via jupyter-client
|
# via jupyter-client
|
||||||
# via matplotlib
|
|
||||||
python-dotenv==1.0.1
|
python-dotenv==1.0.1
|
||||||
# via pydantic-settings
|
# via pydantic-settings
|
||||||
python-pptx==1.0.2
|
python-pptx==1.0.2
|
||||||
# via manim-slides
|
# via manim-slides
|
||||||
pyyaml==6.0.2
|
pyyaml==6.0.2
|
||||||
# via manimgl
|
|
||||||
# via myst-parser
|
# via myst-parser
|
||||||
# via pre-commit
|
# via pre-commit
|
||||||
pyzmq==26.2.0
|
pyzmq==26.2.0
|
||||||
@ -331,21 +295,18 @@ rich==13.7.1
|
|||||||
# via bump-my-version
|
# via bump-my-version
|
||||||
# via manim
|
# via manim
|
||||||
# via manim-slides
|
# via manim-slides
|
||||||
# via manimgl
|
|
||||||
# via rich-click
|
# via rich-click
|
||||||
rich-click==1.8.3
|
rich-click==1.8.3
|
||||||
# via bump-my-version
|
# via bump-my-version
|
||||||
rpds-py==0.20.0
|
rpds-py==0.20.0
|
||||||
# via jsonschema
|
# via jsonschema
|
||||||
# via referencing
|
# via referencing
|
||||||
rtoml==0.9.0
|
rtoml==0.11.0
|
||||||
# via manim-slides
|
# via manim-slides
|
||||||
scipy==1.14.1
|
scipy==1.14.1
|
||||||
# via manim
|
# via manim
|
||||||
# via manimgl
|
|
||||||
screeninfo==0.8.1
|
screeninfo==0.8.1
|
||||||
# via manim
|
# via manim
|
||||||
# via manimgl
|
|
||||||
setuptools==73.0.1
|
setuptools==73.0.1
|
||||||
shiboken6==6.7.2
|
shiboken6==6.7.2
|
||||||
# via pyside6
|
# via pyside6
|
||||||
@ -357,7 +318,6 @@ six==1.16.0
|
|||||||
# via python-dateutil
|
# via python-dateutil
|
||||||
skia-pathops==0.8.0.post1
|
skia-pathops==0.8.0.post1
|
||||||
# via manim
|
# via manim
|
||||||
# via manimgl
|
|
||||||
snowballstemmer==2.2.0
|
snowballstemmer==2.2.0
|
||||||
# via sphinx
|
# via sphinx
|
||||||
soupsieve==2.6
|
soupsieve==2.6
|
||||||
@ -397,9 +357,6 @@ stack-data==0.6.3
|
|||||||
# via ipython
|
# via ipython
|
||||||
svgelements==1.9.6
|
svgelements==1.9.6
|
||||||
# via manim
|
# via manim
|
||||||
# via manimgl
|
|
||||||
sympy==1.13.2
|
|
||||||
# via manimgl
|
|
||||||
tinycss2==1.3.0
|
tinycss2==1.3.0
|
||||||
# via nbconvert
|
# via nbconvert
|
||||||
tomlkit==0.13.2
|
tomlkit==0.13.2
|
||||||
@ -410,7 +367,6 @@ tornado==6.4.1
|
|||||||
tqdm==4.66.5
|
tqdm==4.66.5
|
||||||
# via manim
|
# via manim
|
||||||
# via manim-slides
|
# via manim-slides
|
||||||
# via manimgl
|
|
||||||
traitlets==5.14.3
|
traitlets==5.14.3
|
||||||
# via comm
|
# via comm
|
||||||
# via ipykernel
|
# via ipykernel
|
||||||
@ -423,7 +379,6 @@ traitlets==5.14.3
|
|||||||
# via nbformat
|
# via nbformat
|
||||||
# via nbsphinx
|
# via nbsphinx
|
||||||
typing-extensions==4.12.2
|
typing-extensions==4.12.2
|
||||||
# via ipython
|
|
||||||
# via manim
|
# via manim
|
||||||
# via pydantic
|
# via pydantic
|
||||||
# via pydantic-core
|
# via pydantic-core
|
||||||
@ -431,8 +386,6 @@ typing-extensions==4.12.2
|
|||||||
# via rich-click
|
# via rich-click
|
||||||
urllib3==2.2.2
|
urllib3==2.2.2
|
||||||
# via requests
|
# via requests
|
||||||
validators==0.33.0
|
|
||||||
# via manimgl
|
|
||||||
virtualenv==20.26.3
|
virtualenv==20.26.3
|
||||||
# via pre-commit
|
# via pre-commit
|
||||||
watchdog==4.0.2
|
watchdog==4.0.2
|
||||||
|
@ -41,16 +41,10 @@ click-default-group==1.2.4
|
|||||||
# via manim-slides
|
# via manim-slides
|
||||||
cloup==3.0.5
|
cloup==3.0.5
|
||||||
# via manim
|
# via manim
|
||||||
colour==0.1.5
|
|
||||||
# via manimgl
|
|
||||||
comm==0.2.2
|
comm==0.2.2
|
||||||
# via ipykernel
|
# via ipykernel
|
||||||
contourpy==1.2.1
|
|
||||||
# via matplotlib
|
|
||||||
coverage==7.6.1
|
coverage==7.6.1
|
||||||
# via pytest-cov
|
# via pytest-cov
|
||||||
cycler==0.12.1
|
|
||||||
# via matplotlib
|
|
||||||
debugpy==1.8.5
|
debugpy==1.8.5
|
||||||
# via ipykernel
|
# via ipykernel
|
||||||
decorator==5.1.1
|
decorator==5.1.1
|
||||||
@ -68,8 +62,6 @@ executing==2.0.1
|
|||||||
# via stack-data
|
# via stack-data
|
||||||
fastjsonschema==2.20.0
|
fastjsonschema==2.20.0
|
||||||
# via nbformat
|
# via nbformat
|
||||||
fonttools==4.53.1
|
|
||||||
# via matplotlib
|
|
||||||
furo==2024.8.6
|
furo==2024.8.6
|
||||||
# via manim-slides
|
# via manim-slides
|
||||||
glcontext==3.0.0
|
glcontext==3.0.0
|
||||||
@ -85,10 +77,8 @@ ipykernel==6.29.5
|
|||||||
ipython==8.26.0
|
ipython==8.26.0
|
||||||
# via ipykernel
|
# via ipykernel
|
||||||
# via manim-slides
|
# via manim-slides
|
||||||
# via manimgl
|
|
||||||
isosurfaces==0.1.2
|
isosurfaces==0.1.2
|
||||||
# via manim
|
# via manim
|
||||||
# via manimgl
|
|
||||||
jedi==0.19.1
|
jedi==0.19.1
|
||||||
# via ipython
|
# via ipython
|
||||||
jinja2==3.1.4
|
jinja2==3.1.4
|
||||||
@ -112,22 +102,16 @@ jupyter-core==5.7.2
|
|||||||
# via nbformat
|
# via nbformat
|
||||||
jupyterlab-pygments==0.3.0
|
jupyterlab-pygments==0.3.0
|
||||||
# via nbconvert
|
# via nbconvert
|
||||||
kiwisolver==1.4.5
|
|
||||||
# via matplotlib
|
|
||||||
lxml==5.3.0
|
lxml==5.3.0
|
||||||
# via manim-slides
|
# via manim-slides
|
||||||
# via python-pptx
|
# via python-pptx
|
||||||
manim==0.18.1
|
manim==0.18.1
|
||||||
# via manim-slides
|
# via manim-slides
|
||||||
manimgl==1.6.1
|
|
||||||
# via manim-slides
|
|
||||||
manimpango==0.5.0
|
manimpango==0.5.0
|
||||||
# via --override (workspace)
|
# via --override (workspace)
|
||||||
# via manim
|
# via manim
|
||||||
# via manimgl
|
|
||||||
mapbox-earcut==1.0.2
|
mapbox-earcut==1.0.2
|
||||||
# via manim
|
# via manim
|
||||||
# via manimgl
|
|
||||||
markdown-it-py==3.0.0
|
markdown-it-py==3.0.0
|
||||||
# via mdit-py-plugins
|
# via mdit-py-plugins
|
||||||
# via myst-parser
|
# via myst-parser
|
||||||
@ -135,8 +119,6 @@ markdown-it-py==3.0.0
|
|||||||
markupsafe==2.1.5
|
markupsafe==2.1.5
|
||||||
# via jinja2
|
# via jinja2
|
||||||
# via nbconvert
|
# via nbconvert
|
||||||
matplotlib==3.9.2
|
|
||||||
# via manimgl
|
|
||||||
matplotlib-inline==0.1.7
|
matplotlib-inline==0.1.7
|
||||||
# via ipykernel
|
# via ipykernel
|
||||||
# via ipython
|
# via ipython
|
||||||
@ -148,13 +130,9 @@ mistune==3.0.2
|
|||||||
# via nbconvert
|
# via nbconvert
|
||||||
moderngl==5.11.1
|
moderngl==5.11.1
|
||||||
# via manim
|
# via manim
|
||||||
# via manimgl
|
|
||||||
# via moderngl-window
|
# via moderngl-window
|
||||||
moderngl-window==2.4.6
|
moderngl-window==2.4.6
|
||||||
# via manim
|
# via manim
|
||||||
# via manimgl
|
|
||||||
mpmath==1.3.0
|
|
||||||
# via sympy
|
|
||||||
multipledispatch==1.0.0
|
multipledispatch==1.0.0
|
||||||
# via pyrr
|
# via pyrr
|
||||||
myst-parser==4.0.0
|
myst-parser==4.0.0
|
||||||
@ -173,23 +151,19 @@ nest-asyncio==1.6.0
|
|||||||
# via ipykernel
|
# via ipykernel
|
||||||
networkx==3.3
|
networkx==3.3
|
||||||
# via manim
|
# via manim
|
||||||
numpy==1.24.0
|
numpy==2.1.0
|
||||||
# via --override (workspace)
|
# via --override (workspace)
|
||||||
# via contourpy
|
|
||||||
# via ipython
|
# via ipython
|
||||||
# via isosurfaces
|
# via isosurfaces
|
||||||
# via manim
|
# via manim
|
||||||
# via manim-slides
|
# via manim-slides
|
||||||
# via manimgl
|
|
||||||
# via mapbox-earcut
|
# via mapbox-earcut
|
||||||
# via matplotlib
|
|
||||||
# via moderngl-window
|
# via moderngl-window
|
||||||
# via networkx
|
# via networkx
|
||||||
# via pyrr
|
# via pyrr
|
||||||
# via scipy
|
# via scipy
|
||||||
packaging==24.1
|
packaging==24.1
|
||||||
# via ipykernel
|
# via ipykernel
|
||||||
# via matplotlib
|
|
||||||
# via nbconvert
|
# via nbconvert
|
||||||
# via pytest
|
# via pytest
|
||||||
# via qtpy
|
# via qtpy
|
||||||
@ -205,8 +179,6 @@ pexpect==4.9.0
|
|||||||
pillow==10.4.0
|
pillow==10.4.0
|
||||||
# via manim
|
# via manim
|
||||||
# via manim-slides
|
# via manim-slides
|
||||||
# via manimgl
|
|
||||||
# via matplotlib
|
|
||||||
# via moderngl-window
|
# via moderngl-window
|
||||||
# via python-pptx
|
# via python-pptx
|
||||||
platformdirs==4.2.2
|
platformdirs==4.2.2
|
||||||
@ -237,21 +209,15 @@ pydantic-extra-types==2.9.0
|
|||||||
# via manim-slides
|
# via manim-slides
|
||||||
pydub==0.25.1
|
pydub==0.25.1
|
||||||
# via manim
|
# via manim
|
||||||
# via manimgl
|
|
||||||
pyglet==2.0.17
|
pyglet==2.0.17
|
||||||
# via moderngl-window
|
# via moderngl-window
|
||||||
pygments==2.18.0
|
pygments==2.18.0
|
||||||
# via furo
|
# via furo
|
||||||
# via ipython
|
# via ipython
|
||||||
# via manim
|
# via manim
|
||||||
# via manimgl
|
|
||||||
# via nbconvert
|
# via nbconvert
|
||||||
# via rich
|
# via rich
|
||||||
# via sphinx
|
# via sphinx
|
||||||
pyopengl==3.1.7
|
|
||||||
# via manimgl
|
|
||||||
pyparsing==3.1.4
|
|
||||||
# via matplotlib
|
|
||||||
pyqt6==6.7.1
|
pyqt6==6.7.1
|
||||||
# via manim-slides
|
# via manim-slides
|
||||||
pyqt6-qt6==6.7.2
|
pyqt6-qt6==6.7.2
|
||||||
@ -283,11 +249,9 @@ pytest-qt==4.4.0
|
|||||||
# via manim-slides
|
# via manim-slides
|
||||||
python-dateutil==2.9.0.post0
|
python-dateutil==2.9.0.post0
|
||||||
# via jupyter-client
|
# via jupyter-client
|
||||||
# via matplotlib
|
|
||||||
python-pptx==1.0.2
|
python-pptx==1.0.2
|
||||||
# via manim-slides
|
# via manim-slides
|
||||||
pyyaml==6.0.2
|
pyyaml==6.0.2
|
||||||
# via manimgl
|
|
||||||
# via myst-parser
|
# via myst-parser
|
||||||
pyzmq==26.2.0
|
pyzmq==26.2.0
|
||||||
# via ipykernel
|
# via ipykernel
|
||||||
@ -303,18 +267,15 @@ requests==2.32.3
|
|||||||
rich==13.7.1
|
rich==13.7.1
|
||||||
# via manim
|
# via manim
|
||||||
# via manim-slides
|
# via manim-slides
|
||||||
# via manimgl
|
|
||||||
rpds-py==0.20.0
|
rpds-py==0.20.0
|
||||||
# via jsonschema
|
# via jsonschema
|
||||||
# via referencing
|
# via referencing
|
||||||
rtoml==0.9.0
|
rtoml==0.11.0
|
||||||
# via manim-slides
|
# via manim-slides
|
||||||
scipy==1.14.1
|
scipy==1.14.1
|
||||||
# via manim
|
# via manim
|
||||||
# via manimgl
|
|
||||||
screeninfo==0.8.1
|
screeninfo==0.8.1
|
||||||
# via manim
|
# via manim
|
||||||
# via manimgl
|
|
||||||
shiboken6==6.7.2
|
shiboken6==6.7.2
|
||||||
# via pyside6
|
# via pyside6
|
||||||
# via pyside6-addons
|
# via pyside6-addons
|
||||||
@ -325,7 +286,6 @@ six==1.16.0
|
|||||||
# via python-dateutil
|
# via python-dateutil
|
||||||
skia-pathops==0.8.0.post1
|
skia-pathops==0.8.0.post1
|
||||||
# via manim
|
# via manim
|
||||||
# via manimgl
|
|
||||||
snowballstemmer==2.2.0
|
snowballstemmer==2.2.0
|
||||||
# via sphinx
|
# via sphinx
|
||||||
soupsieve==2.6
|
soupsieve==2.6
|
||||||
@ -365,9 +325,6 @@ stack-data==0.6.3
|
|||||||
# via ipython
|
# via ipython
|
||||||
svgelements==1.9.6
|
svgelements==1.9.6
|
||||||
# via manim
|
# via manim
|
||||||
# via manimgl
|
|
||||||
sympy==1.13.2
|
|
||||||
# via manimgl
|
|
||||||
tinycss2==1.3.0
|
tinycss2==1.3.0
|
||||||
# via nbconvert
|
# via nbconvert
|
||||||
tornado==6.4.1
|
tornado==6.4.1
|
||||||
@ -376,7 +333,6 @@ tornado==6.4.1
|
|||||||
tqdm==4.66.5
|
tqdm==4.66.5
|
||||||
# via manim
|
# via manim
|
||||||
# via manim-slides
|
# via manim-slides
|
||||||
# via manimgl
|
|
||||||
traitlets==5.14.3
|
traitlets==5.14.3
|
||||||
# via comm
|
# via comm
|
||||||
# via ipykernel
|
# via ipykernel
|
||||||
@ -389,15 +345,12 @@ traitlets==5.14.3
|
|||||||
# via nbformat
|
# via nbformat
|
||||||
# via nbsphinx
|
# via nbsphinx
|
||||||
typing-extensions==4.12.2
|
typing-extensions==4.12.2
|
||||||
# via ipython
|
|
||||||
# via manim
|
# via manim
|
||||||
# via pydantic
|
# via pydantic
|
||||||
# via pydantic-core
|
# via pydantic-core
|
||||||
# via python-pptx
|
# via python-pptx
|
||||||
urllib3==2.2.2
|
urllib3==2.2.2
|
||||||
# via requests
|
# via requests
|
||||||
validators==0.33.0
|
|
||||||
# via manimgl
|
|
||||||
watchdog==4.0.2
|
watchdog==4.0.2
|
||||||
# via manim
|
# via manim
|
||||||
wcwidth==0.2.13
|
wcwidth==0.2.13
|
||||||
|
@ -76,3 +76,15 @@ def presentation_config(
|
|||||||
slides_folder: Path,
|
slides_folder: Path,
|
||||||
) -> Generator[PresentationConfig, None, None]:
|
) -> Generator[PresentationConfig, None, None]:
|
||||||
yield PresentationConfig.from_file(slides_folder / "BasicSlide.json")
|
yield PresentationConfig.from_file(slides_folder / "BasicSlide.json")
|
||||||
|
|
||||||
|
|
||||||
|
def pytest_collection_modifyitems(items: list[pytest.Item]) -> None:
|
||||||
|
"""Make sure missing modules run at the very end."""
|
||||||
|
|
||||||
|
def uses_missing_modules_fixtures(item: pytest.Item) -> int:
|
||||||
|
if "missing_modules" in getattr(item, "fixturenames", []):
|
||||||
|
return 1
|
||||||
|
|
||||||
|
return 0
|
||||||
|
|
||||||
|
items.sort(key=uses_missing_modules_fixtures)
|
||||||
|
@ -69,7 +69,7 @@ class TestWizard:
|
|||||||
|
|
||||||
monkeypatch.setattr(QMessageBox, "exec", exec_patched)
|
monkeypatch.setattr(QMessageBox, "exec", exec_patched)
|
||||||
|
|
||||||
for i, (key, _) in enumerate(wizard.config.keys.dict().items()):
|
for i, (key, _) in enumerate(wizard.config.keys.model_dump().items()):
|
||||||
open_dialog(i, getattr(wizard.config.keys, key))
|
open_dialog(i, getattr(wizard.config.keys, key))
|
||||||
|
|
||||||
wizard.button_box.accepted.emit()
|
wizard.button_box.accepted.emit()
|
||||||
@ -89,7 +89,7 @@ def test_init() -> None:
|
|||||||
|
|
||||||
assert results.exit_code == 0
|
assert results.exit_code == 0
|
||||||
assert CONFIG_PATH.exists()
|
assert CONFIG_PATH.exists()
|
||||||
assert Config().dict() == Config.from_file(CONFIG_PATH).dict()
|
assert Config().model_dump() == Config.from_file(CONFIG_PATH).model_dump()
|
||||||
|
|
||||||
|
|
||||||
def test_init_custom_path() -> None:
|
def test_init_custom_path() -> None:
|
||||||
@ -106,7 +106,7 @@ def test_init_custom_path() -> None:
|
|||||||
assert results.exit_code == 0
|
assert results.exit_code == 0
|
||||||
assert not CONFIG_PATH.exists()
|
assert not CONFIG_PATH.exists()
|
||||||
assert custom_path.exists()
|
assert custom_path.exists()
|
||||||
assert Config().dict() == Config.from_file(custom_path).dict()
|
assert Config().model_dump() == Config.from_file(custom_path).model_dump()
|
||||||
|
|
||||||
|
|
||||||
def test_init_path_exists() -> None:
|
def test_init_path_exists() -> None:
|
||||||
@ -120,7 +120,7 @@ def test_init_path_exists() -> None:
|
|||||||
|
|
||||||
assert results.exit_code == 0
|
assert results.exit_code == 0
|
||||||
assert CONFIG_PATH.exists()
|
assert CONFIG_PATH.exists()
|
||||||
assert Config().dict() == Config.from_file(CONFIG_PATH).dict()
|
assert Config().model_dump() == Config.from_file(CONFIG_PATH).model_dump()
|
||||||
|
|
||||||
results = runner.invoke(init, input="o")
|
results = runner.invoke(init, input="o")
|
||||||
|
|
||||||
@ -156,7 +156,7 @@ def test_wizard(monkeypatch: MonkeyPatch) -> None:
|
|||||||
|
|
||||||
assert results.exit_code == 0
|
assert results.exit_code == 0
|
||||||
assert CONFIG_PATH.exists()
|
assert CONFIG_PATH.exists()
|
||||||
assert Config().dict() == Config.from_file(CONFIG_PATH).dict()
|
assert Config().model_dump() == Config.from_file(CONFIG_PATH).model_dump()
|
||||||
|
|
||||||
|
|
||||||
def test_wizard_closed_without_saving(monkeypatch: MonkeyPatch) -> None:
|
def test_wizard_closed_without_saving(monkeypatch: MonkeyPatch) -> None:
|
||||||
|
Reference in New Issue
Block a user