Instead, load the relevant module of the true file, and execute the modified code within that.
This also cleans up some of the previous now-unnecessary code around get_module_with_inserted_embed_line
* Experiment a lot with module loading
* Extract methods out of experimental mess
* Fix get module return type
* Only reload() modules during reload() command
* Remove unnecessary default parameter
* Add docstrings and logging statements
* Delete unwanted printout
* Improve logging messages
* Extract methods to a new class ModuleLoader
* Remove unused builtins import
* exec_module in any case at the end
* Clarify docstrings & move get_module method up in file
* Add more additionally excluded modules as array
* Distinguish between user-defined modules and external libraries like numpy
* Improved tracked_import docstring
* Remove _insert_embed suffix before logging
* Fix args.is_reload not defined error
* Refine logic to determine whether module is user-defined or not
* Fix list vs. set type annotations
* Improve docstrings & change order of early return
* Fix spelling mistake of "Reloading"
* Try out custom deep reload
* Make deep reload more robust
* Also reload modules imported as classes
* Move early return up to greatly improve performance
* Clean up comments
* Make methods of Module Loader "private"
* Add backticks around function in docstring
---------
Co-authored-by: Grant Sanderson <grant@3blue1brown.com>
* Remove print("Reloading...")
* Change where exception mode is set, to be quieter
* Add default fallback monitor for when no monitors are detected
* Have StringMobject work with svg strings rather than necessarily writing to file
Change SVGMobject to allow taking in a string of svg code as an input
* Add caching functionality, and have Tex and Text both use it for saved svg strings
* Clean up tex_file_writing
* Get rid of get_tex_dir and get_text_dir
* Allow for a configurable cache location
* Make caching on disk a decorator, and update implementations for Tex and Text mobjects
* Remove stray prints
* Clean up how configuration is handled
In principle, all we need here is that manim looks to the default_config.yaml file, and updates it based on any local configuration files, whether in the current working directory or as specified by a CLI argument.
* Make the default size for hash_string an option
* Remove utils/customization.py
* Remove stray prints
* Consolidate camera configuration
This is still not optimal, but at least makes clearer the way that importing from constants.py kicks off some of the configuration code.
* Factor out configuration to be passed into a scene vs. that used to run a scene
* Use newer extract_scene.main interface
* Add clarifying message to note what exactly is being reloaded
* Minor clean up
* Minor clean up
* If it's worth caching to disk, then might as well do so in memory too during development
* No longer any need for custom hash_seeds in Tex and Text
* Remove display_during_execution
* Get rid of (no longer used) mobject_data directory reference
* Remove get_downloads_dir reference from register_font
* Update where downloads go
* Easier use of subdirectories in configuration
* Add new pip requirements