A community-maintained Python framework for creating mathematical animations.
Add info-level logging for config files read and enhance output (#4375)
Kabilanfc68c1043375
diff --git a/manim/_config/utils.py b/manim/_config/utils.pyindex f109af693..e79b3219a 100644--- a/manim/_config/utils.py+++ b/manim/_config/utils.py@@ -122,10 +122,14 @@ def make_config_parser(# read_file() before calling read() for any optional files."# https://docs.python.org/3/library/configparser.html#configparser.ConfigParser.readparser = configparser.ConfigParser()+ logger.info(f"Reading config file: {library_wide}")with library_wide.open() as file:parser.read_file(file) # necessary fileother_files = [user_wide, Path(custom_file) if custom_file else folder_wide]+ for path in other_files:+ if path.exists():+ logger.info(f"Reading config file: {path}")parser.read(other_files) # optional filesreturn parserdiff --git a/manim/cli/cfg/group.py b/manim/cli/cfg/group.pyindex 13834311a..3945499f8 100644--- a/manim/cli/cfg/group.py+++ b/manim/cli/cfg/group.py@@ -267,6 +267,12 @@ modify write_cfg_subcmd_input to account for it.""",@cfg.command(context_settings=cli_ctx_settings)def show() -> None:+ console.print("CONFIG FILES READ", style="bold green underline")+ for path in config_file_paths():+ if path.exists():+ console.print(f"{path}")+ console.print()+parser = make_config_parser()rich_non_style_entries = [a.replace(".", "_") for a in RICH_NON_STYLE_ENTRIES]for category in parser: