eogrow.core.config

Implements functions that transform raw dictionaries/JSON files according to the config language of eo-grow.

eogrow.core.config.collect_configs_from_path(path, used_config_paths=None)[source]

Loads and builds a list of config dictionaries defined by the parameters stored in files

This function performs the 1st stage of language interpretation as described in eo-grow/documentation/config-language.md`.

Parameters:
  • path (str) – A full path where a config file is located

  • used_config_paths (set[str] | None) – A helper parameter to prevent cyclic config imports.

Returns:

A list of stage 1 dictionaries from which to build config object.

Return type:

CrudeConfig | list[eogrow.core.config.CrudeConfig]

eogrow.core.config.interpret_config_from_dict(config, external_variables=None)[source]

Applies config language rules to a loaded config

This function performs the 2nd stage of language interpretation as described in eo-grow/documentation/config-language.md.

Parameters:
  • config (CrudeConfig) –

  • external_variables (dict[str, Any] | None) –

Return type:

RawConfig

eogrow.core.config.interpret_config_from_path(path)[source]

Loads from path in applies both steps of the config language.

Parameters:

path (str) –

Return type:

RawConfig

eogrow.core.config.recursive_config_join(config1, config2)[source]

Recursively join 2 config objects, where config1 values override config2 values

Parameters:
  • config1 (dict) –

  • config2 (dict) –

Return type:

dict