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)

Build a component based on the component_id.

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
ComponentNotSupported

If the component_id is not supported.

Returns:

Type Description
Component

Component constructor.

Source code in multimno/main_multimno.py
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
def build(component_id: str, general_config_path: str, component_config_path: str):
    """
    Build a component based on the component_id.

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

    Raises:
        ComponentNotSupported: If the component_id is not supported.

    Returns:
        (multimno.core.component.Component): Component constructor.
    """
    constructor = CONSTRUCTORS.get(component_id)
    if constructor is None:
        raise ComponentNotSupported(component_id)

    return constructor(general_config_path, component_config_path)