From 475490b4244e1e617eb4f8eb3653684f30a9cb35 Mon Sep 17 00:00:00 2001 From: Hugues Devimeux <36239975+huguesdevimeux@users.noreply.github.com> Date: Wed, 8 Jul 2020 12:33:21 +0200 Subject: [PATCH 1/7] fixed tests --- tests/test_cli/test_cli.py | 4 ++-- tests/testing_utils.py | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/test_cli/test_cli.py b/tests/test_cli/test_cli.py index da850a1479..195899cf12 100644 --- a/tests/test_cli/test_cli.py +++ b/tests/test_cli/test_cli.py @@ -22,7 +22,7 @@ def test_help(python_version): @pytest.mark.skip_end_to_end def test_basicScene(python_version): """ Simulate SquareToCircle. The cache will be saved in tests_caches/media_temp (temporary directory). This is mainly intended to test the partial-movies process. """ - path_basic_scene = os.path.join("tests_data", "basic_scenes.py") + path_basic_scene = os.path.join("tests", "tests_data", "basic_scenes.py") path_output = os.path.join("tests_cache", "media_temp") command = [python_version, "-m", "manim", path_basic_scene, "SquareToCircle", "-l", "--media_dir", path_output] @@ -35,7 +35,7 @@ def test_basicScene(python_version): @pytest.mark.skip_end_to_end def test_WriteStuff(python_version): """This is mainly intended to test the caching process of the tex objects""" - path_basic_scene = os.path.join("tests_data", "basic_scenes.py") + path_basic_scene = os.path.join("tests", "tests_data", "basic_scenes.py") path_output = os.path.join("tests_cache", "media_temp") command = [python_version, "-m", "manim", path_basic_scene, "WriteStuff", "-l", "--media_dir", path_output] diff --git a/tests/testing_utils.py b/tests/testing_utils.py index affd66e206..3235c13035 100644 --- a/tests/testing_utils.py +++ b/tests/testing_utils.py @@ -6,7 +6,7 @@ import pytest from manim import logger -from manim import config +from manim import config, file_writer_config class SceneTester: @@ -34,8 +34,8 @@ class SceneTester: def __init__(self, scene_object, module_tested, caching_needed=False): # Disable the the logs, (--quiet is broken) TODO logging.disable(logging.CRITICAL) - self.path_tests_medias_cache = os.path.join('tests_cache', module_tested) - self.path_tests_data = os.path.join('tests_data', module_tested) + self.path_tests_medias_cache = os.path.join('tests', 'tests_cache', module_tested) + self.path_tests_data = os.path.join('tests', 'tests_data', module_tested) if caching_needed: config['text_dir'] = os.path.join( @@ -43,6 +43,7 @@ def __init__(self, scene_object, module_tested, caching_needed=False): config['tex_dir'] = os.path.join( self.path_tests_medias_cache, scene_object.__name__, 'Tex') + file_writer_config['skip_animations'] = True config['pixel_height'] = 480 config['pixel_width'] = 854 config['frame_rate'] = 15 From 7b662f49c11c78cbbbed0ee083e4d488cee0e3c6 Mon Sep 17 00:00:00 2001 From: Hugues Devimeux <36239975+huguesdevimeux@users.noreply.github.com> Date: Wed, 8 Jul 2020 12:45:17 +0200 Subject: [PATCH 2/7] decoding error --- tests/test_cli/test_cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_cli/test_cli.py b/tests/test_cli/test_cli.py index 195899cf12..ebe4462b86 100644 --- a/tests/test_cli/test_cli.py +++ b/tests/test_cli/test_cli.py @@ -16,7 +16,7 @@ def capture(command): def test_help(python_version): command = [python_version, "-m", "manim", "--help"] out, err, exitcode = capture(command) - assert exitcode == 0, f"Manim has been installed incorrectly. Please refer to the troubleshooting section on the wiki. Error:\n{err}" + assert exitcode == 0, f"Manim has been installed incorrectly. Please refer to the troubleshooting section on the wiki. Error:\n{err.decode()}" @pytest.mark.skip_end_to_end From 1ac0ff95839ca717c8ee61001762498ab3562748 Mon Sep 17 00:00:00 2001 From: Hugues Devimeux <36239975+huguesdevimeux@users.noreply.github.com> Date: Wed, 8 Jul 2020 16:55:40 +0200 Subject: [PATCH 3/7] fixed indication --- manim/animation/indication.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manim/animation/indication.py b/manim/animation/indication.py index 0daef10a57..43bc6d0103 100644 --- a/manim/animation/indication.py +++ b/manim/animation/indication.py @@ -1,6 +1,7 @@ import numpy as np from ..constants import * +from ..config import config from ..animation.animation import Animation from ..animation.movement import Homotopy from ..animation.composition import AnimationGroup @@ -45,7 +46,7 @@ def create_target(self): def create_starting_mobject(self): return Dot( - radius=FRAME_X_RADIUS + FRAME_Y_RADIUS, + radius=config['frame_x_radius'] + config['frame_y_radius'], stroke_width=0, fill_color=self.color, fill_opacity=0, From 6c89350ba2e9b7fb7997a006eea0e71579dbd8d5 Mon Sep 17 00:00:00 2001 From: Hugues Devimeux <36239975+huguesdevimeux@users.noreply.github.com> Date: Wed, 8 Jul 2020 16:56:32 +0200 Subject: [PATCH 4/7] BIGGEST CHANGE OF MANIM'S HISTORY changed <3 --- manim/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manim/config.py b/manim/config.py index a866eb89dd..0311a72a78 100644 --- a/manim/config.py +++ b/manim/config.py @@ -177,7 +177,7 @@ def _parse_file_writer_config(config_parser, args): def _parse_cli(arg_list, input=True): parser = argparse.ArgumentParser( description='Animation engine for explanatory math videos', - epilog='Made with ❤ by the manim community devs' + epilog='Made with <3 by the manim community devs' ) if input: parser.add_argument( From 41f0b5bc021af064d19254c0885a2efe4c8dcf8f Mon Sep 17 00:00:00 2001 From: Hugues Devimeux <36239975+huguesdevimeux@users.noreply.github.com> Date: Wed, 8 Jul 2020 18:03:04 +0200 Subject: [PATCH 5/7] updated set_test_scene [skip ci] --- tests/testing_utils.py | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/tests/testing_utils.py b/tests/testing_utils.py index 3235c13035..a6b52ba594 100644 --- a/tests/testing_utils.py +++ b/tests/testing_utils.py @@ -126,29 +126,11 @@ def set_test_scene(scene_object, module_name): set_test_scene(DotTest, "geometry") """ - CONFIG_TEST = { - 'camera_config': { - 'frame_rate': 15, - 'pixel_height': 480, - 'pixel_width': 854 - }, - 'end_at_animation_number': None, - 'file_writer_config': { - 'file_name': None, - 'input_file_path': 'test.py', - 'movie_file_extension': '.mp4', - 'png_mode': 'RGB', - 'save_as_gif': False, - 'save_last_frame': False, - 'save_pngs': False, - 'write_to_movie': False - }, - 'leave_progress_bars': False, - 'skip_animations': True, - 'start_at_animation_number': None - } - - scene = scene_object(**CONFIG_TEST) + config['pixel_height'] = 480 + config['pixel_width'] = 854 + config['frame_rate'] = 15 + + scene = scene_object() data = scene.get_frame() path = os.path.join("manim", "tests", "tests_data", "{}".format(module_name)) From 87fe4121fee857955e58988441c7e85068af5512 Mon Sep 17 00:00:00 2001 From: Hugues Devimeux <36239975+huguesdevimeux@users.noreply.github.com> Date: Wed, 8 Jul 2020 18:38:46 +0200 Subject: [PATCH 6/7] updated set_test_scene [skip ci] --- tests/testing_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testing_utils.py b/tests/testing_utils.py index a6b52ba594..d7742e2db3 100644 --- a/tests/testing_utils.py +++ b/tests/testing_utils.py @@ -125,7 +125,7 @@ def set_test_scene(scene_object, module_name): Normal usage:: set_test_scene(DotTest, "geometry") """ - + file_writer_config['skip_animations'] = True config['pixel_height'] = 480 config['pixel_width'] = 854 config['frame_rate'] = 15 From 7a088cfd6df8438c33322f4d431cd3136ed29301 Mon Sep 17 00:00:00 2001 From: Hugues Devimeux <36239975+huguesdevimeux@users.noreply.github.com> Date: Thu, 9 Jul 2020 00:20:19 +0200 Subject: [PATCH 7/7] fixed config file related stuff, waiting for a fix --- tests/testing_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testing_utils.py b/tests/testing_utils.py index d7742e2db3..f8651de969 100644 --- a/tests/testing_utils.py +++ b/tests/testing_utils.py @@ -40,7 +40,7 @@ def __init__(self, scene_object, module_tested, caching_needed=False): if caching_needed: config['text_dir'] = os.path.join( self.path_tests_medias_cache, scene_object.__name__, 'Text') - config['tex_dir'] = os.path.join( + file_writer_config['tex_dir'] = os.path.join( self.path_tests_medias_cache, scene_object.__name__, 'Tex') file_writer_config['skip_animations'] = True