-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Use file_writer_config instead of config to get text_dir for Text() #220
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixes a bug where a keyerror would be thrown when rendering a Text() mobject.
It looks like this was missed because we can't test |
eulertour
approved these changes
Jul 26, 2020
huguesdevimeux
approved these changes
Jul 26, 2020
Aathish04
added a commit
to huguesdevimeux/manim
that referenced
this pull request
Jul 28, 2020
…Text() (ManimCommunity#220)" This reverts commit 7f28769.
Aathish04
added a commit
to huguesdevimeux/manim
that referenced
this pull request
Jul 28, 2020
…animCommunity#220) * Use file_writer_config instead if config for Text() Fixes a bug where a keyerror would be thrown when rendering a Text() mobject. * Make testing_utils.py use file_writer_config. Thank you @huguesdevimeux ! Co-authored-by: Aathish Sivasubrahmanian <aathishs@Aathishs-MacBook-Air.local>
huguesdevimeux
added a commit
that referenced
this pull request
Aug 12, 2020
* added caching functionnality * deleted comments * fixed wait bug * added docstrings * fixed minor typo in doc * added cache cleaner * added disable_caching option * supported camera_config, and hashing functions * use now digital naming when disable_caching * added an option to flush the cache. * fixed shameful typo * added max_cached_files * fixed merge issues * added digital naming when disable_caching * foxed skip_animations dlag that #98 broke * removed cairo context from hash * removed deprecated code * fixed tests by setting write_to_movie to False * removed useless code * Revert "Use file_writer_config instead of config to get text_dir for Text() (#220)" This reverts commit 7f28769. * Apply suggestions from code review Thanks @pgsuper ! Co-authored-by: Pg Biel <9021226+PgBiel@users.noreply.github.com> * fixed max_files_cached typo * Use file_writer_config instead of config to get text_dir for Text() (#220) * Use file_writer_config instead if config for Text() Fixes a bug where a keyerror would be thrown when rendering a Text() mobject. * Make testing_utils.py use file_writer_config. Thank you @huguesdevimeux ! Co-authored-by: Aathish Sivasubrahmanian <aathishs@Aathishs-MacBook-Air.local> * removed useless code * used self.camera instead of __dict__ * Apply suggestions from code review Thanks @pgsuper ! Co-authored-by: Pg Biel <9021226+PgBiel@users.noreply.github.com> * more pythonic * fixed bug related to dict keys When a dict containing keys not of the right type it caused an error. thanks to @Aatish04. * fixed minor bufg of the last commit * Now clean_cache can remove multiple files. * fixed bug when rendering multiple scenes. skp_animations was not reset to a default value. Appeared in #98 * fixed bug related to nested dict with wrong keys See previous commit. * added infinity support for max_file_cached and changed default * changed default value of max_files_cached to 100 * deleted comments * fixed docstrings * fixed format (maybe) * fixed format * fixed tests * Update expected.txt Fixes logging tests. * fixed merge conflict * fixed logging test * fixed docstrings * minor doc improvement * Apply suggestions from code review Thank you Captain Docs ! Co-authored-by: Pg Biel <9021226+PgBiel@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Pg Biel <9021226+PgBiel@users.noreply.github.com> * fixed typo of the last commit -_- Co-authored-by: Aathish <aathish04@gmail.com> Co-authored-by: Aathish Sivasubrahmanian <aathishs@Aathishs-MacBook-Air.local> Co-authored-by: Pg Biel <9021226+PgBiel@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes a bug where a KeyError would be thrown when rendering a
Text()
mobject.List of Changes
file_writer_config['text_dir']
to obtaintext_dir
instead ofconfig['text_dir']
Motivation
Without this fix, you will be unable to render
Text()
objects, like, at all.Explanation for Changes
config
does not containtext_dir
, butfile_writer_config
does. Hence, replacingconfig
withfile_writer_config
will ensure that thetext_dir
is obtained when required.Testing Status
We should probably edit the test
test_writing
to ensure that it picks up on stuff like this.Mentioning @huguesdevimeux for his thoughts.
EDIT: huguesdevimeux has provided the necessary solution and it has been committed in this PR.
Acknowledgement