Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring in main's FileWriter into experimental #3821

Merged
merged 256 commits into from
Jul 15, 2024

Conversation

JasonGrace2282
Copy link
Member

@JasonGrace2282 JasonGrace2282 commented Jun 22, 2024

Rebased off of #3815

Part of #3817

I opted not to make file writing a subprocess, and instead use --write-to-movie. This means that we should encourage users not to use --preview and --write-to-movie at the same time, as it causes a performance penalty.

naveen521kk and others added 30 commits October 22, 2023 20:29
* Added docs for functions in mobject_update_utils

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

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

* Updated docstring of always_shift

Co-authored-by: Benjamin Hackl <[email protected]>

* Added period to sentence.

Co-authored-by: Benjamin Hackl <[email protected]>

* Updated parameter description in always_redraw

Co-authored-by: Benjamin Hackl <[email protected]>

* Update always_rotate description

Co-authored-by: Benjamin Hackl <[email protected]>

* Finished parameters in always_redraw

Co-authored-by: Benjamin Hackl <[email protected]>

* Changed comment in always_shift

Co-authored-by: Benjamin Hackl <[email protected]>

* update always_shift description

Co-authored-by: Benjamin Hackl <[email protected]>

* used normalize from manim.utils.space_ops

* fixed indentation in always_redraw

* added type-hints

