Commit graph

12 commits

Author SHA1 Message Date
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
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
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
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
Jérome Eertmans
018e4a3c1a
feat(cli): optionally hide version splash (#3329)
* feat(cli): optionally hide version splash

As discussed in #3326, this PR proposes a new optional flag to hide the version splash when manim command in launched. Additionally, the splash print is now inly executed when the CLI is executed, not on module import.

After looking at the current documentation, it does not seem to change anything. I only saw that you documented a version splash for when the CLI is used, but not when the module is imported. So removing it should not break the api docs.

In the future, users can still have version information with `import manim; print(manim.__version__)`.

Closes #3326

* chore(tests): make tests pass

---------

Co-authored-by: Tristan Schulz <mrdiverlp@gmail.com>
2023-12-10 22:47:11 +00:00
Francisco Manríquez Novoa
3f118e4921
Removed deprecated new command (#3512)
Co-authored-by: Naveen M K <naveen521kk@gmail.com>
2023-12-10 19:05:32 +00:00
Harald Schilly
25bb381528
bump dependencies -- see #3241 (#3433) 2023-11-03 19:39:18 +01:00
Benjamin Hackl
efd6474b76
Added new `manim checkhealth` CLI subcommand (#3299)
* added new checkhealth subcommand

* basic checkhealth tests

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

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

* check -> healthcheck

* more helpful test output on checkhealth fail

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

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

* callable -> Callable

* fix executable check for windows

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

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

* fixed type

* shutil already returns .exe in case it is there

* debug commit ...

* do proper debug commit for windows ...

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

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

* fix failing test if executable is batch file

* added more helpful (?) recommendations on failed tests

* allow rendering ManimBanner from prerendered SVG path

* improved test scene, actually test text / latex

* added debug info on python executable

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

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

* remove debug test again

* move SCALE_FACTOR_PER_FONT_POINT to constants

* access constants via module in logo.py

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

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

* replaced other occurrence of 48 / 960

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-08-05 11:03:09 +02:00
NotWearingPants
206db54af5
Migrate more os.path to pathlib in tests (#2991)
* Migrate more `os.path` to `pathlib` in tests

* Convert test fixtures to pathlib

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

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

* fix mypy errors in tests

* migrate another pathlib instance

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>
2022-10-26 19:51:38 +02:00
Joshua Mankelow
999d81ee92
Fixed issue with `manim init scene SCENE_NAME filename.py and removed necessity of main.py` to be present in working directory (#2870)
* Fixed .py issue with manim init scene SCENE_NAME filename.py and removed necessity of main.py file to be present.

* fixed a problem when passing file name

* added interface test

* [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-07-12 22:21:31 +02:00
Joshua Mankelow
9b731037d9
Moved functionality over from manim new to manim init and added deprecation warning for manim new (#2842)
* moved functionality over from manim new to manim init and deprecated manim new

* Updated tests to fit new functionality

* added a test for project creation using manim init project

* [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-07-10 09:00:07 +02:00
ad_chaos
677e88ef96
Refactor tests (#2866)
* start test reorganization

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

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

* move boolean ops

* move more tests

* Move more tests

* more reorganization

* more movements

* mostly finish up reorganization

* Finish reorganization tests in parent dir

* try moving interface tests back

* Move test_commands over

* fix relative path to templates

Co-authored-by: Darylgolden <darylgolden@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-07-09 21:10:30 +00:00