-
Notifications
You must be signed in to change notification settings - Fork 2.3k
FIX : 472 / Small refactor of partial-movie-files handling #489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
f64447d
fix #460 by enabling skipping wait statements.
8229839
added tests
a429249
refactored partialmovie files handling
33d3cea
improved berobosity of hashing
d43b228
fixed tests
7640105
fixed black
fbfb3d2
fixed file name
8c50fe2
change format to f string
2d3e517
fixed comment
0cc008f
fixed comment
2d63995
Merge branch 'master' into fix-472
3fff83e
Update manim/scene/scene.py
huguesdevimeux c50335b
Merge remote-tracking branch 'origin/master' into fix-472
behackl b1bf9da
fix test output (caused by 3fff83e8)
behackl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
{"levelname": "INFO", "module": "config", "message": "Log file will be saved in <>"} | ||
{"levelname": "DEBUG", "module": "hashing", "message": "Hashing ..."} | ||
{"levelname": "DEBUG", "module": "hashing", "message": "Hashing done in <> s."} | ||
{"levelname": "DEBUG", "module": "hashing", "message": "Hash generated : <>"} | ||
{"levelname": "DEBUG", "module": "scene", "message": "List of the first few animation hashes of the scene: <>"} | ||
{"levelname": "INFO", "module": "scene_file_writer", "message": "Animation 0 : Partial movie file written in <>"} | ||
{"levelname": "DEBUG", "module": "scene_file_writer", "message": "Partial movie files to combine (1 files): <>"} | ||
{"levelname": "INFO", "module": "scene_file_writer", "message": "\nFile ready at <>\n"} | ||
{"levelname": "INFO", "module": "scene", "message": "Rendered SquareToCircle\nPlayed 1 animations"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import os | ||
import pytest | ||
import subprocess | ||
from manim import file_writer_config | ||
|
||
from ..utils.commands import capture | ||
from ..utils.video_tester import * | ||
|
||
|
||
@video_comparison( | ||
"SceneWithMultipleWaitCallsWithNFlag.json", | ||
"videos/simple_scenes/480p15/SceneWithMultipleWaitCalls.mp4", | ||
) | ||
def test_wait_skip(tmp_path, manim_cfg_file, simple_scenes_path): | ||
# Test for PR #468. Intended to test if wait calls are correctly skipped. | ||
scene_name = "SceneWithMultipleWaitCalls" | ||
command = [ | ||
"python", | ||
"-m", | ||
"manim", | ||
simple_scenes_path, | ||
scene_name, | ||
"-l", | ||
"--media_dir", | ||
str(tmp_path), | ||
"-n", | ||
"3", | ||
] | ||
out, err, exit_code = capture(command) | ||
assert exit_code == 0, err | ||
|
||
|
||
@video_comparison( | ||
"SceneWithMultiplePlayCallsWithNFlag.json", | ||
"videos/simple_scenes/480p15/SceneWithMultipleCalls.mp4", | ||
) | ||
def test_play_skip(tmp_path, manim_cfg_file, simple_scenes_path): | ||
# Intended to test if play calls are correctly skipped. | ||
scene_name = "SceneWithMultipleCalls" | ||
command = [ | ||
"python", | ||
"-m", | ||
"manim", | ||
simple_scenes_path, | ||
scene_name, | ||
"-l", | ||
"--media_dir", | ||
str(tmp_path), | ||
"-n", | ||
"3", | ||
] | ||
out, err, exit_code = capture(command) | ||
assert exit_code == 0, err |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.