Workflow

This document is there to help you recreate a working environment for Manim Slides.

Dependencies

Manim Slides requires either Manim or ManimGL to be installed, along with their dependencies. Having both packages installed is fine too.

If none of those packages are installed, please refer to their specific installation guidelines:

Warning

If you install Manim from its git repository, as suggested by ManimGL, make sure to first check out a supported version (e.g., git checkout tags/v1.6.1 for ManimGL), otherwise it might install an unsupported version of Manim! See #314.

Also, note that ManimGL uses outdated dependencies, and may not work out-of-the-box. One example is NumPy: ManimGL does not specify any restriction on this package, but only numpy<1.25 will work, see #2053.

Forking the repository and cloning it locally

We use GitHub to host Manim Slides’ repository, and we encourage contributors to use git.

Useful links:

Once you feel comfortable with git and GitHub, fork the repository, and clone it locally.

As for every Python project, using virtual environment is recommended to avoid conflicts between modules. For this project, we use Rye to easily manage project and development dependencies. If not already, please install this tool.

Installing Python modules

With Rye, installation becomes straightforward:

rye sync --all-features

Running commands

Because modules are installed in a new Python environment, you cannot use them directly in the shell. Instead, you either need to prepend rye run to any command, e.g.:

rye run manim-slides wizard

Testing your code

Most of the tests are done with GitHub actions, thus not on your computer. The only command you should run locally is:

rye run pre-commit run --all-files

This runs a few linter and formatter to make sure the code quality and style stay constant across time. If a warning or an error is displayed, please fix it before going to next step.

For testing your code, simply run:

rye run pytest

Building the documentation

The documentation is generated using Sphinx, based on the content in docs/source and in the manim_slides Python package.

To generate the documentation, run the following:

cd docs
rye run make html

Then, the output index file is located at docs/build/html/index.html and can be opened with any modern browser.

Warning

Building the documentation can take quite some time, especially the first time as it needs to render all the animations.

Further builds should run faster.

Proposing changes

Once you feel ready and think your contribution is ready to be reviewed, create a pull request and wait for a reviewer to check your work!

Many thanks to you!