Skip to content

main_multimno

Application entrypoint for launching a single component.

Usage:

python multimno/main.py <component_id> <general_config_path> <component_config_path>
  • component_id: ID of the component to be executed.
  • general_config_path: Path to a INI file with the general configuration of the execution.
  • component_config_path: Path to a INI file with the specific configuration of the component.

build(component_id, general_config_path, component_config_path)

Parameters:

Name Type Description Default
component_id str

id of the component

required
general_config_path str

general config path

required
component_config_path str

component config path

required

Raises:

Type Description
ValueError

If the component_id is not supported.

Returns:

Type Description
Component

Component constructor.

Source code in multimno/main_multimno.py
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
def build(component_id: str, general_config_path: str, component_config_path: str):
    """


    Args:
        component_id (str): id of the component
        general_config_path (str): general config path
        component_config_path (str): component config path

    Raises:
        ValueError: If the component_id is not supported.

    Returns:
        (multimno.core.component.Component): Component constructor.
    """
    try:
        constructor = CONSTRUCTORS[component_id]
    except KeyError as e:
        raise ValueError(f"Component {component_id} is not supported.") from e

    return constructor(general_config_path, component_config_path)