* feat: 'seed' option for reproducible outputs
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* enh: let Scene automatically pick global random seed, use arg as override
* chore: move import slightly
* chore: add test for color generator being reproducible with global config seed
* [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>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* pre-commit change to ruff
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixes
* astral-sh ruff bump
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Migrate more `os.path` to `pathlib`
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix type errors with recent pathlib code
* pathlib fixes
* more pathlib fixes
* remove unused imports introduced by pathlib migration
* convert `open()` calls to pathlib
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Migrate tex_file_writing to pathlib
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* converted more old code to pathlib, and fixed a bug in module_ops
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix test failures
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix test failures
* Apply suggestions from code review
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>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* 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>
* Use tempconfig instead of modifying the config
* Extended the -a flag test
* Update tests
* [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>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Allow custom naming of gifs
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added tests for custom file naming for gifs and mp4s
* Had accidently deleted python versions from poetry.lock. Added them back in.
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: icedcoffeeee <83535735+icedcoffeeee@users.noreply.github.com>
* Remove unused imports
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Removed non pytest imports from tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Remove unused pytest imports
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* re-added removed pass statements
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>
* Future Annotations
* Delete template_twitter_post.py
* [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
* Apply suggestions from code review
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fixed broken RTD
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Added tests for resolution flag
Added test cases to make sure the resolution flag does what its supposed
to. It queues up a handful of common 16:9 and a couple 4:3 resolutions
and tries to render all of them with all acceptable separators. Once
they render it checks to make sure that the rendered resolution matches
the requested resolution.
* Speed up resolution tests
Simplified the scene rendered for the resolution flag tests to speed up
the tests. Switched over to `NoAnimation` scene and decreased the length
of the `NoAnimation` scene from 1 to 0.1.
* Convert paths to strings in test_resolution
For older versions of python on windows it seems having a `Path` object
in the list of command parameters causes issues. This patch explicitly
converts the path to a string for this case.
* Convert paths to string in `get_video_metadata`
For older versions of python on windows it seems having a `Path` object
in the list of command parameters causes issues. This patch explicitly
converts the path to a string inside the `get_video_metadata` method.
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* feat: added section class
* fix: fixed imports in scene.py
* feat: added section class
* fix: fixed imports in scene.py
* feat: scene file writer update; needs testing
* broken test
* fixed wrong partial movie files
* feat: added animation concatenation for sections
* fix: sections can contains None as partial movie file
* fix: correct section output file names
* fix: removed media folder
* feat: section output able to extract type
* feat: added guarantee_existence tests
* fix: touch file on windows
* fix: touch file on windows
* feat: automatically create control data with --set_test flag
* feat: added tests for sections output folder
* feat: added flag to enable sections
* feat: testing section metadata file
* feat: finished metadata tests; changed enums to be extendable
* fix: removed testing files
* fix: fixed section types
* fix: fixed outdated control data
* fix: fixed simple_scenes.py
* fix: fixed section type documentation example
* feat: added section video metadata to API
* fix: isort should stop destroying the import order for commands.py
* fix: fixed types of section metadata output
* fix: better comments
* ?
* feat: added elaborate test; switched name and type in next_section call
* feat: changed testing terminology: "config" got renamed to "movie metadata"
* fix: removed unicode lambda :<
* fix: fixed control data
* fix: removed test setter
* feat: added tutorial in the documentation
* fix: updated test control data
* fix: fixed double '.' in video tests
* fix: fixed some documentation
* fix: fixed missign JSON file in docs
* fix: implemented proposed changes
* fix: better --save_sections help
* fix: better docstrings
* fix: fixed last docstring...hopefully :>
* feat: custom section output supported
* fix: removed resolved todos
* fix: added debug for movie concatenation back
* fix: removed implemented TODO
* fix: removed doubled log
* fix: changed debug to info log
* fix: fixed log test data
* Add png output support for opengl
* Handle when interactive embed should launch
* Handle when window should be created
* Remove unused import
* Remove confusing field
* Avoid creating window when any format is set
* Revert removing manim import
* Remove second log for interactive_embed
* Add force_window flag
* temp skip tests due to opengl context issue
* Fix context issue
* Try manually closing window in opengl tests
* Test disabling parallel runs
* Test disabling parallel runs
* Try clearing frame buffer on finish
* revert clear
* Skip tests that pass locally but fail windows CI
* Reenable opengl tests
* Remove stdin closed check
* Skip flakey test
* Stop window creation when save_last_frame is set
* Update config path
Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>
* feat: add configuration option 'zero_pad' to allow zero padding of PNG file names.
also added the command line options '--zero_pad' and '-0'.
* Change default png file name formatting; pad frame number
* Update test_cli_flags.py
Make `test_images_are_created_when_png_format_set` look for the correct file.
Co-authored-by: Darylgolden <darylgolden@gmail.com>
* Add support for webm and jupyter transparency
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Allow mov format to be set with flag
* Log warning for webm format slow encoding
Co-authored-by: Jan-Hendrik Müller <44469195+kolibril13@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Added click dependency and command structure
* Refactored code for separation of concerns
* Shortened plugins command to plugin, added render options
* first draft for render -h
* First successful render using click
* Cleaned main
* Moved flush_cache to option, ran black
* Removed argparse logic, scattered print statements
* corrected tests, all passing
* merge upstream
* fixed test with click's clirunner
* Fixed doctest configuration.rst
* Temporarily add in main_utils
* Removed main_utils.parse_args, used ManimConfig.digest_args
* fixed progress bar
* Fix jupyter
* black
* Fixed incorrectly merged merge conflict
* updated README command.png image
* updated configuration.rst expected output
* Fixed test_plugins and config_file expected type
* Refixed the jupyter fix
* Apply 3/5 suggestions
Remove stray print
Improve readability of test code
Added module docs for the subcommands
* Updated `main` to `manim` for tests
* Forced `file` positional argument to be Path type
* Fixed main -> manim
* Added libpango to linux dependency
* Updated poetry.lock
* Changed configuration.rst test
* Fixed test_a_flag test
minor space issue
added media_width to configuration.rst
* Fixed fps flag in Cairo rendering
* Fixed more outdated rst in sphinx docs
Removed default for fps option, always overwrote quality
Fixed doctest control_data
* Fixed more incorrect rst orderings
* Update tests/test_commands.py
Co-authored-by: Naveen M K <naveen@syrusdark.website>
* Added suggestions
* Removed unused imports
* Reverted entry point back to main
* Update manim/_config/default.cfg
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
* Adjusted ipython_magic's call to the entry_point
* Converted frame_rate to int if integer
* run black
* Fixed doctest
* Fixed issue with command name from CliRunner
* Fixed multiple video windows opening from upstream merge
* to black or not to black
* Added deprecation warning to render subcommand
* warning instead of warn
* Applied Naveen's suggestions
* Made `manim render` show the help page
* Update manim/cli/render/commands.py
Co-authored-by: Naveen M K <naveen@syrusdark.website>
* Update manim/cli/cfg/commands.py
Co-authored-by: Naveen M K <naveen@syrusdark.website>
* Update manim/cli/cfg/commands.py
Co-authored-by: Naveen M K <naveen@syrusdark.website>
* Update manim/cli/plugins/commands.py
Co-authored-by: Naveen M K <naveen@syrusdark.website>
* Addressed some style changes
* add back in write_to_movie temporarily for OpenGL support
* Removed sound flag, deprecated use_opengl_renderer, added renderer option
* revert webgl_renderer_path removal
* Fixed cfg export
Fixed readme usage of CLI
* Flake8/black
* Fixed bug in setting renderer choice
* Removed log message due to default option
Removed default option of background color
Fixed write_to_movie flag default
* Fix log_to_file tests
* Make '-c' option for config_file, not background_color
* print colored version always
* Remove -v = --version shorthand, conflicts with verbosity
* Use subprocess.run instead of Click's CliRunner for stdout
* Refactor cli/render to use Cloup instead of click-option-group
1) There's a new file for each option group
2) render is now a cloup.Command, not a Group
Fixed issue when an animation is cached, manim can't merge the partial movie files. (#1192)
* fixed issue
* fixed tests
* Update manim/renderer/cairo_renderer.py
Co-authored-by: Darylgolden <darylgolden@gmail.com>
* added tests
* imrpoved test
* fixed logic
* added new test
* check if the file has been outputed
* added test when caching is enabled
* fixed tests on windows
* black
* Update manim/renderer/cairo_renderer.py
Co-authored-by: Naveen M K <naveen@syrusdark.website>
* Update tests/assert_utils.py
Co-authored-by: Naveen M K <naveen@syrusdark.website>
Co-authored-by: KingWampy <9156604+WampyCakes@users.noreply.github.com>
Co-authored-by: Darylgolden <darylgolden@gmail.com>
Co-authored-by: Naveen M K <naveen@syrusdark.website>
Added :ref_methods: to the manim directive (#1209)
* fix manim_directive for methods
* added ref_methods to Angle example
* black
* added new ref_methods references
* sort out ref_functions vs ref_methods in examples.rst
Co-authored-by: Jason Villanueva <a@jsonvillanueva.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Fixed issue when an animation is cached, manim can't merge the partial movie files. (#1192)
* fixed issue
* fixed tests
* Update manim/renderer/cairo_renderer.py
Co-authored-by: Darylgolden <darylgolden@gmail.com>
* added tests
* imrpoved test
* fixed logic
* added new test
* check if the file has been outputed
* added test when caching is enabled
* fixed tests on windows
* black
* Update manim/renderer/cairo_renderer.py
Co-authored-by: Naveen M K <naveen@syrusdark.website>
* Update tests/assert_utils.py
Co-authored-by: Naveen M K <naveen@syrusdark.website>
Co-authored-by: KingWampy <9156604+WampyCakes@users.noreply.github.com>
Co-authored-by: Darylgolden <darylgolden@gmail.com>
Co-authored-by: Naveen M K <naveen@syrusdark.website>
Added :ref_methods: to the manim directive (#1209)
* fix manim_directive for methods
* added ref_methods to Angle example
* black
* added new ref_methods references
* sort out ref_functions vs ref_methods in examples.rst
Co-authored-by: Jason Villanueva <a@jsonvillanueva.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Fixed unnecessary args dict
* Fixed bug that changed caching hashing result
* Revert doctest logic for fps filename output
Co-authored-by: Naveen M K <naveen@syrusdark.website>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: Gianluca Gippetto <gianluca.gippetto@gmail.com>
* Exemption from absolute filepath if filename is -
* Comment why filepath is not made absolute if - is filename.
* Add a test for `-` as filename feature.
* Fix typo
* Use subprocess instead of echo and pipe for test.
* Run black
* Removed unused shell mode argument.
* fixes n flag
* added test for n flag
* Apply suggestions from code review
Co-authored-by: Aathish Sivasubrahmanian <aathish04@gmail.com>
Co-authored-by: Hugues Devimeux <hugues.devimeux@gmail.com>
Co-authored-by: Aathish Sivasubrahmanian <aathish04@gmail.com>
* Refactored file architecture of graphical tests
* removed tests_cache now useless
* added show_diff helper flag
* updated test data for TextMobjecttest
* refactored set_test_scene
* removed useless imports
* added video comparison tools
* improved tests helpers for devs
* added small video tests (provisionnal)
* small changes and cleanup
* RUN BLACK SIR YES SIR
* removed unused imports
* improved docs
* Apply suggestions from code review
Co-authored-by: Leo Torres <dleonardotn@gmail.com>
* updated tests from master.
* RUN BLACK SIR YES SIR
* fixed logging tests
* fixed test name
* rgb(0,0,0)
* fixed tests
* changed .npy data to fix test (hopefully)
* removed bad control data.
* aaand re added control data
* Regenerate Reference data for TextMobject and Text tests.
* Turn off fast-failing to see if tests pass anywhere
* Use shell mode for logging test.
(Fixes the failing logging test)
* Merge branch 'master' into refactor-tests
* Add OS Specific control data for Tex[t] tests on MacOS, Windows
* Use old TextMobject reference data.
* Add reference data for Linux.
* Use reference data from Ubuntu for Linux tests.
* Use @CorvidCanine's Text data and @leotrs's Tex[t]Mobject data.
* removed hash comparison in video tests.
* updated control data
* updated helpers
* removed useless comment
* removed test_writing
* updated tests
* renamed tests
* fixed tests
* Re-add fail-fast
* Apply suggestions from code review
Co-authored-by: Pg Biel <9021226+PgBiel@users.noreply.github.com>
* small docs mistake
* Update tests/utils/video_tester.py
Co-authored-by: Pg Biel <9021226+PgBiel@users.noreply.github.com>
Co-authored-by: Leo Torres <dleonardotn@gmail.com>
Co-authored-by: Aathish Sivasubrahmanian <aathish04@gmail.com>
Co-authored-by: Hugues Devimeux <hugues.devimeux@gmail.com>
Co-authored-by: Pg Biel <9021226+PgBiel@users.noreply.github.com>