From 3f5f0cb0021eab67f2f09dc450ffe1a18be1f57a Mon Sep 17 00:00:00 2001 From: Hugues Devimeux Date: Wed, 20 May 2020 13:43:27 +0200 Subject: [PATCH 1/7] fixed import od once_useful_constructions --- manimlib/imports.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/manimlib/imports.py b/manimlib/imports.py index 1020f8ce0a..ad1ecc7e52 100644 --- a/manimlib/imports.py +++ b/manimlib/imports.py @@ -65,14 +65,6 @@ from manimlib.for_3b1b_videos.pi_creature_animations import * from manimlib.for_3b1b_videos.pi_creature_scene import * -from manimlib.once_useful_constructs.arithmetic import * -from manimlib.once_useful_constructs.combinatorics import * -from manimlib.once_useful_constructs.complex_transformation_scene import * -from manimlib.once_useful_constructs.counting import * -from manimlib.once_useful_constructs.fractals import * -from manimlib.once_useful_constructs.graph_theory import * -from manimlib.once_useful_constructs.light import * - from manimlib.scene.graph_scene import * from manimlib.scene.moving_camera_scene import * from manimlib.scene.reconfigurable_scene import * From b7c20ce5d3da175902f77db6ba401dcd62c8cd42 Mon Sep 17 00:00:00 2001 From: Hugues Devimeux Date: Wed, 20 May 2020 13:46:39 +0200 Subject: [PATCH 2/7] added minimal-tests --- manimlib/tests/tests_example_scene.py | 55 +++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 manimlib/tests/tests_example_scene.py diff --git a/manimlib/tests/tests_example_scene.py b/manimlib/tests/tests_example_scene.py new file mode 100644 index 0000000000..f97aec202c --- /dev/null +++ b/manimlib/tests/tests_example_scene.py @@ -0,0 +1,55 @@ +from manimlib.imports import * + +# This file is intended to test any new feature added. +# Feel free to add a test or to modify one when adding a new/changing a feature. + +class Test_geometry(Scene): + def construct(self): + circle = Circle() + square = Square() + square.flip(RIGHT) + square.rotate(-3 * TAU / 8) + circle.set_fill(PINK, opacity=0.5) + self.play(ShowCreation(square)) + self.play(Transform(square, circle)) + self.play(FadeOut(square)) + + text = TextMobject("Testing !") + self.play(DrawBorderThenFill(text)) + + eq1=TextMobject("$\\vec{X}_0 \\cdot \\vec{Y}_1 = 56$") + self.play(Transform(text, eq1), eq1.shift, 3*UP) + self.remove(eq1, text) + decimal = DecimalNumber( + 0, + show_ellipsis=True, + num_decimal_places=3, + include_sign=True, + ) + square = Square().to_edge(UP) + + decimal.add_updater(lambda d: d.next_to(square, RIGHT)) + decimal.add_updater(lambda d: d.set_value(square.get_center()[1])) + self.add(square, decimal) + self.play( + square.to_edge, DOWN, + rate_func=there_and_back, + run_time=1, + ) + self.wait() + +class Test_plotting(GraphScene): + CONFIG = { + "x_min" : -10, + "x_max" : 10.3, + "y_min" : -1.5, + "y_max" : 1.5, + "graph_origin" : ORIGIN , + "function_color" : RED , + "axes_color" : GREEN, + "x_labeled_nums" :range(-10,12,2), + } + def construct(self): + self.setup_axes(animate=False) + func_graph = self.get_graph(lambda x : x**2, self.function_color) + self.play(ShowCreation(func_graph)) From 64092c81d3631f08a168e25acb2f662b4125ae33 Mon Sep 17 00:00:00 2001 From: Hugues Devimeux Date: Wed, 20 May 2020 14:08:08 +0200 Subject: [PATCH 3/7] removed Latex from the tests --- manimlib/tests/tests_example_scene.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/manimlib/tests/tests_example_scene.py b/manimlib/tests/tests_example_scene.py index f97aec202c..3b67d5b26e 100644 --- a/manimlib/tests/tests_example_scene.py +++ b/manimlib/tests/tests_example_scene.py @@ -17,9 +17,6 @@ def construct(self): text = TextMobject("Testing !") self.play(DrawBorderThenFill(text)) - eq1=TextMobject("$\\vec{X}_0 \\cdot \\vec{Y}_1 = 56$") - self.play(Transform(text, eq1), eq1.shift, 3*UP) - self.remove(eq1, text) decimal = DecimalNumber( 0, show_ellipsis=True, From 4f33f86f30b65618b332f537c8ed54c2205bf230 Mon Sep 17 00:00:00 2001 From: Hugues Devimeux Date: Wed, 20 May 2020 15:08:20 +0200 Subject: [PATCH 4/7] fixed Text --- manimlib/tests/tests_example_scene.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manimlib/tests/tests_example_scene.py b/manimlib/tests/tests_example_scene.py index 3b67d5b26e..4e598822d0 100644 --- a/manimlib/tests/tests_example_scene.py +++ b/manimlib/tests/tests_example_scene.py @@ -14,7 +14,7 @@ def construct(self): self.play(Transform(square, circle)) self.play(FadeOut(square)) - text = TextMobject("Testing !") + text = Text("Testing !") self.play(DrawBorderThenFill(text)) decimal = DecimalNumber( From 5c28a7b00d704a1ca6cb755cd8b5c89762a9b7dd Mon Sep 17 00:00:00 2001 From: Hugues Devimeux Date: Wed, 20 May 2020 15:08:36 +0200 Subject: [PATCH 5/7] rename sample_scenes --- example_scenes.py => manimlib/samples/sample_scenes.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename example_scenes.py => manimlib/samples/sample_scenes.py (100%) diff --git a/example_scenes.py b/manimlib/samples/sample_scenes.py similarity index 100% rename from example_scenes.py rename to manimlib/samples/sample_scenes.py From 3b43271b9b8cce803c0245813a548e46c7e3d87f Mon Sep 17 00:00:00 2001 From: Hugues Devimeux Date: Wed, 20 May 2020 15:24:01 +0200 Subject: [PATCH 6/7] fixed embarassing mistake --- {manimlib/samples => samples}/sample_scenes.py | 0 {manimlib/tests => tests}/tests_example_scene.py | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename {manimlib/samples => samples}/sample_scenes.py (100%) rename {manimlib/tests => tests}/tests_example_scene.py (100%) diff --git a/manimlib/samples/sample_scenes.py b/samples/sample_scenes.py similarity index 100% rename from manimlib/samples/sample_scenes.py rename to samples/sample_scenes.py diff --git a/manimlib/tests/tests_example_scene.py b/tests/tests_example_scene.py similarity index 100% rename from manimlib/tests/tests_example_scene.py rename to tests/tests_example_scene.py From 3b4458565efbda014233e9a73c466c3707c6d16e Mon Sep 17 00:00:00 2001 From: Hugues Devimeux Date: Wed, 20 May 2020 15:45:51 +0200 Subject: [PATCH 7/7] fixed name --- tests/{tests_example_scene.py => tests_sample_scenes.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tests/{tests_example_scene.py => tests_sample_scenes.py} (100%) diff --git a/tests/tests_example_scene.py b/tests/tests_sample_scenes.py similarity index 100% rename from tests/tests_example_scene.py rename to tests/tests_sample_scenes.py