* [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 <[email protected]>
* Add a script to build and install cairo

* Update gui tests for cairo 1.18.0

* update script to set env vars

* Make the script run with plain python

* Prefer the recently built one in pkg-config

* Skip the built if it's windows

* CI: build and install latest cairo

* CI: only run when cache is missed

* Disable compiling tests while building cairo

* update poetry lock file

* Display the cairo version when running pytest

* fixup

* tests: skip graphical test when cairo is old

* fix the path to find the pkgconfig files on linux

* set the LD_LIBRARY_PATH too

only then it'll work on linux

* fixup

* small fixup

* Move the script inside `.github/scripts` folder

* Make the minimum cairo version a constant

* Seperate setting env vars to a sperate step

this seem to have broken when cache is hit
…class. (ManimCommunity#3404)

* Misc: Just a class to test out some functions

* Fix: Fixed a bug in AddTextLetterByLetter class

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

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

* Fix: Adjusted changes according to Ben's comments

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

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

* Fix: Removed imports

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

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

* Feat: Adjusted changes to AddTextLetterByLetter

* Feat: Added test_creation

* [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 <[email protected]>
…tation (ManimCommunity#3417)

* Revert "rtd: enable htmlzip build (ManimCommunity#3355)"

This reverts commit 571f79b.

* use python3.11 to build docs

* upgrade python version used in release publish workflow

* new workflow for building downloadable docs

* change event trigger for testing

* sudo apt

* rename release job; build html in poetry env

* set GITHUB_PATH instead of PATH

* introduce additional step

* use correct binary path

* forgot microtype

* fonts-roboto + actually compress files correctly

* fix asset path

* Update .github/workflows/release-publish-documentation.yml

Co-authored-by: Naveen M K <[email protected]>

* pull_request -> workflow_dispatch

* Update .github/workflows/release-publish-documentation.yml

---------

Co-authored-by: Naveen M K <[email protected]>
…stopping them from adding empty submobjects (ManimCommunity#3423)

* do not add a VectorizedPoint as a submobject if SingleStringMathTex renders to empty SVG

* test new behavior

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

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

* Update tests/module/mobject/text/test_texmobject.py

* Update tests/module/mobject/text/test_texmobject.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
I forgot to change the path after moving around the file.
…y#3430)

* Fix CSV reader adding empty files

Fixes issue ManimCommunity#3311

* [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>
* Fix None check order in _tree_layout

* add tests to test_graph.py

* [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>
Bumps [teatimeguest/setup-texlive-action](https://github.com/teatimeguest/setup-texlive-action) from 2 to 3.
- [Release notes](https://github.com/teatimeguest/setup-texlive-action/releases)
- [Commits](teatimeguest/setup-texlive-action@v2...v3)

---
updated-dependencies:
- dependency-name: teatimeguest/setup-texlive-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* 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 <[email protected]>
Co-authored-by: Viicos <[email protected]>
Co-authored-by: JasonGrace2282 <[email protected]>
Co-authored-by: Benjamin Hackl <[email protected]>
* fix: fix an issue with ImageMobject bounding box

A missing point resulted in smaller bounding box causing issues it to be
smaller when the object is rotated. Added the missing fourth point to
ImageMobject points and altered call from camera. Filled in docstring
that used to propagate from superclass, saying that ImageMobject has no
points.

* add a test to check that rotating an image to and from doesn't change it

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

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

---------

Co-authored-by: Václav Blažej <[email protected]>
Co-authored-by: Naveen M K <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* 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 <[email protected]>
* Added ability to remove latex junk (default True)

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

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

* Fixed tests (hopefully), and whitelisted .tex

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

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

* reverted weird changes from merge

* See previous commit message

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

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

* Fixed logs-too-long test

* Fixed log output

* Fixed typo ;)

* deleted unused variable

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

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

* moved latex deletion to tex_file_writing.py

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

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

* removed changes in scene files

* Added caching based on LaTeX expression .svg

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

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

* Deleted unused function in delete_old_tex

* make if condition more readable

Co-authored-by: Benjamin Hackl <[email protected]>

* cleaned up svg file check

* changed blacklist -> whitelist for file endings

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

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

* Reverted docstring change

* Updated delete_non_svg files docstring

* Changed list to a set

* Update manim/_config/utils.py

* Update manim/cli/render/global_options.py

* added one test for the no_latex_cleanup config option

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <[email protected]>
Co-authored-by: Tristan Schulz <[email protected]>
…ommunity#3366)

* feat: DecimalNumber() - added spacing between values and unit

* Update manim/mobject/text/numbers.py

Co-authored-by: Benjamin Hackl <[email protected]>

* Update manim/mobject/text/numbers.py

Co-authored-by: Benjamin Hackl <[email protected]>

* Update manim/mobject/text/numbers.py

Co-authored-by: Benjamin Hackl <[email protected]>

* Update manim/mobject/text/numbers.py

Co-authored-by: Benjamin Hackl <[email protected]>

* Update manim/mobject/text/numbers.py

Co-authored-by: Benjamin Hackl <[email protected]>

* Update manim/mobject/text/numbers.py

Co-authored-by: Benjamin Hackl <[email protected]>

* Update manim/mobject/text/numbers.py

Co-authored-by: Benjamin Hackl <[email protected]>

---------

Co-authored-by: Tristan Schulz <[email protected]>
Co-authored-by: Benjamin Hackl <[email protected]>
* Add option to run examples directly with binder

The minified JS is from
https://github.com/naveen521kk/manim-binder

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

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

* slight style changes

* update the js file to fix on chrome

Signed-off-by: Naveen M K <[email protected]>

* show the run button as an cursor

* make the video to be 100% of the width

* Update manim/utils/docbuild/manim_directive.py

Co-authored-by: Benjamin Hackl <[email protected]>

* Add a "Make interactive" button instead of "Run" button

Clicking on the "Make interactive" button show the code-editor and "run" button

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

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

* update margin for run interactive button

---------

Signed-off-by: Naveen M K <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <[email protected]>
* 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>
…#3450)

* fixed wrong path in action building downloadable docs

* fix second occurrence of wrong path
…animCommunity#3435)

* Fix CSV reader adding empty files

Fixes issue ManimCommunity#3311

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

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

* Added LinearTransformationScene.ghost_vectors

* Added test and prevented empty VGroups as ghost vectors

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

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

* Fixed typo in example

* Added ability to join together multiple renders

* Revert "Added ability to join together multiple renders" (wrong branch)

This reverts commit dee29c3.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* 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>
reading docs, im sure oppising isnt a word
…cross()` in `manim.utils.space_ops` (ManimCommunity#3494)

* Added cross and optimized get_unit_normal in manim.utils.space_ops

* Added missing border case to new get_unit_normal where one vector is nonzero

* Updated test_threed.py::test_Sphere test data
…ty#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>
…nimCommunity#3459)

* Update Docker base image to python3.12-slim (ManimCommunity#3458)

* Update docker/Dockerfile

---------

Co-authored-by: Melody Griesen <[email protected]>
Co-authored-by: Benjamin Hackl <[email protected]>
…Community#3316)

* Implement caching of fonts list to improve runtime performance

* Fix small use_svg_cache kwargs error

* replaced font list with LRU cache
JasonGrace2282 and others added 28 commits July 11, 2024 22:54
…r imports, and refactor TypeVar R definition to allow defining class OpenGLMobject(Generic[R])
)

* Implement changes to fixtures

* Change tests to use the config fixture
…nimCommunity#3839)

* Fix config.format not updating config.movie_file_extension

* Add test
…o produce curves which can be animated smoothly (ManimCommunity#3829)

* Rewrite get_quadratic_approximation_of_cubic() and add test

* Move test_get... to end of file

* Complete docstring for get_quadratic...()
ManimCommunity#3855)

* Log execution time of scene rendering in the Manim Checkhealth command

* Use timeit.timeit instead of time.time for more reliable profiling
* Optimize VMobject.pointwise_become_partial()

* selftransformation -> self

* Small factorization of nppc
* Update macos.rst

As of July/2024, brew installs Manim and its dependencies.
Guideline for installing dependencies with brew, and attempt to install using pip3 will no longer work either venv or not.
Now homebrew team manages python resources as "System-wide" only with Brew installed resources. 
Hence, to give first time installer just leave a single line install command would be the simplest option we have.

* Update docs/source/installation/macos.rst

---------

Co-authored-by: Benjamin Hackl <[email protected]>
This makes it less changes for subclasses to "just work"
@JasonGrace2282 JasonGrace2282 merged commit 5dcab4c into ManimCommunity:experimental Jul 15, 2024
3 of 4 checks passed
@JasonGrace2282 JasonGrace2282 deleted the file-writer branch July 17, 2024 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.