mirror of
https://github.com/ManimCommunity/manim.git
synced 2026-06-22 10:01:47 +00:00
Change project management tool from poetry to uv (#4138)
* rewrite pyproject.toml to support uv; version upgrades of several dev dependencies * codespellrc: poetry.lock -> uv.lock * rewrite workflows, first attempt * change name of pre-commit-hook * dev-dependencies -> dependency-groups.dev * lint + format * Update .github/workflows/ci.yml Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com> * convert development.rst to myst markdown * fix (most) docbuild warnings from theme upgrade * development instructions: switch to uv, plus minor updates * update entrypoint config in plugin docs + tests * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
a6990bd83c
commit
95fba7da10
13 changed files with 4244 additions and 5261 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
[codespell]
|
[codespell]
|
||||||
check-hidden = True
|
check-hidden = True
|
||||||
skip = .git,*.js,*.js.map,*.css,*.css.map,*.html,*.po,*.pot,poetry.lock,*.log,*.svg
|
skip = .git,*.js,*.js.map,*.css,*.css.map,*.html,*.po,*.pot,uv.lock,*.log,*.svg
|
||||||
ignore-words = .codespell_ignorewords
|
ignore-words = .codespell_ignorewords
|
||||||
|
|
|
||||||
24
.github/workflows/ci.yml
vendored
24
.github/workflows/ci.yml
vendored
|
|
@ -29,21 +29,15 @@ jobs:
|
||||||
- name: Checkout the repository
|
- name: Checkout the repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Poetry
|
|
||||||
run: |
|
|
||||||
pipx install "poetry==1.8.*"
|
|
||||||
poetry config virtualenvs.prefer-active-python true
|
|
||||||
|
|
||||||
- name: Setup Python ${{ matrix.python }}
|
- name: Setup Python ${{ matrix.python }}
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python }}
|
python-version: ${{ matrix.python }}
|
||||||
cache: "poetry"
|
|
||||||
|
|
||||||
- name: Setup macOS PATH
|
- name: Install uv
|
||||||
if: runner.os == 'macOS'
|
uses: astral-sh/setup-uv@v5
|
||||||
run: |
|
with:
|
||||||
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
enable-cache: true
|
||||||
|
|
||||||
- name: Setup cache variables
|
- name: Setup cache variables
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
@ -119,7 +113,6 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "/Library/TeX/texbin" >> $GITHUB_PATH
|
echo "/Library/TeX/texbin" >> $GITHUB_PATH
|
||||||
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
|
|
||||||
echo "$PWD/macos-cache/TinyTeX/bin/universal-darwin" >> $GITHUB_PATH
|
echo "$PWD/macos-cache/TinyTeX/bin/universal-darwin" >> $GITHUB_PATH
|
||||||
|
|
||||||
- name: Setup Windows cache
|
- name: Setup Windows cache
|
||||||
|
|
@ -150,21 +143,20 @@ jobs:
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
run: |
|
run: |
|
||||||
$env:Path += ";" + "$($PWD)\ManimCache\LatexWindows\TinyTeX\bin\windows"
|
$env:Path += ";" + "$($PWD)\ManimCache\LatexWindows\TinyTeX\bin\windows"
|
||||||
$env:Path = "$env:USERPROFILE\.poetry\bin;$($env:PATH)"
|
|
||||||
echo "$env:Path" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
echo "$env:Path" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||||
|
|
||||||
- name: Install dependencies and manim
|
- name: Install dependencies and manim
|
||||||
run: |
|
run: |
|
||||||
poetry install --all-extras
|
uv sync --all-extras --locked
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
poetry run python -m pytest
|
uv run python -m pytest
|
||||||
|
|
||||||
- name: Run module doctests
|
- name: Run module doctests
|
||||||
run: |
|
run: |
|
||||||
poetry run python -m pytest -v --cov-append --ignore-glob="*opengl*" --doctest-modules manim
|
uv run python -m pytest -v --cov-append --ignore-glob="*opengl*" --doctest-modules manim
|
||||||
|
|
||||||
- name: Run doctests in rst files
|
- name: Run doctests in rst files
|
||||||
run: |
|
run: |
|
||||||
cd docs && poetry run make doctest O=-tskip-manim
|
cd docs && uv run make doctest O=-tskip-manim
|
||||||
|
|
|
||||||
26
.github/workflows/python-publish.yml
vendored
26
.github/workflows/python-publish.yml
vendored
|
|
@ -6,28 +6,28 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
|
name: "Publish release"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
environment: release
|
||||||
|
permissions:
|
||||||
|
id-token: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Python 3.11
|
- name: Set up Python 3.13
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: 3.11
|
python-version: 3.13
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install uv
|
||||||
run: python -m pip install --upgrade poetry
|
uses: astral-sh/setup-uv@v5
|
||||||
|
|
||||||
# TODO: Set PYPI_API_TOKEN to api token from pip in secrets
|
- name: Build and push release to PyPI
|
||||||
- name: Configure pypi credentials
|
|
||||||
env:
|
|
||||||
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
|
|
||||||
run: poetry config http-basic.pypi __token__ "$PYPI_API_TOKEN"
|
|
||||||
|
|
||||||
- name: Publish release to pypi
|
|
||||||
run: |
|
run: |
|
||||||
poetry publish --build
|
uv sync
|
||||||
poetry build
|
uv build
|
||||||
|
uv publish
|
||||||
|
|
||||||
- name: Store artifacts
|
- name: Store artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,13 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Python 3.11
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: 3.11
|
python-version: 3.13
|
||||||
|
|
||||||
|
- name: Install uv
|
||||||
|
uses: astral-sh/setup-uv@v5
|
||||||
|
|
||||||
- name: Install system dependencies
|
- name: Install system dependencies
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -30,13 +33,12 @@ jobs:
|
||||||
babel-english ctex doublestroke dvisvgm frcursive fundus-calligra jknapltx \
|
babel-english ctex doublestroke dvisvgm frcursive fundus-calligra jknapltx \
|
||||||
mathastext microtype physics preview ragged2e relsize rsfs setspace standalone \
|
mathastext microtype physics preview ragged2e relsize rsfs setspace standalone \
|
||||||
wasy wasysym
|
wasy wasysym
|
||||||
python -m pip install --upgrade poetry
|
uv sync
|
||||||
poetry install
|
|
||||||
|
|
||||||
- name: Build and package documentation
|
- name: Build and package documentation
|
||||||
run: |
|
run: |
|
||||||
cd docs/
|
cd docs/
|
||||||
poetry run make html
|
uv run make html
|
||||||
cd build/html/
|
cd build/html/
|
||||||
tar -czvf ../html-docs.tar.gz *
|
tar -czvf ../html-docs.tar.gz *
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ repos:
|
||||||
- id: mixed-line-ending
|
- id: mixed-line-ending
|
||||||
- id: end-of-file-fixer
|
- id: end-of-file-fixer
|
||||||
- id: check-toml
|
- id: check-toml
|
||||||
name: Validate Poetry
|
name: Validate pyproject.toml
|
||||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
rev: v0.9.2
|
rev: v0.9.2
|
||||||
hooks:
|
hooks:
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,6 @@ html_theme_options = {
|
||||||
"source_repository": "https://github.com/ManimCommunity/manim/",
|
"source_repository": "https://github.com/ManimCommunity/manim/",
|
||||||
"source_branch": "main",
|
"source_branch": "main",
|
||||||
"source_directory": "docs/source/",
|
"source_directory": "docs/source/",
|
||||||
"top_of_page_button": None,
|
|
||||||
"light_logo": "manim-logo-sidebar.svg",
|
"light_logo": "manim-logo-sidebar.svg",
|
||||||
"dark_logo": "manim-logo-sidebar-dark.svg",
|
"dark_logo": "manim-logo-sidebar-dark.svg",
|
||||||
"light_css_variables": {
|
"light_css_variables": {
|
||||||
|
|
|
||||||
249
docs/source/contributing/development.md
Normal file
249
docs/source/contributing/development.md
Normal file
|
|
@ -0,0 +1,249 @@
|
||||||
|
# Manim Development Process
|
||||||
|
|
||||||
|
## For first-time contributors
|
||||||
|
|
||||||
|
1. Install git:
|
||||||
|
|
||||||
|
For instructions see <https://git-scm.com/>.
|
||||||
|
|
||||||
|
2. Fork the project:
|
||||||
|
|
||||||
|
Go to <https://github.com/ManimCommunity/manim> and click the "fork" button
|
||||||
|
to create a copy of the project for you to work on. You will need a
|
||||||
|
GitHub account. This will allow you to make a "Pull Request" (PR)
|
||||||
|
to the ManimCommunity repo later on.
|
||||||
|
|
||||||
|
3. Clone your fork to your local computer:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git clone https://github.com/<your-username>/manim.git
|
||||||
|
```
|
||||||
|
|
||||||
|
GitHub will provide both a SSH (`git@github.com:<your-username>/manim.git`) and
|
||||||
|
HTTPS (`https://github.com/<your-username>/manim.git`) URL for cloning.
|
||||||
|
You can use SSH if you have SSH keys setup.
|
||||||
|
|
||||||
|
:::{WARNING}
|
||||||
|
Do not clone the ManimCommunity repository. You must clone your own
|
||||||
|
fork.
|
||||||
|
:::
|
||||||
|
|
||||||
|
4. Change the directory to enter the project folder:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
cd manim
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Add the upstream repository, ManimCommunity:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git remote add upstream https://github.com/ManimCommunity/manim.git
|
||||||
|
```
|
||||||
|
|
||||||
|
6. Now, `git remote -v` should show two remote repositories named:
|
||||||
|
|
||||||
|
- `origin`, your forked repository
|
||||||
|
- `upstream` the ManimCommunity repository
|
||||||
|
|
||||||
|
7. Install the Python project management tool `uv`, as recommended
|
||||||
|
in our {doc}`installation guide for users </installation/uv>`.
|
||||||
|
|
||||||
|
8. Let `uv` create a virtual environment for your development
|
||||||
|
installation by running
|
||||||
|
|
||||||
|
```shell
|
||||||
|
uv sync
|
||||||
|
```
|
||||||
|
|
||||||
|
In case you need (or want) to install some of the optional dependency
|
||||||
|
groups defined in our [`pyproject.toml`](https://github.com/ManimCommunity/manim/blob/main/pyproject.toml),
|
||||||
|
run `uv sync --all-extras`, or pass the `--extra` flag with the
|
||||||
|
name of a group, for example `uv sync --extra jupyterhub`.
|
||||||
|
|
||||||
|
9. Install Pre-Commit:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
uv run pre-commit install
|
||||||
|
```
|
||||||
|
|
||||||
|
This will ensure during development that each of your commits is properly
|
||||||
|
formatted against our linter and formatters.
|
||||||
|
|
||||||
|
You are now ready to work on Manim!
|
||||||
|
|
||||||
|
## Develop your contribution
|
||||||
|
|
||||||
|
1. Checkout your local repository's main branch and pull the latest
|
||||||
|
changes from ManimCommunity, `upstream`, into your local repository:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git switch main
|
||||||
|
git pull --rebase upstream main
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Create a branch for the changes you want to work on rather than working
|
||||||
|
off of your local main branch:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git switch -c <new branch name> upstream/main
|
||||||
|
```
|
||||||
|
|
||||||
|
This ensures you can easily update your local repository's main with the
|
||||||
|
first step and switch branches to work on multiple features.
|
||||||
|
|
||||||
|
3. Write some awesome code!
|
||||||
|
|
||||||
|
You're ready to make changes in your local repository's branch.
|
||||||
|
You can add local files you've changed within the current directory with
|
||||||
|
`git add .`, or add specific files with
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git add <file/directory>
|
||||||
|
```
|
||||||
|
|
||||||
|
and commit these changes to your local history with `git commit`. If you
|
||||||
|
have installed pre-commit, your commit will succeed only if none of the
|
||||||
|
hooks fail.
|
||||||
|
|
||||||
|
:::{tip}
|
||||||
|
When crafting commit messages, it is highly recommended that
|
||||||
|
you adhere to [these guidelines](https://www.conventionalcommits.org/en/v1.0.0/).
|
||||||
|
:::
|
||||||
|
|
||||||
|
4. Add new or update existing tests.
|
||||||
|
|
||||||
|
Depending on your changes, you may need to update or add new tests. For new
|
||||||
|
features, it is required that you include tests with your PR. Details of
|
||||||
|
our testing system are explained in the {doc}`testing guide <testing>`.
|
||||||
|
|
||||||
|
5. Update docstrings and documentation:
|
||||||
|
|
||||||
|
Update the docstrings (the text in triple quotation marks) of any functions
|
||||||
|
or classes you change and include them with any new functions you add.
|
||||||
|
See the {doc}`documentation guide <docs/docstrings>` for more information about how we
|
||||||
|
prefer our code to be documented. The content of the docstrings will be
|
||||||
|
rendered in the {doc}`reference manual <../reference>`.
|
||||||
|
|
||||||
|
:::{tip}
|
||||||
|
Use the {mod}`manim directive for Sphinx <manim.utils.docbuild.manim_directive>` to add examples
|
||||||
|
to the documentation!
|
||||||
|
:::
|
||||||
|
|
||||||
|
As far as development on your local machine goes, these are the main steps you
|
||||||
|
should follow.
|
||||||
|
|
||||||
|
(polishing-changes-and-submitting-a-pull-request)=
|
||||||
|
|
||||||
|
## Polishing Changes and Submitting a Pull Request
|
||||||
|
|
||||||
|
As soon as you are ready to share your local changes with the community
|
||||||
|
so that they can be discussed, go through the following steps to open a
|
||||||
|
pull request. A pull request signifies to the ManimCommunity organization,
|
||||||
|
"Here are some changes I wrote; I think it's worthwhile for you to maintain
|
||||||
|
them."
|
||||||
|
|
||||||
|
:::{note}
|
||||||
|
You do not need to have everything (code/documentation/tests) complete
|
||||||
|
to open a pull request (PR). If the PR is still under development, please
|
||||||
|
mark it as a draft. Community developers will still be able to review the
|
||||||
|
changes, discuss yet-to-be-implemented changes, and offer advice; however,
|
||||||
|
the more complete your PR, the quicker it will be merged.
|
||||||
|
:::
|
||||||
|
|
||||||
|
1. Update your fork on GitHub to reflect your local changes:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git push -u origin <branch name>
|
||||||
|
```
|
||||||
|
|
||||||
|
Doing so creates a new branch on your remote fork, `origin`, with the
|
||||||
|
contents of your local repository on GitHub. In subsequent pushes, this
|
||||||
|
local branch will track the branch `origin` and `git push` is enough.
|
||||||
|
|
||||||
|
2. Make a pull request (PR) on GitHub.
|
||||||
|
|
||||||
|
In order to make the ManimCommunity development team aware of your changes,
|
||||||
|
you can make a PR to the ManimCommunity repository from your fork.
|
||||||
|
|
||||||
|
:::{WARNING}
|
||||||
|
Make sure to select `ManimCommunity/manim` instead of `3b1b/manim`
|
||||||
|
as the base repository!
|
||||||
|
:::
|
||||||
|
|
||||||
|
Choose the branch from your fork as the head repository - see the
|
||||||
|
screenshot below.
|
||||||
|
|
||||||
|
```{image} /_static/pull-requests.png
|
||||||
|
:align: center
|
||||||
|
```
|
||||||
|
|
||||||
|
Please make sure you follow the template (this is the default
|
||||||
|
text you are shown when first opening the 'New Pull Request' page).
|
||||||
|
|
||||||
|
Your changes are eligible to be merged if:
|
||||||
|
|
||||||
|
1. there are no merge conflicts
|
||||||
|
2. the tests in our pipeline pass
|
||||||
|
3. at least one (two for more complex changes) Community Developer approves the changes
|
||||||
|
|
||||||
|
You can check for merge conflicts between the current upstream/main and
|
||||||
|
your branch by executing `git pull upstream main` locally. If this
|
||||||
|
generates any merge conflicts, you need to resolve them and push an
|
||||||
|
updated version of the branch to your fork of the repository.
|
||||||
|
|
||||||
|
Our pipeline consists of a series of different tests that ensure
|
||||||
|
that Manim still works as intended and that the code you added
|
||||||
|
sticks to our coding conventions.
|
||||||
|
|
||||||
|
- **Code style**: We use the code style imposed
|
||||||
|
by [Black](https://black.readthedocs.io/en/stable/), [isort](https://pycqa.github.io/isort/)
|
||||||
|
and [flake8](https://flake8.pycqa.org/en/latest/). The GitHub pipeline
|
||||||
|
makes sure that the (Python) files changed in your pull request
|
||||||
|
also adhere to this code style. If this step of the pipeline fails,
|
||||||
|
fix your code formatting automatically by running `black <file or directory>` and `isort <file or directory>`.
|
||||||
|
To fix code style problems, run `flake8 <file or directory>` for a style report, and then fix the problems
|
||||||
|
manually that were detected by `flake8`.
|
||||||
|
- **Tests**: The pipeline runs Manim's test suite on different operating systems
|
||||||
|
(the latest versions of Ubuntu, macOS, and Windows) for different versions of Python.
|
||||||
|
The test suite consists of two different kinds of tests: integration tests
|
||||||
|
and doctests. You can run them locally by executing `uv run pytest`
|
||||||
|
and `uv run pytest --doctest-modules manim`, respectively, from the
|
||||||
|
root directory of your cloned fork.
|
||||||
|
- **Documentation**: We also build a version of the documentation corresponding
|
||||||
|
to your pull request. Make sure not to introduce any Sphinx errors, and have
|
||||||
|
a look at the built HTML files to see whether the formatting of the documentation
|
||||||
|
you added looks as you intended. You can build the documentation locally
|
||||||
|
by running `make html` from the `docs` directory. Make sure you have [Graphviz](https://graphviz.org/)
|
||||||
|
installed locally in order to build the inheritance diagrams. See {doc}`docs` for
|
||||||
|
more information.
|
||||||
|
|
||||||
|
Finally, if the pipeline passes and you are satisfied with your changes: wait for
|
||||||
|
feedback and iterate over any requested changes. You will likely be asked to
|
||||||
|
edit or modify your PR in one way or another during this process. This is not
|
||||||
|
an indictment of your work, but rather a strong signal that the community
|
||||||
|
wants to merge your changes! Once approved, your changes may be merged!
|
||||||
|
|
||||||
|
### Further useful guidelines
|
||||||
|
|
||||||
|
1. When submitting a PR, please mention explicitly if it includes breaking changes.
|
||||||
|
2. When submitting a PR, make sure that your proposed changes are as general as
|
||||||
|
possible, and ready to be taken advantage of by all of Manim's users. In
|
||||||
|
particular, leave out any machine-specific configurations, or any personal
|
||||||
|
information it may contain.
|
||||||
|
3. If you are a maintainer, please label issues and PRs appropriately and
|
||||||
|
frequently.
|
||||||
|
4. When opening a new issue, if there are old issues that are related, add a link
|
||||||
|
to them in your new issue (even if the old ones are closed).
|
||||||
|
5. When submitting a code review, it is highly recommended that you adhere to
|
||||||
|
[these general guidelines](https://conventionalcomments.org/).
|
||||||
|
6. If you find stale or inactive issues that seem to be irrelevant, please post
|
||||||
|
a comment saying 'This issue should be closed', and a community developer
|
||||||
|
will take a look.
|
||||||
|
7. Please do as much as possible to keep issues, PRs, and development in
|
||||||
|
general as tidy as possible.
|
||||||
|
|
||||||
|
You can find examples for the `docs` in several places:
|
||||||
|
the {doc}`Example Gallery <../examples>`, {doc}`Tutorials <../tutorials/index>`,
|
||||||
|
and {doc}`Reference Classes <../reference>`.
|
||||||
|
|
||||||
|
**Thank you for contributing!**
|
||||||
|
|
@ -1,288 +0,0 @@
|
||||||
=========================
|
|
||||||
Manim Development Process
|
|
||||||
=========================
|
|
||||||
|
|
||||||
For first-time contributors
|
|
||||||
---------------------------
|
|
||||||
#. Install git:
|
|
||||||
|
|
||||||
For instructions see https://git-scm.com/.
|
|
||||||
|
|
||||||
|
|
||||||
#. Fork the project:
|
|
||||||
|
|
||||||
Go to https://github.com/ManimCommunity/manim and click the "fork" button
|
|
||||||
to create a copy of the project for you to work on. You will need a
|
|
||||||
GitHub account. This will allow you to make a "Pull Request" (PR)
|
|
||||||
to the ManimCommunity repo later on.
|
|
||||||
|
|
||||||
#. Clone your fork to your local computer:
|
|
||||||
|
|
||||||
.. code-block:: shell
|
|
||||||
|
|
||||||
git clone https://github.com/<your-username>/manim.git
|
|
||||||
|
|
||||||
GitHub will provide both a SSH (``git@github.com:<your-username>/manim.git``) and
|
|
||||||
HTTPS (``https://github.com/<your-username>/manim.git``) URL for cloning.
|
|
||||||
You can use SSH if you have SSH keys setup.
|
|
||||||
|
|
||||||
.. WARNING::
|
|
||||||
|
|
||||||
Do not clone the ManimCommunity repository. You must clone your own
|
|
||||||
fork.
|
|
||||||
|
|
||||||
#. Change the directory to enter the project folder:
|
|
||||||
|
|
||||||
.. code-block:: shell
|
|
||||||
|
|
||||||
cd manim
|
|
||||||
|
|
||||||
#. Add the upstream repository, ManimCommunity:
|
|
||||||
|
|
||||||
.. code-block:: shell
|
|
||||||
|
|
||||||
git remote add upstream https://github.com/ManimCommunity/manim.git
|
|
||||||
|
|
||||||
#. Now, ``git remote -v`` should show two remote repositories named:
|
|
||||||
|
|
||||||
- ``origin``, your forked repository
|
|
||||||
- ``upstream`` the ManimCommunity repository
|
|
||||||
|
|
||||||
#. Install Manim:
|
|
||||||
|
|
||||||
- Follow the steps in our :doc:`installation instructions
|
|
||||||
<../installation>` to install **Manim's system dependencies**.
|
|
||||||
We also recommend installing a LaTeX distribution.
|
|
||||||
|
|
||||||
- We recommend using `Poetry <https://python-poetry.org>`__ to manage your
|
|
||||||
developer installation of Manim. Poetry is a tool for dependency
|
|
||||||
management and packaging in Python. It allows you to declare the libraries
|
|
||||||
your project depends on, and it will manage (install / update) them
|
|
||||||
for you. In addition, Poetry provides a simple interface for
|
|
||||||
managing virtual environments.
|
|
||||||
|
|
||||||
If you choose to use Poetry as well, follow `Poetry's installation
|
|
||||||
guidelines <https://python-poetry.org/docs/#installing-with-pipx>`__
|
|
||||||
to install it on your system, then run ``poetry install`` from
|
|
||||||
your cloned repository. Poetry will then install Manim, as well
|
|
||||||
as create and enter a virtual environment. You can always re-enter
|
|
||||||
that environment by running ``poetry shell``.
|
|
||||||
|
|
||||||
- In case you want to install extra dependencies that are defined in
|
|
||||||
the ``[tool.poetry.extras]`` section of ``pyproject.toml``, this can be done by passing
|
|
||||||
the ``-E`` flag, for example ``poetry install -E jupyterlab -E gui``.
|
|
||||||
|
|
||||||
- In case you decided against Poetry, you can install Manim via pip
|
|
||||||
by running ``python3 -m pip install .``. Note that due to our
|
|
||||||
development infrastructure being based on Poetry, we currently
|
|
||||||
do not support editable installs via ``pip``, so you will have
|
|
||||||
to re-run this command every time you make changes to the source
|
|
||||||
code.
|
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
The following steps assume that you chose to install and work with
|
|
||||||
Poetry.
|
|
||||||
|
|
||||||
#. Install Pre-Commit:
|
|
||||||
|
|
||||||
.. code-block:: shell
|
|
||||||
|
|
||||||
poetry run pre-commit install
|
|
||||||
|
|
||||||
This will ensure during development that each of your commits is properly
|
|
||||||
formatted against our linter and formatters, ``black``, ``flake8``,
|
|
||||||
``isort`` and ``codespell``.
|
|
||||||
|
|
||||||
You are now ready to work on Manim!
|
|
||||||
|
|
||||||
Develop your contribution
|
|
||||||
-------------------------
|
|
||||||
|
|
||||||
#. Checkout your local repository's main branch and pull the latest
|
|
||||||
changes from ManimCommunity, ``upstream``, into your local repository:
|
|
||||||
|
|
||||||
.. code-block:: shell
|
|
||||||
|
|
||||||
git checkout main
|
|
||||||
git pull --rebase upstream main
|
|
||||||
|
|
||||||
#. Create a branch for the changes you want to work on rather than working
|
|
||||||
off of your local main branch:
|
|
||||||
|
|
||||||
.. code-block:: shell
|
|
||||||
|
|
||||||
git checkout -b <new branch name> upstream/main
|
|
||||||
|
|
||||||
This ensures you can easily update your local repository's main with the
|
|
||||||
first step and switch branches to work on multiple features.
|
|
||||||
|
|
||||||
#. Write some awesome code!
|
|
||||||
|
|
||||||
You're ready to make changes in your local repository's branch.
|
|
||||||
You can add local files you've changed within the current directory with
|
|
||||||
``git add .``, or add specific files with
|
|
||||||
|
|
||||||
.. code-block:: shell
|
|
||||||
|
|
||||||
git add <file/directory>
|
|
||||||
|
|
||||||
and commit these changes to your local history with ``git commit``. If you
|
|
||||||
have installed pre-commit, your commit will succeed only if none of the
|
|
||||||
hooks fail.
|
|
||||||
|
|
||||||
.. tip::
|
|
||||||
|
|
||||||
When crafting commit messages, it is highly recommended that
|
|
||||||
you adhere to `these guidelines <https://www.conventionalcommits.org/en/v1.0.0/>`_.
|
|
||||||
|
|
||||||
#. Add new or update existing tests.
|
|
||||||
|
|
||||||
Depending on your changes, you may need to update or add new tests. For new
|
|
||||||
features, it is required that you include tests with your PR. Details of
|
|
||||||
our testing system are explained in the :doc:`testing guide <testing>`.
|
|
||||||
|
|
||||||
|
|
||||||
#. Update docstrings and documentation:
|
|
||||||
|
|
||||||
Update the docstrings (the text in triple quotation marks) of any functions
|
|
||||||
or classes you change and include them with any new functions you add.
|
|
||||||
See the :doc:`documentation guide <docs/docstrings>` for more information about how we
|
|
||||||
prefer our code to be documented. The content of the docstrings will be
|
|
||||||
rendered in the :doc:`reference manual <../reference>`.
|
|
||||||
|
|
||||||
.. tip::
|
|
||||||
|
|
||||||
Use the :mod:`manim directive for Sphinx <manim.utils.docbuild.manim_directive>` to add examples
|
|
||||||
to the documentation!
|
|
||||||
|
|
||||||
As far as development on your local machine goes, these are the main steps you
|
|
||||||
should follow.
|
|
||||||
|
|
||||||
.. _polishing-changes-and-submitting-a-pull-request:
|
|
||||||
|
|
||||||
Polishing Changes and Submitting a Pull Request
|
|
||||||
-----------------------------------------------
|
|
||||||
|
|
||||||
As soon as you are ready to share your local changes with the community
|
|
||||||
so that they can be discussed, go through the following steps to open a
|
|
||||||
pull request. A pull request signifies to the ManimCommunity organization,
|
|
||||||
"Here are some changes I wrote; I think it's worthwhile for you to maintain
|
|
||||||
them."
|
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
You do not need to have everything (code/documentation/tests) complete
|
|
||||||
to open a pull request (PR). If the PR is still under development, please
|
|
||||||
mark it as a draft. Community developers will still be able to review the
|
|
||||||
changes, discuss yet-to-be-implemented changes, and offer advice; however,
|
|
||||||
the more complete your PR, the quicker it will be merged.
|
|
||||||
|
|
||||||
#. Update your fork on GitHub to reflect your local changes:
|
|
||||||
|
|
||||||
.. code-block:: shell
|
|
||||||
|
|
||||||
git push -u origin <branch name>
|
|
||||||
|
|
||||||
Doing so creates a new branch on your remote fork, ``origin``, with the
|
|
||||||
contents of your local repository on GitHub. In subsequent pushes, this
|
|
||||||
local branch will track the branch ``origin`` and ``git push`` is enough.
|
|
||||||
|
|
||||||
|
|
||||||
#. Make a pull request (PR) on GitHub.
|
|
||||||
|
|
||||||
In order to make the ManimCommunity development team aware of your changes,
|
|
||||||
you can make a PR to the ManimCommunity repository from your fork.
|
|
||||||
|
|
||||||
.. WARNING::
|
|
||||||
|
|
||||||
Make sure to select ``ManimCommunity/manim`` instead of ``3b1b/manim``
|
|
||||||
as the base repository!
|
|
||||||
|
|
||||||
Choose the branch from your fork as the head repository - see the
|
|
||||||
screenshot below.
|
|
||||||
|
|
||||||
.. image:: /_static/pull-requests.png
|
|
||||||
:align: center
|
|
||||||
|
|
||||||
Please make sure you follow the template (this is the default
|
|
||||||
text you are shown when first opening the 'New Pull Request' page).
|
|
||||||
|
|
||||||
|
|
||||||
Your changes are eligible to be merged if:
|
|
||||||
|
|
||||||
#. there are no merge conflicts
|
|
||||||
#. the tests in our pipeline pass
|
|
||||||
#. at least one (two for more complex changes) Community Developer approves the changes
|
|
||||||
|
|
||||||
You can check for merge conflicts between the current upstream/main and
|
|
||||||
your branch by executing ``git pull upstream main`` locally. If this
|
|
||||||
generates any merge conflicts, you need to resolve them and push an
|
|
||||||
updated version of the branch to your fork of the repository.
|
|
||||||
|
|
||||||
Our pipeline consists of a series of different tests that ensure
|
|
||||||
that Manim still works as intended and that the code you added
|
|
||||||
sticks to our coding conventions.
|
|
||||||
|
|
||||||
- **Code style**: We use the code style imposed
|
|
||||||
by `Black <https://black.readthedocs.io/en/stable/>`_, `isort <https://pycqa.github.io/isort/>`_
|
|
||||||
and `flake8 <https://flake8.pycqa.org/en/latest/>`_. The GitHub pipeline
|
|
||||||
makes sure that the (Python) files changed in your pull request
|
|
||||||
also adhere to this code style. If this step of the pipeline fails,
|
|
||||||
fix your code formatting automatically by running ``black <file or directory>`` and ``isort <file or directory>``.
|
|
||||||
To fix code style problems, run ``flake8 <file or directory>`` for a style report, and then fix the problems
|
|
||||||
manually that were detected by ``flake8``.
|
|
||||||
|
|
||||||
- **Tests**: The pipeline runs Manim's test suite on different operating systems
|
|
||||||
(the latest versions of Ubuntu, macOS, and Windows) for different versions of Python.
|
|
||||||
The test suite consists of two different kinds of tests: integration tests
|
|
||||||
and doctests. You can run them locally by executing ``poetry run pytest``
|
|
||||||
and ``poetry run pytest --doctest-modules manim``, respectively, from the
|
|
||||||
root directory of your cloned fork.
|
|
||||||
|
|
||||||
- **Documentation**: We also build a version of the documentation corresponding
|
|
||||||
to your pull request. Make sure not to introduce any Sphinx errors, and have
|
|
||||||
a look at the built HTML files to see whether the formatting of the documentation
|
|
||||||
you added looks as you intended. You can build the documentation locally
|
|
||||||
by running ``make html`` from the ``docs`` directory. Make sure you have `Graphviz <https://graphviz.org/>`_
|
|
||||||
installed locally in order to build the inheritance diagrams. See :doc:`docs` for
|
|
||||||
more information.
|
|
||||||
|
|
||||||
Finally, if the pipeline passes and you are satisfied with your changes: wait for
|
|
||||||
feedback and iterate over any requested changes. You will likely be asked to
|
|
||||||
edit or modify your PR in one way or another during this process. This is not
|
|
||||||
an indictment of your work, but rather a strong signal that the community
|
|
||||||
wants to merge your changes! Once approved, your changes may be merged!
|
|
||||||
|
|
||||||
Further useful guidelines
|
|
||||||
=========================
|
|
||||||
|
|
||||||
#. When submitting a PR, please mention explicitly if it includes breaking changes.
|
|
||||||
|
|
||||||
#. When submitting a PR, make sure that your proposed changes are as general as
|
|
||||||
possible, and ready to be taken advantage of by all of Manim's users. In
|
|
||||||
particular, leave out any machine-specific configurations, or any personal
|
|
||||||
information it may contain.
|
|
||||||
|
|
||||||
#. If you are a maintainer, please label issues and PRs appropriately and
|
|
||||||
frequently.
|
|
||||||
|
|
||||||
#. When opening a new issue, if there are old issues that are related, add a link
|
|
||||||
to them in your new issue (even if the old ones are closed).
|
|
||||||
|
|
||||||
#. When submitting a code review, it is highly recommended that you adhere to
|
|
||||||
`these general guidelines <https://conventionalcomments.org/>`_.
|
|
||||||
|
|
||||||
#. If you find stale or inactive issues that seem to be irrelevant, please post
|
|
||||||
a comment saying 'This issue should be closed', and a community developer
|
|
||||||
will take a look.
|
|
||||||
|
|
||||||
#. Please do as much as possible to keep issues, PRs, and development in
|
|
||||||
general as tidy as possible.
|
|
||||||
|
|
||||||
|
|
||||||
You can find examples for the ``docs`` in several places:
|
|
||||||
the :doc:`Example Gallery <../examples>`, :doc:`Tutorials <../tutorials/index>`,
|
|
||||||
and :doc:`Reference Classes <../reference>`.
|
|
||||||
|
|
||||||
**Thank you for contributing!**
|
|
||||||
|
|
@ -96,14 +96,15 @@ The only requirement of manim plugins is that they specify an entry point
|
||||||
with the group, ``"manim.plugins"``. This allows Manim to discover plugins
|
with the group, ``"manim.plugins"``. This allows Manim to discover plugins
|
||||||
available in the user's environment. Everything regarding the plugin's
|
available in the user's environment. Everything regarding the plugin's
|
||||||
directory structure, build system, and naming are completely up to your
|
directory structure, build system, and naming are completely up to your
|
||||||
discretion as an author. The aforementioned template plugin is only a model
|
discretion as an author.
|
||||||
using Poetry since this is the build system Manim uses. The plugin's `entry
|
|
||||||
point <https://packaging.python.org/specifications/entry-points/>`_ can be
|
The standard way to specify an entry point (see
|
||||||
specified in Poetry as:
|
`the Python packaging guide <https://packaging.python.org/specifications/entry-points/>`__
|
||||||
|
for details) is to include the following in your ``pyproject.toml``:
|
||||||
|
|
||||||
.. code-block:: toml
|
.. code-block:: toml
|
||||||
|
|
||||||
[tool.poetry.plugins."manim.plugins"]
|
[project.entry-points."manim.plugins"]
|
||||||
"name" = "object_reference"
|
"name" = "object_reference"
|
||||||
|
|
||||||
.. versionremoved:: 0.18.1
|
.. versionremoved:: 0.18.1
|
||||||
|
|
|
||||||
4828
poetry.lock
generated
4828
poetry.lock
generated
File diff suppressed because it is too large
Load diff
188
pyproject.toml
188
pyproject.toml
|
|
@ -1,14 +1,14 @@
|
||||||
[tool.poetry]
|
[project]
|
||||||
name = "manim"
|
name = "manim"
|
||||||
version = "0.19.0"
|
version = "0.19.0"
|
||||||
description = "Animation engine for explanatory math videos."
|
description = "Animation engine for explanatory math videos."
|
||||||
authors = ["The Manim Community Developers <contact@manim.community>", "3b1b <grant@3blue1brown.com>"]
|
authors = [
|
||||||
license="MIT"
|
{name = "The Manim Community Developers", email = "contact@manim.community"},
|
||||||
readme="README.md"
|
{name = "Grant '3Blue1Brown' Sanderson", email = "grant@3blue1brown.com"},
|
||||||
repository="https://github.com/manimcommunity/manim"
|
]
|
||||||
documentation="https://docs.manim.community/"
|
license = "MIT"
|
||||||
homepage="https://www.manim.community/"
|
readme = "README.md"
|
||||||
classifiers= [
|
classifiers = [
|
||||||
"Development Status :: 4 - Beta",
|
"Development Status :: 4 - Beta",
|
||||||
"License :: OSI Approved :: MIT License",
|
"License :: OSI Approved :: MIT License",
|
||||||
"Topic :: Scientific/Engineering",
|
"Topic :: Scientific/Engineering",
|
||||||
|
|
@ -21,89 +21,102 @@ classifiers= [
|
||||||
"Programming Language :: Python :: 3.13",
|
"Programming Language :: Python :: 3.13",
|
||||||
"Natural Language :: English",
|
"Natural Language :: English",
|
||||||
]
|
]
|
||||||
exclude = ["scripts/","logo/","readme-assets/"]
|
requires-python = ">=3.9"
|
||||||
packages = [
|
dependencies = [
|
||||||
{ include = "manim" },
|
"audioop-lts>=0.2.1 ; python_full_version >= '3.13'",
|
||||||
|
"av>=9.0.0,<14.0.0",
|
||||||
|
"beautifulsoup4>=4.12",
|
||||||
|
"click>=8.0",
|
||||||
|
"cloup>=2.0.0",
|
||||||
|
"decorator>=4.3.2",
|
||||||
|
"importlib-metadata>=8.6.1 ; python_full_version < '3.10'",
|
||||||
|
"isosurfaces>=0.1.0",
|
||||||
|
"manimpango>=0.5.0,<1.0.0",
|
||||||
|
"mapbox-earcut>=1.0.0",
|
||||||
|
"moderngl-window>=2.0.0",
|
||||||
|
"moderngl>=5.0.0,<6.0.0",
|
||||||
|
"networkx>=2.6",
|
||||||
|
"numpy>=2.0",
|
||||||
|
"numpy>=2.1 ; python_full_version >= '3.10'",
|
||||||
|
"pillow>=9.1",
|
||||||
|
"pycairo>=1.13,<2.0.0",
|
||||||
|
"pydub>=0.20.0",
|
||||||
|
"pygments>=2.0.0",
|
||||||
|
"rich>=12.0.0",
|
||||||
|
"scipy>=1.13.0",
|
||||||
|
"scipy>=1.14.0 ; python_full_version >= '3.13'",
|
||||||
|
"screeninfo>=0.7",
|
||||||
|
"skia-pathops>=0.7.0",
|
||||||
|
"srt>=3.0.0",
|
||||||
|
"svgelements>=1.8.0",
|
||||||
|
"tqdm>=4.0.0",
|
||||||
|
"typing-extensions>=4.12.0",
|
||||||
|
"watchdog>=2.0.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
|
||||||
python = ">=3.9"
|
|
||||||
av = ">=9.0.0,<14.0.0" # v14.0.0 contains breaking changes, remove after dropping python 3.9
|
|
||||||
click = ">=8.0"
|
|
||||||
cloup = ">=2.0.0"
|
|
||||||
dearpygui = { version = ">=1.0.0", optional = true }
|
|
||||||
decorator = ">=4.3.2"
|
|
||||||
importlib-metadata = {version = ">=3.6", python = "<=3.9"} # Required to discover plugins
|
|
||||||
isosurfaces = ">=0.1.0"
|
|
||||||
jupyterlab = { version = ">=3.0.0", optional = true }
|
|
||||||
manimpango = ">=0.5.0,<1.0.0" # Complete API change in 1.0.0
|
|
||||||
mapbox-earcut = ">=1.0.0"
|
|
||||||
moderngl = ">=5.0.0,<6.0.0"
|
|
||||||
moderngl-window = ">=2.0.0"
|
|
||||||
networkx = ">=2.6"
|
|
||||||
notebook = { version = ">=6.0.0", optional = true }
|
|
||||||
numpy = [
|
|
||||||
# numpy 2.1 is the first version with prebuilt wheels for 3.13,
|
|
||||||
# while numpy 2.0 is the last version supporting 3.9
|
|
||||||
# TODO: remove when python 3.10 is the minimum supported version
|
|
||||||
{version = ">=2.1", python = ">=3.10"},
|
|
||||||
{version = ">=2.0", python = "<3.10"},
|
|
||||||
]
|
|
||||||
Pillow = ">=9.1"
|
|
||||||
pycairo = ">=1.13,<2.0.0"
|
|
||||||
pydub = ">=0.20.0"
|
|
||||||
audioop-lts = { version = ">=0.2.0", python = ">=3.13" } # for pydub
|
|
||||||
Pygments = ">=2.0.0"
|
|
||||||
rich = ">=12.0.0"
|
|
||||||
scipy = [
|
|
||||||
# scipy 1.14.0 is the first version with prebuilt wheels for 3.13
|
|
||||||
# TODO: remove when python 3.10 is the minimum supported version
|
|
||||||
{version = ">=1.13.0", python = "<3.13"},
|
|
||||||
{version = ">=1.14.0", python = ">=3.13"},
|
|
||||||
]
|
|
||||||
screeninfo = ">=0.7"
|
|
||||||
skia-pathops = ">=0.7.0"
|
|
||||||
srt = ">=3.0.0"
|
|
||||||
svgelements = ">=1.8.0"
|
|
||||||
tqdm = ">=4.0.0"
|
|
||||||
typing-extensions = ">=4.12.0"
|
|
||||||
watchdog = ">=2.0.0"
|
|
||||||
beautifulsoup4 = ">=4.12"
|
|
||||||
|
|
||||||
[tool.poetry.extras]
|
[project.scripts]
|
||||||
jupyterlab = ["jupyterlab", "notebook"]
|
"manim" = "manim.__main__:main"
|
||||||
gui = ["dearpygui"]
|
"manimce" = "manim.__main__:main"
|
||||||
|
|
||||||
[tool.poetry.group.dev.dependencies]
|
[project.urls]
|
||||||
furo = "^2023.09.10"
|
repository = "https://github.com/manimcommunity/manim"
|
||||||
gitpython = "^3"
|
documentation = "https://docs.manim.community/"
|
||||||
isort = "^5.12.0"
|
homepage = "https://www.manim.community/"
|
||||||
matplotlib = "^3.8.2"
|
|
||||||
myst-parser = "^2.0.0"
|
|
||||||
pre-commit = "^3.5.0"
|
|
||||||
psutil = {version = "^5.8.0", python = "<3.10"}
|
|
||||||
psutil-wheels = {version = "5.8.0", python = ">=3.10"}
|
|
||||||
pytest = "^8.3"
|
|
||||||
pygithub = "^2.1.1"
|
|
||||||
pytest-cov = "^4.1.0"
|
|
||||||
pytest-xdist = "^2.2" # Using latest gives flaky tests
|
|
||||||
ruff = "*"
|
|
||||||
Sphinx = "^7.2.6"
|
|
||||||
sphinx-copybutton = "^0.5.2"
|
|
||||||
sphinxcontrib-programoutput = "^0.17"
|
|
||||||
sphinxext-opengraph = "^0.9.1"
|
|
||||||
types-decorator = "^0.1.7"
|
|
||||||
types-Pillow = "^10.1.0.2"
|
|
||||||
types-Pygments = "^2.17.0.0"
|
|
||||||
sphinx-design = "^0.6.1"
|
|
||||||
sphinx-reredirects = "^0.1.5"
|
|
||||||
|
|
||||||
[tool.poetry.urls]
|
|
||||||
"Bug Tracker" = "https://github.com/ManimCommunity/manim/issues"
|
"Bug Tracker" = "https://github.com/ManimCommunity/manim/issues"
|
||||||
"Changelog" = "https://docs.manim.community/en/stable/changelog.html"
|
"Changelog" = "https://docs.manim.community/en/stable/changelog.html"
|
||||||
"Twitter" = "https://twitter.com/manim_community"
|
"X / Twitter" = "https://x.com/manim_community"
|
||||||
|
"Bluesky" = "https://bsky.app/profile/manim.community"
|
||||||
"Discord" = "https://www.manim.community/discord/"
|
"Discord" = "https://www.manim.community/discord/"
|
||||||
|
|
||||||
|
[project.optional-dependencies]
|
||||||
|
gui = [
|
||||||
|
"dearpygui>=1.0.0",
|
||||||
|
]
|
||||||
|
jupyterlab = [
|
||||||
|
"jupyterlab>=4.3.4",
|
||||||
|
"notebook>=7.3.2",
|
||||||
|
]
|
||||||
|
|
||||||
|
[dependency-groups]
|
||||||
|
dev = [
|
||||||
|
"furo>=2024.8.6",
|
||||||
|
"gitpython>=3.1.44",
|
||||||
|
"matplotlib>=3.9.4",
|
||||||
|
"myst-parser>=3.0.1",
|
||||||
|
"pre-commit>=4.1.0",
|
||||||
|
"pygithub>=2.5.0",
|
||||||
|
"pytest>=8.3.4",
|
||||||
|
"pytest-cov>=6.0.0",
|
||||||
|
"pytest-xdist>=2.2,<3.0",
|
||||||
|
"ruff>=0.9.3",
|
||||||
|
"sphinx>=7.4.7",
|
||||||
|
"sphinx-copybutton>=0.5.2",
|
||||||
|
"sphinx-design>=0.6.1",
|
||||||
|
"sphinx-reredirects>=0.1.5",
|
||||||
|
"sphinxcontrib-programoutput>=0.18",
|
||||||
|
"sphinxext-opengraph>=0.9.1",
|
||||||
|
"types-decorator>=5.1.8.20250121",
|
||||||
|
"types-pillow>=10.2.0.20240822",
|
||||||
|
"types-pygments>=2.19.0.20250107",
|
||||||
|
"psutil>=6.1.1",
|
||||||
|
"requests>=2.32.3",
|
||||||
|
]
|
||||||
|
|
||||||
|
[build-system]
|
||||||
|
requires = ["hatchling"]
|
||||||
|
build-backend = "hatchling.build"
|
||||||
|
|
||||||
|
[tool.hatch.build]
|
||||||
|
include = [
|
||||||
|
"/manim"
|
||||||
|
]
|
||||||
|
exclude = [
|
||||||
|
"/docker",
|
||||||
|
"/logo",
|
||||||
|
"/scripts",
|
||||||
|
]
|
||||||
|
|
||||||
[tool.pytest.ini_options]
|
[tool.pytest.ini_options]
|
||||||
markers = "slow: Mark the test as slow. Can be skipped with --skip_slow"
|
markers = "slow: Mark the test as slow. Can be skipped with --skip_slow"
|
||||||
addopts = "--no-cov-on-fail --cov=manim --cov-report xml --cov-report term -n auto --dist=loadfile --durations=0"
|
addopts = "--no-cov-on-fail --cov=manim --cov-report xml --cov-report term -n auto --dist=loadfile --durations=0"
|
||||||
|
|
@ -117,15 +130,6 @@ omit = ["*tests*"]
|
||||||
[tool.coverage.report]
|
[tool.coverage.report]
|
||||||
exclude_lines = ["pragma: no cover"]
|
exclude_lines = ["pragma: no cover"]
|
||||||
|
|
||||||
[tool.poetry.plugins]
|
|
||||||
[tool.poetry.plugins."console_scripts"]
|
|
||||||
"manim" = "manim.__main__:main"
|
|
||||||
"manimce" = "manim.__main__:main"
|
|
||||||
|
|
||||||
[build-system]
|
|
||||||
requires = ["setuptools", "poetry-core>=1.0.0"]
|
|
||||||
build-backend = "poetry.core.masonry.api"
|
|
||||||
|
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
line-length = 88
|
line-length = 88
|
||||||
target-version = "py39"
|
target-version = "py39"
|
||||||
|
|
|
||||||
|
|
@ -11,21 +11,19 @@ from manim import capture
|
||||||
|
|
||||||
plugin_pyproject_template = textwrap.dedent(
|
plugin_pyproject_template = textwrap.dedent(
|
||||||
"""\
|
"""\
|
||||||
[tool.poetry]
|
[project]
|
||||||
name = "{plugin_name}"
|
name = "{plugin_name}"
|
||||||
authors = ["ManimCE Test Suite"]
|
authors = [{name = "ManimCE Test Suite"},]
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = ""
|
description = "A fantastic Manim plugin"
|
||||||
|
requires-python = ">=3.9"
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[project.entry-points."manim.plugins"]
|
||||||
python = "^3.7"
|
|
||||||
|
|
||||||
[tool.poetry.plugins."manim.plugins"]
|
|
||||||
"{plugin_name}" = "{plugin_entrypoint}"
|
"{plugin_name}" = "{plugin_entrypoint}"
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["poetry-core>=1.0.0"]
|
requires = ["hatchling"]
|
||||||
build-backend = "poetry.core.masonry.api"
|
build-backend = "hatchling.build"
|
||||||
""",
|
""",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue