Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonGrace2282 authored Dec 16, 2024
2 parents 3f4d21a + 6abcc61 commit fc0cc7a
Show file tree
Hide file tree
Showing 45 changed files with 3,416 additions and 2,088 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-13, windows-latest]
python: ["3.9", "3.10", "3.11", "3.12"]
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]

steps:
- name: Checkout the repository
uses: actions/checkout@v4

- name: Install Poetry
run: |
pipx install "poetry==1.7.*"
pipx install "poetry==1.8.*"
poetry config virtualenvs.prefer-active-python true
- name: Setup Python ${{ matrix.python }}
Expand Down Expand Up @@ -142,10 +142,7 @@ jobs:
Expand-Archive -LiteralPath "$($env:TMP)\TinyTex.zip" -DestinationPath "$($PWD)\ManimCache\LatexWindows"
$env:Path = "$($PWD)\ManimCache\LatexWindows\TinyTeX\bin\windows;$($env:PATH)"
tlmgr update --self
foreach ($c in $tinyTexPackages){
$c=$c.Trim()
tlmgr install $c
}
tlmgr install $tinyTexPackages
$env:PATH=$OriPath
echo "Completed Latex"
Expand All @@ -156,10 +153,9 @@ jobs:
$env:Path = "$env:USERPROFILE\.poetry\bin;$($env:PATH)"
echo "$env:Path" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Install manim
- name: Install dependencies and manim
run: |
poetry config installer.modern-installation false
poetry install
poetry install --all-extras
- name: Run tests
run: |
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repos:
- id: check-toml
name: Validate Poetry
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.0
rev: v0.8.0
hooks:
- id: ruff
name: ruff lint
Expand All @@ -22,7 +22,7 @@ repos:
- id: ruff-format
types: [python]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.12.1
rev: v1.13.0
hooks:
- id: mypy
additional_dependencies:
Expand Down
43 changes: 0 additions & 43 deletions conftest.py

This file was deleted.

2 changes: 2 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ myst-parser
sphinx>=7.3
sphinx-copybutton
sphinxext-opengraph
sphinx-design
sphinx-reredirects
11 changes: 11 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,22 @@
"sphinx.ext.inheritance_diagram",
"sphinxcontrib.programoutput",
"myst_parser",
"sphinx_design",
"sphinx_reredirects",
]

# Automatically generate stub pages when using the .. autosummary directive
autosummary_generate = True

myst_enable_extensions = ["colon_fence", "amsmath"]

# redirects (for moved / deleted pages)
redirects = {
"installation/linux": "uv.html",
"installation/macos": "uv.html",
"installation/windows": "uv.html",
}

