chatter.config#

chatter.config#

Configuration management for the chatter package.

Functions

get_default_config()

Return a deep copy of the default configuration dictionary.

make_config([user_config])

Create a finalized configuration dictionary by merging user overrides into the default configuration.

set_plot_style(config)

Configure the matplotlib plotting style based on a configuration object.

chatter.config.get_default_config() Dict[str, Any][source]#

Return a deep copy of the default configuration dictionary.

Returns:

A copy of DEFAULT_CONFIG that can be safely modified.

Return type:

dict

chatter.config.make_config(user_config: Dict[str, Any] | None = None) Dict[str, Any][source]#

Create a finalized configuration dictionary by merging user overrides into the default configuration.

Parameters:

user_config (dict or None, optional) – Dictionary with user-specified overrides. Unknown keys trigger a warning.

Returns:

Finalized configuration dictionary.

Return type:

dict

chatter.config.set_plot_style(config: Any) None[source]#

Configure the matplotlib plotting style based on a configuration object.

Parameters:

config (SimpleNamespace or dict-like) – A configuration-like object with attributes such as ‘dark_mode’ (bool) and ‘font’ (str). The ‘dark_mode’ attribute controls whether a dark or light theme is used. The ‘font’ attribute specifies a preferred sans-serif font family name, which must be installed on the system in order to be applied successfully.

Returns:

This function updates matplotlib’s global rcParams in place.

Return type:

None