andes.system.config_runtime.SystemConfigRuntime#

class andes.system.config_runtime.SystemConfigRuntime(system)[source]#

Manage system-level configuration bootstrapping and persistence.

Configuration is resolved in four phases, each with higher priority:

  1. load_rc() — load from ~/.andes/andes.rc

  2. merge_file_config() — merge _config section from the case file

  3. apply_cli_overrides() — apply config_option from the CLI

  4. finalize() — create system.config, add defaults, validate

Phases are called in order from andes.system.facade.System.__init__().

__init__(system)[source]#

Methods

apply_cli_overrides()

Phase 3: Apply config_option from the command line into system._config_object.

collect_config()

Collect config data from models into a ConfigParser.

collect_config_rows()

Collect all config values as a flat list of row dicts for serialization to _config sheets/keys.

configure_numpy([seed, divide, invalid])

Configure NumPy based on Config.

finalize([config])

Phase 4: Create system.config and system.runtime from the resolved _config_object, add defaults, and validate.

load_config_rc([conf_path])

Load config from an rc-formatted file.

load_rc([config_path, default_config])

Phase 1: Resolve the rc file path and load it into system._config_object.

merge_file_config(files)

Phase 2: Extract _config rows from the case file and merge them into system._config_object.

save_config([file_path, overwrite])

Save all system, model, and routine configurations to an rc-formatted file.

set_config([config])

Set configuration for the System object.

update_config_object()

Deprecated since version 2.0.