# generate documentation from type hints
ALIAS_DOCS_DICT = parse_module_attributes()[0]
autodoc_typehints = "description"
Expand Down
19 changes: 12 additions & 7 deletions docs/source/faq/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,19 +120,24 @@ of [ManimPango's README](https://github.com/ManimCommunity/ManimPango).

---

(not-on-path)=
## I am using Windows and get the error `X is not recognized as an internal or external command, operable program or batch file`

Regardless of whether `X` says `python` or `manim`, this means that the executable you
are trying to run is not located in one of the directories your system is looking
for them (specified by the `PATH` variable). Take a look at the instructions
{doc}`in the installation guide for Windows </installation/windows>`, or
[this StackExchange answer](https://superuser.com/questions/143119/how-do-i-add-python-to-the-windows-path/143121#143121)
to get help with editing the `PATH` variable manually.
If you have followed {doc}`our local installation instructions </installation/uv>` and
have not activated the corresponding virtual environment, make sure to use `uv run manim ...`
instead of just `manim` (or activate the virtual environment by following the instructions
printed when running `uv venv`).

If `python` is recognized but not `manim` or `pip`, you can try running
Otherwise there is a problem with the directories where your system is looking for
executables (the `PATH` variable).
If `python` is recognized, you can try running
commands by prepending `python -m`. That is, `manim` becomes `python -m manim`,
and `pip` becomes `python -m pip`.

Otherwise see
[this StackExchange answer](https://superuser.com/questions/143119/how-do-i-add-python-to-the-windows-path/143121#143121)
to get help with editing the `PATH` variable manually.

---

## I have tried using Chocolatey (`choco install manimce`) to install Manim, but it failed!
Expand Down
71 changes: 26 additions & 45 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ require no local installation. Head over to
https://try.manim.community to give our interactive tutorial a try.

Otherwise, if you intend to use Manim to work on an animation project,
we recommend installing the library locally (either to a conda environment,
your system's Python, or via Docker).
we recommend installing the library locally (preferably to some isolated
virtual Python environment, or a conda-like environment, or via Docker).

.. warning::

Expand All @@ -19,13 +19,31 @@ your system's Python, or via Docker).
versions <different-versions>` if you are unsure which
version you should install.

#. :ref:`(Recommended) Installing Manim via Python's package manager pip
<local-installation>`
#. :ref:`Installing Manim to a conda environment <conda-installation>`
#. :ref:`Installing Manim to your system's Python <local-installation>`
#. :ref:`Using Manim via Docker <docker-installation>`
#. :ref:`Interactive Jupyter notebooks via Binder / Google Colab
<interactive-online>`


.. _local-installation:

Installing Manim locally via pip
********************************

The recommended way of installing Manim is by using Python's package manager
pip. If you already have a Python environment set up, you can simply run
``pip install manim`` to install the library.

Our :doc:`local installation guide <installation/uv>` provides more detailed
instructions, including best practices for setting up a suitable local environment.

.. toctree::
:hidden:

installation/uv

.. _conda-installation:

Installing Manim via Conda and related environment managers
Expand Down Expand Up @@ -55,48 +73,6 @@ The following pages show how to install Manim in a conda environment:
installation/conda



.. _local-installation:

Installing Manim locally
************************

Manim is a Python library, and it can be
installed via `pip <https://pypi.org/project/manim/>`__
or `conda <https://anaconda.org/conda-forge/manim/>`__. However,
in order for Manim to work properly, some additional system
dependencies need to be installed first. The following pages have
operating system specific instructions for you to follow.

Manim requires Python version ``3.9`` or above to run.

.. hint::

Depending on your particular setup, the installation process
might be slightly different. Make sure that you have tried to
follow the steps on the following pages carefully, but in case
you hit a wall we are happy to help: either `join our Discord
<https://www.manim.community/discord/>`__, or start a new
Discussion `directly on GitHub
<https://github.com/ManimCommunity/manim/discussions>`__.

.. toctree::
:maxdepth: 2

installation/windows
installation/macos
installation/linux

Once Manim is installed locally, you can proceed to our
:doc:`quickstart guide <tutorials/quickstart>` which walks you
through rendering a first simple scene.

As mentioned above, do not worry if there are errors or other
problems: consult our :doc:`FAQ section </faq/index>` for help
(including instructions for how to ask Manim's community for help).



.. _docker-installation:

Using Manim via Docker
Expand Down Expand Up @@ -140,6 +116,11 @@ If you're using Visual Studio Code you can install an extension called
of the animation inside the editor. The extension can be installed through the
`marketplace of VS Code <https://marketplace.visualstudio.com/items?itemName=Rickaym.manim-sideview>`__.

.. caution::

This extension is not officially maintained by the Manim Community.
If you run into issues, please report them to the extension's author.


Installation for developers
***************************
Expand Down
33 changes: 20 additions & 13 deletions docs/source/installation/conda.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,25 @@ namely `conda <https://docs.conda.io/projects/conda/en/latest/user-guide/install

After installing your package manager, you can create a new environment and install ``manim`` inside by running

.. code-block:: bash

# using conda or mamba
conda create -n my-manim-environment
conda activate my-manim-environment
conda install -c conda-forge manim
# using pixi
pixi init
pixi add manim
.. tab-set::

.. tab-item:: conda / mamba

.. code-block:: bash
# if you want to use mamba, just replace conda below with mamba
conda create -n my-manim-environment
conda activate my-manim-environment
conda install -c conda-forge manim
.. tab-item:: pixi

.. code-block:: bash
pixi init
pixi add manim
Since all dependencies (except LaTeX) are handled by conda, you don't need to worry
about needing to install additional dependencies.
Expand All @@ -32,11 +42,8 @@ In order to make use of Manim's interface to LaTeX to, for example, render
equations, LaTeX has to be installed as well. Note that this is an optional
dependency: if you don't intend to use LaTeX, you don't have to install it.

You can install LaTeX by following the optional dependencies steps
for :ref:`Windows <win-optional-dependencies>`,
:ref:`Linux <linux-optional-dependencies>` or
:ref:`macOS <macos-optional-dependencies>`.

Recommendations on how to install LaTeX on different operating systems
can be found :doc:`in our local installation guide </installation/uv>`.


Working with Manim
Expand Down
Loading

0 comments on commit fc0cc7a

Please sign in to comment.