Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Fix docbuild warning (#744)

Benjamin Hackl6a02b38a2db6
diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst
index 63cd1427c..00edd6847 100644
--- a/docs/source/changelog.rst
+++ b/docs/source/changelog.rst
@@ -1,22 +1,22 @@
-*********
+#########
Changelog
-*********
-
+#########
+******
v0.2.0
-==================
+******
:Date: TBD
Changes since Manim Community release v0.1.0
Fixes
-^^^^^
+=====
#. JsRender is optional to install. (via :pr:`697`).
Configuration
-^^^^^^^^^^^^^
+=============
#. Removed the ``skip_animations`` config option and added the
``Renderer.skip_animations`` attribute instead (via :pr:`696`).
@@ -28,14 +28,14 @@ Configuration
Documentation
-^^^^^^^^^^^^^
+=============
#. Add ``:issue:`` and ``:pr:`` directives for simplifying linking to issues and
pull requests on GitHub (via :pr:`685`).
Mobjects, Scenes, and Animations
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+================================
#. The ``alignment`` attribute to Tex and MathTex has been removed in favour of ``tex_environment``.
#. :class:`~.Text` now uses Pango for rendering. ``PangoText`` has been removed. The old implementation is still available as a fallback as :class:`~.CairoText`.
@@ -48,9 +48,9 @@ Mobjects, Scenes, and Animations
(use ``call_updater=True`` instead) (via :pr:`710`)
-
+******
v0.1.0
-==================
+******
:Date: October 21, 2020
@@ -60,11 +60,10 @@ maintaining backwards compatibility wherever possible.
New Features
-------------
-
+============
Command line
-^^^^^^^^^^^^
+------------
#. Output of 'manim --help' has been improved
#. Implement logging with the :code:`rich` library and a :code:`logger` object instead of plain ol' prints
@@ -84,7 +83,7 @@ Command line
Config system
-^^^^^^^^^^^^^
+-------------
#. Implement a :code:`manim.cfg` config file system, that consolidates the global configuration, the command line argument parsing, and some of the constants defined in :code:`constants.py`
#. Added utilities for manipulating Manim’s :code:`.cfg` files.
@@ -102,7 +101,7 @@ Config system
Mobjects, Scenes, and Animations
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+--------------------------------
#. Add customizable left and right bracket for :code:`Matrix` mobject and :code:`set_row_colors` method for matrix mobject
#. Add :code:`AddTeXLetterByLetter` animation
@@ -129,13 +128,14 @@ Mobjects, Scenes, and Animations
Documentation
--------------
+=============
#. Added clearer installation instructions, tutorials, examples, and API reference [WIP]
Fixes
------
+=====
+
#. Initialization of directories has been moved to :code:`config.py`, and a bunch of bugs associated to file structure generation have been fixed
#. Nonfunctional file :code:`media_dir.txt` has been removed
#. Nonfunctional :code:`if` statements in :code:`scene_file_writer.py` have been removed
@@ -145,7 +145,7 @@ Fixes
Of interest to developers
--------------------------
+=========================
#. Python code formatting is now enforced by using the :code:`black` tool
#. PRs now require two approving code reviews from community devs before they can be merged
@@ -160,7 +160,8 @@ Of interest to developers
#. Colors have moved to an Enum
Other Changes
---------------
+=============
+
#. Cleanup 3b1b Specific Files
#. Rename package from manimlib to manim
#. Move all imports to :code:`__init__`, so :code:`from manim import *` replaces :code:`from manimlib.imports import *`
diff --git a/docs/source/conf.py b/docs/source/conf.py
index 2ff52fba7..762dacd94 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -72,6 +72,9 @@ add_module_names = False
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
+# Custom section headings in our documentation
+napoleon_custom_sections = ["Tests", ("Test", "Tests")]
+
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
diff --git a/docs/source/installation/win.rst b/docs/source/installation/win.rst
index 60bbc60a2..f9d301d13 100644
--- a/docs/source/installation/win.rst
+++ b/docs/source/installation/win.rst
@@ -16,19 +16,19 @@ You can install manim very easily using chocolatey, by typing the following comm
And then you can skip all the other steps and move to installing :ref:`latex-installation`.
-Please see :ref:`troubleshooting` section for details about OSError.
+Please see :doc:`troubleshooting` section for details about OSError.
Pango Installation
******************
-These steps would get you `libpango-1.0-0.dll` to your ``PATH`` along
-with other dependencies. You may probably have them before itself if
-you have installed `GTK <https://www.gtk.org/>`_ or any ``GTK``
-based app like emacs. If you have it you can just add it to your
+These steps would get you `libpango-1.0-0.dll` to your ``PATH`` along
+with other dependencies. You may probably have them before itself if
+you have installed `GTK <https://www.gtk.org/>`_ or any ``GTK``
+based app like emacs. If you have it you can just add it to your
path and skip these steps.
1. Go to `Release Page
- <https://github.com/ManimCommunity/manim-windows/releases/latest>`_
+ <https://github.com/ManimCommunity/manim-windows/releases/latest>`_
and download the one according to your PC architechture.
.. important:: Please download the ``zip`` file for architechture of python installed.
@@ -37,7 +37,7 @@ path and skip these steps.
2. Extract the zip file using File Explorer or 7z to the loaction you want to install.
.. code-block:: bash
-
+
7z x pango-windows-binaires-x64.zip -oC:\Pango
3. Finally, add it `PATH variable
@@ -71,7 +71,7 @@ installed using ``tlmgr``. See https://www.tug.org/texlive/tlmgr.html for more i
2. Run the following command
.. code-block:: powershell
-
+
choco install manim-latex
3. Finally, check whether it installed properly by running an example scene.
diff --git a/docs/source/manim_directive.py b/docs/source/manim_directive.py
index 4ba9a202c..121eb8dd6 100644
--- a/docs/source/manim_directive.py
+++ b/docs/source/manim_directive.py
@@ -87,7 +87,7 @@ def process_name_list(option_input: str, reference_type: str) -> List[str]:
r"""Reformats a string of space separated class names
as a list of strings containing valid Sphinx references.
- TESTS
+ Tests
-----
::
diff --git a/docs/source/tutorials/configuration.rst b/docs/source/tutorials/configuration.rst
index 053a0a990..372eefccb 100644
--- a/docs/source/tutorials/configuration.rst
+++ b/docs/source/tutorials/configuration.rst
@@ -302,19 +302,19 @@ these steps:
5. :class:`ManimConfig` is instantiated to create the global ``config`` object.
6. The ``parser`` from step 3 is fed into the ``config`` from step 5 via
:meth:`ManimConfig.digest_parser`.
-6. Both ``logger`` and ``config`` are exposed to the user.
+7. Both ``logger`` and ``config`` are exposed to the user.
If manim is being invoked from the command line, all of the previous steps
happen, and are complemented by:
-7. The CLI flags are parsed and fed into ``config`` via
+8. The CLI flags are parsed and fed into ``config`` via
:meth:`~ManimConfig.digest_args`.
-8. If the ``--config_file`` flag was used, a new :class:`ConfigParser` object
+9. If the ``--config_file`` flag was used, a new :class:`ConfigParser` object
is created with the contents of the library-wide file, the user-wide file if
it exists, and the file passed via ``--config_file``. In this case, the
folder-wide file, if it exists, is ignored.
-9. The new parser is fed into ``config``.
-10. The rest of the CLI flags are processed.
+10. The new parser is fed into ``config``.
+11. The rest of the CLI flags are processed.
To summarize, the order of precedence for configuration options, from lowest to
highest precedence, is:
diff --git a/manim/_config/utils.py b/manim/_config/utils.py
index 6ec06fa26..14f8f4e69 100644
--- a/manim/_config/utils.py
+++ b/manim/_config/utils.py
@@ -6,7 +6,7 @@ height/width, frame rate), output (e.g. directories, logging), styling
(e.g. background color, transparency), and general behavior (e.g. writing a
movie vs writing a single frame).
-See :doc:`tutorials/configuration` for an introduction to Manim's configuration system.
+See :doc:`/tutorials/configuration` for an introduction to Manim's configuration system.
"""
diff --git a/manim/animation/transform.py b/manim/animation/transform.py
index 7fa46c56c..4b8b60546 100644
--- a/manim/animation/transform.py
+++ b/manim/animation/transform.py
@@ -165,9 +165,9 @@ class MoveToTarget(Transform):
class ApplyMethod(Transform):
def __init__(self, method, *args, **kwargs):
"""
- method is a method of Mobject, *args are arguments for
+ method is a method of Mobject, ``args`` are arguments for
that method. Key word arguments should be passed in
- as the last arg, as a dict, since **kwargs is for
+ as the last arg, as a dict, since ``kwargs`` is for
configuration of the transform itself
Relies on the fact that mobject methods return the mobject
diff --git a/manim/camera/multi_camera.py b/manim/camera/multi_camera.py
index 1cec58462..02ad2e032 100644
--- a/manim/camera/multi_camera.py
+++ b/manim/camera/multi_camera.py
@@ -19,11 +19,11 @@ class MultiCamera(MovingCamera):
):
"""Initalises the MultiCamera
- Parameters:
- -----------
- *image_mobjects_from_cameras : ImageMobject
+ Parameters
+ ----------
+ image_mobjects_from_cameras : ImageMobject
- **kwargs
+ kwargs
Any valid keyword arguments of MovingCamera.
"""
self.image_mobjects_from_cameras = []
@@ -34,7 +34,7 @@ class MultiCamera(MovingCamera):
def add_image_mobject_from_camera(self, image_mobject_from_camera):
"""Adds an ImageMobject that's been obtained from the camera
- into the list `self.image_mobject_from_cameras`
+ into the list ``self.image_mobject_from_cameras``
Parameters
----------
diff --git a/manim/mobject/types/vectorized_mobject.py b/manim/mobject/types/vectorized_mobject.py
index fb92973eb..f6d819fc9 100644
--- a/manim/mobject/types/vectorized_mobject.py
+++ b/manim/mobject/types/vectorized_mobject.py
@@ -889,14 +889,14 @@ class VMobject(Mobject):
--------
The default direction of a :class:`~.Circle` is counterclockwise::
- >>> from manim import Circle
- >>> Circle().get_direction()
- 'CCW'
+ >>> from manim import Circle
+ >>> Circle().get_direction()
+ 'CCW'
Returns
-------
:class:`str`
- Either `"CW"` or `"CCW"`.
+ Either ``"CW"`` or ``"CCW"``.
"""
return shoelace_direction(self.get_start_anchors())
diff --git a/manim/scene/scene.py b/manim/scene/scene.py
index 7887c8fc0..0684e05a6 100644
--- a/manim/scene/scene.py
+++ b/manim/scene/scene.py
@@ -770,9 +770,11 @@ class Scene(Container):
Parameters
----------
- *args : Animation or mobject with mobject method and params
- **kwargs : named parameters affecting what was passed in *args e.g
- run_time, lag_ratio etc.
+ args
+ Animation or mobject with mobject method and params
+ kwargs
+ named parameters affecting what was passed in ``args``,
+ e.g. ``run_time``, ``lag_ratio`` and so on.
"""
if len(args) == 0:
warnings.warn("Called Scene.play with no animations")
diff --git a/manim/utils/hashing.py b/manim/utils/hashing.py
index 05f1f9773..b7eb231df 100644
--- a/manim/utils/hashing.py
+++ b/manim/utils/hashing.py
@@ -177,7 +177,7 @@ class CustomEncoder(json.JSONEncoder):
def get_json(obj):
"""Recursively serialize `object` to JSON using the :class:`CustomEncoder` class.
- Paramaters
+ Parameters
----------
dict_config : :class:`dict`
The dict to flatten