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

Refactor config #2266

Merged
merged 52 commits into from
Dec 11, 2024
Merged

Refactor config #2266

merged 52 commits into from
Dec 11, 2024

Conversation

3b1b
Copy link
Owner

@3b1b 3b1b commented Dec 11, 2024

Configuration was a bit of a mess, this is an attempt to clean it up and better clarify what's going on.

At a high level, the default_config.yml file should be where all configuration defaults are set, determining default parameters for various classes, constants, or other specifications a user may want to change. They can then create their own custom_config.yml file to update any of these to their own personal taste (for instance mine lives here).

Note, for anyone who had a custom_config.yml file, this update will require that it be updated to a new format

The configuration from these files is loaded into a global dictionary, named manim_config, which is also updated based on the CLI arguments.

Previously, a lot of configuration that used CLI arguments, or these yml files, was a bit spread out an unsystematic. Here the aim is for configuration associated with specific classes to be clearly marked as such, and for code relevant to processing that configuration (e.g. for Window) to lie within the class itself.


Other updates

  • The functionality of ReloadManger is replaced with a simpler run_scenes in main.py, and the updates necessary for the reloading are instead consolidated in reload_scene.
  • Bug fix for the use of xelatex

3b1b added 30 commits December 10, 2024 10:10
…onary a bit more explicit

Instead of implicit through the use of lru_cache
Since the reload logic no longer relies on any state, the relevant loop is simple enough that it feels clearest to include it in the main entry point file.
This should make things like the color palette and frame size more easily customizable.
And likewise DEFAULT_MOBJECT_TO_MOBJECT_BUFFER -> DEFAULT_MOBJECT_TO_MOBJECT_BUFF
@3b1b 3b1b merged commit eeb4fdf into master Dec 11, 2024
0 of 2 checks passed
@Splines
Copy link
Contributor

Splines commented Dec 11, 2024

Just as a suggestion, it'd be amazing to squash-merge PRs as it's otherwise a bit difficult to keep track of what changed in Manim on the master branch since we get commits like Change "style" in default config to "text", which are mixed with more "high-level" ones that aggregate multiple changes under one roof, like Refactor config, Add reload() command etc. When browsing through the master branch, it'd be great to just see those high-level commits and if I want to I can still look at the PR and see all the details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants