src.spyice.utils.config_sort#

class src.spyice.utils.config_sort.ConfigData[source]#

Bases: object

Class representing configuration data.

Parameters:

setup (bool) – Indicates if the setup is enabled or not.

__init__()#
Return type:

None

setup = True#
class src.spyice.utils.config_sort.ConfigSort[source]#

Bases: object

A class that provides methods for retrieving configuration parameters.

Parameters:

config (DictConfig) – The configuration dictionary.

Variables:

config (DictConfig) – The configuration dictionary.

get_config_params(config

DictConfig): Retrieves configuration parameters using the ‘consts’, ‘dt’, ‘S_IC’, and ‘iter_max’ keys.

get_ownconfig_params(config)[source]#

Retrieves configuration parameters using the ‘constants’, ‘dt’, ‘S_IC’, and ‘iter_max’ keys.

getconfig_dataclass(config, config_type='default')[source]#

Retrieves configuration parameters based on the specified config_type.

Parameters:
  • config (dataclass)

  • config_type (str)

Return type:

dataclass

__init__(config)[source]#

A class that provides methods for retrieving configuration parameters.

Parameters:

config (DictConfig) – The configuration dictionary.

Variables:

config (DictConfig) – The configuration dictionary.

get_config_params(config

DictConfig): Retrieves configuration parameters using the ‘consts’, ‘dt’, ‘S_IC’, and ‘iter_max’ keys.

get_ownconfig_params(config)[source]#

Retrieves configuration parameters using the ‘constants’, ‘dt’, ‘S_IC’, and ‘iter_max’ keys.

getconfig_dataclass(config, config_type='default')[source]#

Retrieves configuration parameters based on the specified config_type.

Parameters:
  • config (dataclass)

  • config_type (str)

Return type:

dataclass

get_config_params(config)[source]#

Get the configuration parameters from the given config dictionary.

Parameters:

config (DictConfig) – The configuration dictionary.

Returns:

None

Raises:

None

get_ownconfig_params(config)[source]#

Retrieves the parameters from the given configuration dictionary.

Parameters:

config (dict) – The configuration dictionary.

Returns:

None

classmethod getconfig_dataclass(config, config_type='default')[source]#

Retrieves configuration parameters based on the specified config_type.

Parameters:
  • config (dataclass) – The configuration dictionary.

  • config_type (str) – The type of configuration “default” or “jupyter”. “jupyter” is used for Jupyter notebook configurations.

Returns:

An instance of the ConfigData class.

Return type:

ConfigData

src.spyice.utils.config_sort.read_omegaconfig(config, parameter)[source]#

Reads the parameter from the OmegaConf configuration.

Parameters:

parameter (str) – The parameter to read.

Returns:

The value of the parameter.

Return type:

str

Raises:

None