Commit graph

172 commits

Author SHA1 Message Date
Benjamin Hackl
d999d422c9
Introduce first-class support for rendering text and markup via Typst (optional dependency) (#4681)
* feat: add TypstMobject and TypstMathMobject for first-class Typst support

Implement the initial TypstMobject proposal (see agents/typst.md):

- TypstMobject: renders arbitrary Typst markup to SVG via the 'typst'
  Python package (self-contained Rust binary, no system install needed),
  then imports through SVGMobject.
- TypstMathMobject: convenience subclass that wraps input in Typst math
  delimiters ($ ... $).

Pipeline: user string → wrap in minimal Typst document (auto-sized page,
transparent background) → write .typ file → compile to SVG via
typst.compile() → import via SVGMobject → scale/center/recolor.

Key details:
- Compilation helper in manim/utils/typst_file_writing.py with SHA-256
  content-hash caching (same scheme as the LaTeX pipeline).
- font_size property mirrors SingleStringMathTex: compile at fixed 11pt,
  scale after import using initial_height / SCALE_FACTOR_PER_FONT_POINT.
- init_colors() recolors black submobjects to self.color (Typst default
  fill is black), preserving any explicit Typst colors.
- path_string_config enables curve subdivision for smooth animation.
- 'typst' added as optional dependency group in pyproject.toml.
- 10 tests covering creation, font_size, caching, preamble, and repr.

* feat(typst): add sub-expression selection via {{ }} groups and .select()

- Override modify_xml_tree in Typst to convert data-typst-label
  attributes to id attributes before svgelements parsing (avoids
  attribute inheritance issue with data-* attributes)
- Add Typst.select(key) method accepting str labels or int indices
  to retrieve VGroup sub-expressions from id_to_vgroup_dict
- Implement {{ }} double-brace preprocessor on TypstMath:
  - {{ content }} → manimgrp("_grp-N", content) (auto-numbered)
  - {{ content : label }} → manimgrp("label", content) (named)
  - Skips {{ }} inside string literals and [...] content blocks
  - Uses math-mode call convention (no # prefix) to keep args in
    math mode
- Auto-inject manimgrp preamble when groups are detected
- Add 12 new tests covering label mapping, nesting, select(),
  error handling, and preprocessor edge cases

* Remove unneeded assert line

* Generalize some more critical hard-coded LaTeX assumptions

* Fix syntax error

* Support Typst labels in existing APIs

* Add ManimTextLabel typing alias

* Preserve Typst SVG stroke widths by default

* Calibrate Typst font sizing against TeX

* Add Typst mobject documentation

* Track Typst baseline frames

* Document Typst baseline frame tracking

* Add Typst section to text guide

* Polish Typst docs and label handling

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Improve Typst stroke scaling and docs examples

* Tune Typst SVG stroke scaling

* Restore Typst math example wording

* Fix pre-commit issues for Typst branch

* Fix number line runtime typing import

* Exclude Typst autogenerated .rst files

* Use Manim directive in docstrings and fix wrong key in Typst.select() docstring

* Fix GroupedMath comments

---------

Co-authored-by: Toon Verstraelen <Toon.Verstraelen@UGent.be>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
Co-authored-by: Francisco Manríquez Novoa <francisco.manriquezn@usm.cl>
2026-06-11 03:54:21 +00:00
Henrik Skov Midtiby
ebb230f6f1
Update link in pyproject.toml to X / Twitter (#4642) 2026-03-18 13:40:16 +00:00
Benjamin Hackl
1157b746c3
Prepare new release: v0.20.1 (#4615)
* bump version, regenerate lockfile, changelog 1st pass

* fix two docbuild warnings

* update changelog, include newly merged PR + review suggestion
2026-02-27 08:09:59 +01:00
Benjamin Hackl
d1eea48aa6
Prepare new release, v0.20.0 (#4599)
* fix: resolve parameter shadowing bug in release script changelog command

* chore: bump version to v0.20.0, regenerate lockfile, update citation

* generate v0.20.0 changelog, first round

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* a bit of copyediting, second pass

* include newly merged PR, apply suggestions from review

* Update docs/source/changelog/0.20.0-changelog.md

Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
2026-02-20 23:50:31 +01:00
Aarush Deshpande
9d98f00ee9
Remove __future__.annotations from required imports (#4571)
* Remove __future__.annotations from required imports
2026-02-05 21:57:20 -03:00
Benjamin Hackl
587e8d6546
Rework and consolidate release changelog script, add previously skipped changelog entries (#4568)
* rewrite dev_changelog script from scratch, turn into release util cli

* cleanup dependencies

* regenerate skipped changelog entries

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove changelog section from PR template

* fix pre-commit checks

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
2026-02-04 10:10:39 +01:00
Benjamin Hackl
9a6550d356
Prepare new release v0.19.2 (#4528)
* chore: bump version numbers etc

* chore: update lockfile

* chore: update date before release
2026-01-17 09:26:40 +01:00
Henrik Skov Midtiby
06f2fe231a
Checking version requirements for dependencies (#4529)
* Update pydub minimum version to 0.22

* numpy>=2.1

* av>=15.0

* isosurfaces>=0.1.1

* Updated lower bounds on dependencies.
2026-01-16 01:31:56 +01:00
Christian Clauss
dc4a8bb741
Replace legacy numpy usage ruff rule NPY002 (#4516) 2026-01-13 17:23:34 +01:00
Benjamin Hackl
4bc77b3a00
Bump Python target versions of both mypy and ruff
Merging #4520 - all CI checks passing and approved by JasonGrace2282
2026-01-13 01:13:21 +01:00
Benjamin Hackl
c424f83cb4
Bump minimum Python to 3.11 and av to 14.0.1 (#4385)
* chore: bump minimum supported python to 3.11

* fix: breaking changes from av upgrade

* chore: slightly bump minimum required version of av to 14.0.1

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* chore: update lockfile

* chore: update lockfile again with --upgrade

* Update pyproject.toml

* chore: CI pipeline os/version changes

* fix: indentation in ci.yml

* fix: use result.output instead of result.stdout for test_manim_cfg_subcommand

In Click 8.3.1 (pulled in by av>=14.0.1), help text output
behavior changed for no_args_is_help=True. Using result.output
instead of result.stdout makes the test robust across Click versions,
matching the pattern used in other tests like
test_manim_plugins_subcommand.

* fix: add UP to imports in get_winding_number doctest

* fix: add match_interpolate to imports in doctest

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-01-12 14:27:48 +01:00
Christian Clauss
de090c1bd0
Add ruff rules PERF for performance (#4492)
* Add ruff rules PERF for performance

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-12-01 10:42:46 +00:00
Benjamin Hackl
e85bfca015
Prepare new release v0.19.1 and remove support for Python 3.9 (#4490)
Co-authored-by: Francisco Manríquez <francisco.manriquezn@usm.cl>
2025-11-30 23:20:20 -03:00
Kaique Barbosa Dultra
d517b50567
Add support for pycodestyle W rule in Ruff (#4276)
* Add suport for `pycodestyle W` rule in Ruff and remove invalid noqa comments for deprecated rules

* Exclude `py/method-first-arg-is-not-self` false positive for metaclass `__init__`

---------

Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com>
2025-06-11 14:35:39 +00:00
Giovanne
5301ab874f
Add tests for polylabel utility (#4269)
* Fix polygon inside/outside logic for edge cases

* Stop using hardcoded values and improve variable naming

* Decompose inside/outside logic into smaller functions

Improves readability and maintanance.

* Improve test readability

* Fix polylabel test logic

* Fix polylabel test by adding multiple options of pole

* Improve docstring description of argument

* Stop checking type checking blocks on coverage

* Fix OpenGLMobject methods doctests
2025-06-11 09:54:51 +02:00
Benjamin Hackl
95fba7da10
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>
2025-02-02 17:16:46 +01:00
Aarush Deshpande
106b849a6d
Bump typing extensions minimum version (#4121) 2025-01-20 16:37:26 +00:00
Aarush Deshpande
c2dfb597ff
Create changelog for 0.19.0 (#4032)
* First draft of Changelog for 0.19.0

* fix typos

* added 3967

* Add #4037

* Update count 97 -> 98

* Add #4039

* Add #3930 and #4044

* Add this PR to changelog

* Add small description to changelog

* Add #3924, #3951, and #4038

* Bump Manim version to 0.19.0

* Update CITATION.cff to be more consistent

* remove github-security[bot]

* Feedback + missing PRs

* add newly merged PRs

* added more details to highlights + breaking changes

* bump date

* sort PRs in breaking changes section and include 3964

* sort highlights section

* fix: add required configuration key in .readthedocs.yml

* Update docs/source/changelog/0.19.0-changelog.rst

---------

Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
2025-01-20 14:36:53 +01:00
Benjamin Hackl
1efe869293
Completely rewrite Code mobject + add support for short notation RGB(A) hex code specifications to ManimColor (#4115)
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-01-19 14:39:13 -03:00
pre-commit-ci[bot]
97f818eb7f
[pre-commit.ci] pre-commit autoupdate (#4035)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.8.0 → v0.9.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.8.0...v0.9.1)
- [github.com/pre-commit/mirrors-mypy: v1.13.0 → v1.14.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.13.0...v1.14.1)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* enh: ignore ruff lint rule A005 (module shadowing standard library module)

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
2025-01-19 18:08:36 +01:00
Aarush Deshpande
f18a2b46e5
Remove PT004 from Ruff (#4102) 2025-01-19 16:34:16 +01:00
Aarush Deshpande
953888e68e
Rewrite installation instructions (#3930)
Follow-up to #3501

This commit combines all the installation documentation onto one page, and switches to recommending the usage
of `uv` for installing Manim.
2024-12-06 18:50:18 -05:00
Benjamin Hackl
73d22454f1
pin av to <14 (#4037) 2024-12-02 16:06:53 -05:00
Aarush Deshpande
e74933049e
Add support for Python 3.13 (#3967)
* Allow python 3.13

* Specify scipy more strictly

* try using 3rd-party audioop package

* debug: wrap context generation in try-block

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove audioop-lts, update dependencies

* add wrapt pre-release (wheels!)

* update lockfile

* CI, windows: try installing all tinytex packages at once

* tmp: verbosity of pytest

* tmp: pass -n 0 for testing

* tmp: disable pytest-xdist

* remove deprecated poetry installer option

* try running tests via uv-provided env

* tmp: run -> run --no-project

* try --full-trace

* try running tests via python -v ...

* tmp: test import of suspicious modules

* test click/cloup

* ci: back to poetry

* ci: disable pytest plugins altogether

* update lockfile

* ci: upgrade pytest

* remove all flags from pytest call

* ci: move conftest, temporarily disable test header

* fix test fixture

* try with more recent version of pytest-xdist

* loadfile -> loadscope

* explicitly test pytest for non-manim module

* some proper tests

* only keep fixtures in new conftest.py

* remove all non-necessary fixtures

* try a literal try/except in fixture file

* simplify tests further

* try and explicitly trigger non-silent errors

* Revert "try and explicitly trigger non-silent errors"

This reverts commit 35b862d483.

* more pytest debug output

* test whether manim can be imported correctly

* test with upgraded numpy

* revert all sorts of debug changes, attempt clean pytest run

* fix whitespace

* pre-commit hooks

* apply config fixture to render tests

* let config fixture ensure renderer is set to cairo

* update doctests for numpy>=2.0

* missed some

* upgrade required numpy version, revert separate treatment of numpy in ci

* upgraded moderngl-window to latest

* more delicate versioning of numpy dependency

---------

Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-12-02 08:50:14 +01:00
Aarush Deshpande
74f79a42b6
Use Ruff pygrep rules (#3923)
* Add config for ruff pygrep

* Fix pygrep linting errors
2024-09-01 17:55:22 +02:00
Aarush Deshpande
1097ed9692
Standardize docstrings with ruff pydocstyle rules (#3881)
Used Ruff rules for `pydocstyle` to standardize docstring formatting.

* Add config for ruff pydocstyle

* Safe fixes from ruff

* Unsafe fixes from ruff
2024-09-01 08:03:38 -04:00
Aarush Deshpande
3a4ab4cd25
Rename parameters and variables conflicting with builtin functions (#3884)
* Config for flake8-builtins

* Manual changes for flake8-builtins
2024-07-25 20:06:18 +02:00
Aarush Deshpande
d6dac76fa3
Change flake8-comprehensions and flake8-bugbear to ruff (#3882)
* Add config for bugbear/comprehensions

note: flake8-comprehensions has 0 changes to the files

* Safe fixes from pre-commit

* Manual changes to make pre-commit pass

* Remove deps from pyproject
2024-07-25 10:40:13 -04:00
adeshpande
f463423abe
Use ruff instead of flake8-simplify (#3873)
* pyproject

* Autofixes from pre-commit

* use get over get(x, None)

Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>

---------

Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
2024-07-22 16:22:11 +00:00
adeshpande
c8fe4d9e4f
Use ruff for pytest style (#3872)
* Add ruff config for pytest

* Fixes for pre-commit

* Changes to make pre-commit happy (Unrelated to PR)

---------

Co-authored-by: Tristan Schulz <tristanschulz1200@gmail.com>
2024-07-21 14:37:57 +00:00
adeshpande
e74f37ed68
Replace Pyupgrade with Ruff rule (#3795)
* Add config for pyupgrade

* Fix pyupgrade errors

* Unsafe-fixes

* Nicer way of formatting

Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Revert "Nicer way of formatting"

This reverts commit 48013f4a30.

---------

Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-06-05 08:08:21 -04:00
adeshpande
252aac30da
Add Ruff Lint (#3780)
Adds Ruff Linting to CI, and replaces isort in the pre-commit config with Ruff's isort rules.

Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
2024-06-03 23:39:08 -04:00
adeshpande
21eb0b7769
Add pyproject for ruff formatting (#3777)
* Add pyproject for ruff

* add black config back

* Make only formatting

* rearrange isort to undo diff

* poetry lock

* Feedback

* style

Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>

---------

Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
2024-05-22 10:56:40 +00:00
Benjamin Hackl
1f249e45b9
Let SceneFileWriter access ffmpeg via av instead of via external process (#3501)
* added av as a dependency

* make partial movie files use av instead of piping to external ffmpeg

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* opengl rendering: use av for movie files

* no need to check for ffmpeg executable

* refactor: *_movie_pipe -> *_partial_movie_stream

* improve (oneline) documentation

* pass more options to partial movie file rendering

* move ffmpeg verbosity settings to config; renamed option dict

* replaced call to ffmpeg in combine_files by using av

Co-authored-by: Jérome Eertmans <jeertmans@icloud.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* there was one examples saved as a gif?

* chore(deps): re-order av

* chore(lib): simplify `write_frame` method

Reduces the overall code complexity

* chore(lib): add audio

* fix(lib): same issue for conversion

* fix(lib): webm export

* fix(lib): transparent export

Though the output video is weird

* try(lib): fix gif + TODOs

* chore(deps): lower dep crit

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* feat(lib): add support for GIF

* fix(ci): rewrite tests

* fix

* chore(ci): prevent calling concat on empty list

* add missing dot

* fix(ci): update frame comparison ?

* fix(log): add handler to libav logger

* chore: add TODO

* fix(lib): concat issue

* Revert "fix(ci): update frame comparison ?"

This reverts commit 904cfb46ae.

* fix(ci): make it pass tests

* chore(lib/docs/ci): remove FFMPEG entirely

This removes any reference to FFMPEG, except in translation files

* added av as a dependency

* make partial movie files use av instead of piping to external ffmpeg

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* opengl rendering: use av for movie files

* no need to check for ffmpeg executable

* refactor: *_movie_pipe -> *_partial_movie_stream

* improve (oneline) documentation

* pass more options to partial movie file rendering

* move ffmpeg verbosity settings to config; renamed option dict

* replaced call to ffmpeg in combine_files by using av

Co-authored-by: Jérome Eertmans <jeertmans@icloud.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* there was one examples saved as a gif?

* chore(deps): re-order av

* chore(lib): simplify `write_frame` method

Reduces the overall code complexity

* chore(lib): add audio

* fix(lib): same issue for conversion

* fix(lib): webm export

* fix(lib): transparent export

Though the output video is weird

* try(lib): fix gif + TODOs

* chore(deps): lower dep crit

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* feat(lib): add support for GIF

* fix(ci): rewrite tests

* fix

* chore(ci): prevent calling concat on empty list

* add missing dot

* fix(ci): update frame comparison ?

* fix(log): add handler to libav logger

* chore: add TODO

* fix(lib): concat issue

* Revert "fix(ci): update frame comparison ?"

This reverts commit 904cfb46ae.

* fix(ci): make it pass tests

* chore(lib/docs/ci): remove FFMPEG entirely

This removes any reference to FFMPEG, except in translation files

* chore(deps): update lockfile

* chore(lib): rewrite ffprobe

* fix typo

* slightly more aggressive removal of ffmpeg in docs; minor language changes

* fix gif output stream dimensions

* minor style change

* fix encoding of (transparent) mov files

* fixed metadata / comment

* set frame rate for --format=gif in output_stream

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* more video tests for different render settings, also test pix_fmt

* improve default bitrate setting via crf

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* parametrized format/transparency rendering test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* context managers for (some) av.open

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update manim/utils/commands.py

Co-authored-by: Jérome Eertmans <jeertmans@icloud.com>

* fixed segfault

* update test data involving implicit functions (output improved!)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* explicity set pix_fmt for transparent webms

* special-special case extracting frame from vp9-encoded file with transparency

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix transparent gifs, more special casing in parametrized video format test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* run tests on macos-latest again

* removed old control data

* Revert "run tests on macos-latest again"

This reverts commit f50efa4b88.

* added sound to codec test; fixed issue with sound track in gif (disabled) and webm (now via opus)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* manual wav -> ogg transcoding

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fixed f-string

* refactored codec test, split out gif

* check for non-zero audio samples

* more cleanup

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove ffmpeg from readthedocs apt_packages

* round up run_time if positive and shorter than current frame rate

* added more run_time tests

* black

* improve implementation of test

* removed some unused imports

* improve wording of logged warning

Co-authored-by: Jérome Eertmans <jeertmans@icloud.com>

* move run_time checks from Animation.begin to Scene.get_run_time

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove unused import

* flake: PT012

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jérome Eertmans <jeertmans@icloud.com>
2024-05-15 13:23:09 +00:00
Benjamin Hackl
33e560473d
Prepare new release: v0.18.1 (#3719)
* add note about changelog in changelog.rst

* bump version

* Update CITATION.cff
2024-04-28 09:02:22 +00:00
dependabot[bot]
f65ebf2194
Bump black from 23.12.1 to 24.3.0 (#3649)
Bumps [black](https://github.com/psf/black) from 23.12.1 to 24.3.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/23.12.1...24.3.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-01 04:26:37 +02:00
Victorien
206f8740b9
Remove support for dynamic plugin imports (#3524)
* Remove call to deprecated `pkg_resources`

* Remove support for dynamic plugin imports, update plugin utilities

* fix affected tests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* more fixes

* Last fix

* Fix import

* Update docs

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jason Villanueva <a@jsonvillanueva.com>
2024-02-15 08:17:13 -08:00
Francisco Manríquez Novoa
02391d71ac
Added support for Manim type aliases in Sphinx docs + Added new TypeAliases (#3484)
* Updated manim.typing and included TypeAliases in docs.source.conf

* Added Vector2 and reorganized manim_type_aliases

* Fixed __all__ exports for __all__ of manim

* Update manim/cli/render/global_options.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Draft of new typing docs and new autotyping directive

* Changed vertical bars to Unions

* Updated poetry.lock

* Created custom file parser for manim.typing

* Got reST parser going

* Updated autotyping and parsing

* Update parsing

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Added code_block toggle

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Added typings to directives

* Renamed Tuple to tuple in manim.typings

* Added missing docs for type aliases

* Fixed exponent typo in ManimInt

* Hyperlinks to types work - removed Module Attributes section

* Removed Unused Import

Remove ``import re``

* Added freeglut-devel to workflows for Linux

Hopefully (?) fix the GLU import error

* Fix package name

* Add support for Type Aliases section in every module - Renaming of Vector types

* Add/fix docs for directive, parser and others

* Fixed alias typo in module_parsing

* Fix decode/import bugs, fix minor details in docs

* Added missing docs for utils.docbuild and utils.testing

* Sort alphabetically entries in utilities_misc.rst

* Address review comments, add notes about Vector and hyperlinks inside definition blocks

---------

Co-authored-by: MrDiver <mrdiverlp@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: JasonGrace2282 <aarush.deshpande@gmail.com>
2023-12-29 19:04:31 +01:00
Viicos
61a2d05b69
Update dependency constraints, fix deprecation warnings (#3376)
* WIP: Update metadata

* Finish removing upper bounds

Drop requests dependency, use urllib instead
order depencencies

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix issues on 3.12

* Order dev dependencies

* Update most dev deps, update lint config

* Add missing import

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* trigger CI

* More deprecation fixes

* Missing argument

* Deprecation fixes, again

* Use older xdist to fix test flakyness

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-12-06 14:44:13 +01:00
Viicos
212bca09ca
Add type hints to _config (#3440)
* Add type hints to `_config`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix call issues

* Fix wrong value being used

* Fix test

* Fix wrong value being set

* lint

* Few type fixes

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-11-20 19:31:18 +01:00
Benjamin Hackl
e66c5807fb
Prepare v0.18.0 (#3439)
* generated changelog and bumped version

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* changed some PR descriptions in the changelog

* fix some docbuild warnings

* fixed a reference that became ambiguous

* copyedit pass of changelog

* some more changelog polishing

* bump release date

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* updated release date

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-11-11 18:21:45 +01:00
Jérome Eertmans
8fe1665915
chore(deps): add Python 3.12 support (#3395)
* chore(deps): add Python 3.11 and 3.12 support


chore(deps): update lock file


chore(deps): remove colour


fix(deps): force NumPy version


fix(deps): relax constraints


chore(deps): update lock file

* fix(deps): make poetry happy

* fix(ci): skia pathops on 3.12

* fix(test): doctest skip

* disable python 3.8 pipeline

* removed get_parameters, replaced by direct call to inspect

* black

---------

Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
2023-11-04 14:36:51 +01:00
Tristan Schulz
d77a47a233
Fix Typing (#3086)
* first draft of color class + starting library conversion

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* changed everything to Manim color todo: figure out circular dependency in utils

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* first working draft of new color version

* resolving conflicts

* resolving conflicts

* resolving conflicts

* resolving conflicts

* resolving conflicts

* changed default internal value of ManimColor to np.ndarray[float]

* starting to fix tests

* fixed more tests and changed precision of manim color

* removed premature color conversion

* fixed some more tests

* final test changes

* fix doctests

* fix for 3.8

* fixing ManimColor string representation

* removing some unneccesary conversions

* moved community constants to manim_colors.py and added more color standards

* Added typing.py and typed bezier.py, core.py, constants.py  fully

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fixed codeql complaints

* add type ignore for np.allclose

* fixed import in three_dimensions

* added ignore for F401 back again in flake

* added typings to coordinate_systems.py

* Few improvements to `graphing/coordinate_systems.py`

* added some typings to mobject/geometry/line.py

* updated typings for mobject/geometry/line.py

* Add missing imports to `line.py`

* added typings to three_dimensions.py

* Use `FunctionOverride` for animation overrides

Fix type signature of `set_color_by_gradient`

* Remove `TYPE_CHECKING` check

Doc is failing

* Revert "Remove `TYPE_CHECKING` check"

Fails due to circular import

* Use `Self` in `coordinate_systems.py`

* Typehinted mobject.py and updated manim.typing.py

* Typed VMobject

* Type-hinted manim.mobject.geometry

* math.cos->np.cos, etc & fixed incorrect typehints

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix missing annotations import

* TypeAlias fix in typing.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add ignore errors again to mypy because commits are not possible like this

* Fix last typing issues

* Update docs

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Only type check manim

* Try fixing pre-commit

* fix merge

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix compat

* Fix compat again

* Fix imports compat

* Use union syntax

* Use union syntax

* Fix reduce_across_dimension

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Various test and merge fixes

* Doc fixes

* Last doc fix

* Revert usage of np over math

* Bump numpy version

* Remove obsolete duplicate example

* Fixed Incorrect Typehint in manim.constants

* Fix docstring typo

* More fixes

Use mypy.ini instead of .mypy.ini
Fix more docstrings
Improve types in utils and constants

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* docs fixes

* Add internal aliases

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix compat

* line lengths in .rst file, formatting, typos

* add docstring for space_ops:cross2d

* add some more arrow tip typings (in a non-circular import causing way)

* yes, this can be deleted

* fix formatting of example

* added docstring to bezier::inverse_interpolation

* added docstring + test for bezier::match_interpolate

* some improvements in coordinate_systems

* Vector -> Vector3

* replaced np.ndarray with more appropriate type hints

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Apply feedback

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* revert to previous (new) version

* fix doctest

* fix ReST errors

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Alex Lembcke <alex.lembcke@gmail.com>
Co-authored-by: Viicos <65306057+Viicos@users.noreply.github.com>
Co-authored-by: JasonGrace2282 <aarush.deshpande@gmail.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
2023-11-04 00:49:11 +01:00
Harald Schilly
25bb381528
bump dependencies -- see #3241 (#3433) 2023-11-03 19:39:18 +01:00
Naveen M K
7ad7e99c96
pyproject.toml: update manimpango version (#3405)
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
2023-10-22 20:29:20 +02:00
Benjamin Hackl
eac99e89a8
added missing dependency typing-extensions (#3350) 2023-09-01 15:06:16 +02:00
Tristan Schulz
82e55b5da2
Adding :class: ManimColor to manim and converting all types (#3020)
* first draft of color class + starting library conversion

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* changed everything to Manim color todo: figure out circular dependency in utils

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* first working draft of new color version

* resolving conflicts

* resolving conflicts

* resolving conflicts

* resolving conflicts

* resolving conflicts

* changed default internal value of ManimColor to np.ndarray[float]

* starting to fix tests

* fixed more tests and changed precision of manim color

* removed premature color conversion

* fixed some more tests

* final test changes

* fix doctests

* fix for 3.8

* fixing ManimColor string representation

* removing some unneccesary conversions

* moved community constants to manim_colors.py and added more color standards

* broke some too long lines

* added fallback: check whether passed object has get_hex method

* actually fix _internal_from_string

* added hsv support

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove dependency on colour

* fixed DARK_EARTH being assigned twice

* fixed double assignment

* remove more duplicated colour names

* raise NotImplementedError for ManimColor.gradient

* removed unused import

* remove superfluous ManimColor import

* fix circular import, remove dependency of space_ops on config

* one more Color -> ParseableManimColor

* removed one *-import

* somewhat unrelated fixed type hint

* -1 *-import

* fixed change of logic in CoordinateSystem.get_graph_label

* removed debug print; fixed type hint in mobject.py

* some fixes and improvements to text_mobject.py

* update three_dimensions

* fixes for rendered documentation of utils.color.*

* substantial improvements to documentation, including new Sphinx directive

Co-authored-by: MrDiver <mrdiverlp@gmail.com>

* Rewrite of the sphinx directive to use docutils nodes and 2 column design

* I just had to do it

* Improve the color table

* minor cleanup

* fixed ColorOverview example

* documentation improvements

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update manim/mobject/mobject.py

Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix flake8 errors

* Removed test in test_text_mobject

* Improved Documentation of core.py and added private members in sphinx so that internal methods can be documented

* Change color types of labeled.py

* removed some unused imports

* turned docstring into comment

* _colors  -> _all_manim_colors; move to manim_color module

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fixed typing

* rewrite import

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: Naveen M K <naveen521kk@gmail.com>
2023-08-08 14:47:00 +02:00
Naveen M K
a7a972bf66
docs: enable social cards (#3219)
This is new feature of `sphinxext-opengraph` which will automatically
generate social cards for the documentation. This is a new feature and
it is not enabled is there is a custom `ogp_image` defined, which we
do. Remove it and also make sure it adds our logo to the social cards.
2023-04-25 13:26:35 +02:00
Benjamin Hackl
b4bab0e336
Prepare new release: v0.17.3 (#3198)
* generated changelog for v0.17.3, first pass

* bump version number

* fixed python version in classifier list

* regenerated changelog, second pass

* changelog generation, final pass

* fixed docbuild warning

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-04-06 18:59:43 +02:00
Tristan Schulz
c4b40ed138
Prepared new Hotfix Release: v0.17.2 (#3090)
* bump version number

* generated changelog for v0.17.2

* either "a NumPy array" or "an np array", based on how "n" is pronounced

* minor language improvements

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-12-26 10:07:58 +01:00