Configuration

class algomancy_gui.configuration.appconfig.AppConfig(core_config=None, server_config=None, page_config=None, compare_page_config=None, styling_config=None, feature_config=None, **kwargs)[source]

Central configuration object for the Algomancy dashboard.

This class composes various configuration groups for organizing dashboard settings by domain: core functionality, server, paths, pages, styling, and features.

Parameters:
  • core_config (CoreConfig | None) – Core configuration (data, scenarios, algorithms). If None, will be created from individual parameters.

  • server_config (ServerConfig | None) – Server and deployment settings.

  • path_config – File system paths.

  • page_config (PageConfig | None) – Page implementations and UI behavior.

  • compare_page_config (ComparePageConfig | None) – Compare page specific settings.

  • styling_config (StylingConfig | None) – Styling and UI customization.

  • feature_config (FeatureConfig | None) – Feature flags and optional functionality.

Example

Using sub-configurations:

>>> from algomancy_gui.configuration.appconfig import AppConfig
>>> from algomancy_gui.configuration.serverconfig import ServerConfig
>>> from algomancy_gui.configuration.comparepageconfig import ComparePageConfig
>>> config = AppConfig(
...     core_config=CoreConfig(
...         etl_factory=ExampleETLFactory,
...         kpis=kpis,
...         algorithms=algorithms,
...     ),
...     server_config=ServerConfig(port=9000),
...     compare_page_config=ComparePageConfig(
...         default_open=["side-by-side", "kpis"]
...     ),
... )
>>> config.server.port
9000
>>> config.core.etl_factory
<ExampleETLFactory>
as_dict()[source]

Serialize the configuration to a flat dictionary.

Converts all sub-configuration attributes into a single dictionary representation suitable for JSON serialization, storage, or passing to other components like GuiLauncher.build() or SettingsManager.

Returns:

A dictionary containing all configuration parameters as key-value pairs.

Return type:

Dict[str, Any]

Example

>>> config = AppConfig(
...     core_config=CoreConfig(title="My Dashboard"),
...     server_config=ServerConfig(port=9000),
... )
>>> config_dict = config.as_dict()
>>> config_dict["port"]
9000
>>> config_dict["title"]
'My Dashboard'
classmethod from_dict(config)[source]

Create an AppConfig instance from a flat dictionary.

This factory method reconstructs an AppConfig object from a dictionary representation, typically one created by as_dict().

Parameters:

config (Dict[str, Any]) – Dictionary containing configuration parameters.

Returns:

A new AppConfig instance initialized with the provided values.

Return type:

AppConfig

Example

>>> config_dict = {
...     "title": "My Dashboard",
...     "port": 9000,
... }
>>> app_config = AppConfig.from_dict(config_dict)
>>> app_config.server.port
9000
class algomancy_scenario.core_configuration.CoreConfig(data_path='data', has_persistent_state=False, save_type='json', data_object_type=None, persistence_backend=None, database_url=None, etl_factory=None, kpis=None, algorithms=None, schemas=None, autocreate=None, default_algo=None, default_algo_params_values=None, autorun=None, title='Algomancy', **_)[source]

Core configuration shared by GUI and CLI.

This class serves as the base for all Algomancy configuration objects. It encapsulates the essential settings required for session management, data handling, scenario execution, and algorithmic processing.

Validation is performed automatically upon instantiation to ensure all required fields are present and correctly typed.

Parameters:
  • data_path (str) – Path to the directory where session and persistent data is stored.

  • has_persistent_state (bool) – If True, data is persisted to disk using save_type.

  • save_type (str | None) – Format for persistent data storage (‘json’ or ‘parquet’).

  • data_object_type (type[BASEDATASOURCE] | None) – The class used to represent the data source (must inherit from BaseDataSource).

  • etl_factory (Any | None) – An instance responsible for creating ETL processes.

  • kpis (Dict[str, Type[BASE_KPI]] | None) – A mapping of KPI names to their corresponding class implementations.

  • algorithms (Dict[str, Type[ALGORITHM]] | None) – A mapping of algorithm names to their corresponding class implementations.

  • input_configs – A list of configurations defining the input files and their schemas.

  • autocreate (bool | None) – If True, a default scenario/algorithm instance is created on startup.

  • default_algo (str | None) – The name of the algorithm to use for autocreation.

  • default_algo_params_values (Dict[str, Any] | None) – Initial parameter values for the default algorithm.

  • autorun (bool | None) – If True, the default algorithm is executed immediately after creation.

  • title (str) – The display title for the application.

class algomancy_gui.configuration.serverconfig.ServerConfig(host=None, port=8050)[source]

Server and deployment settings.

Parameters:
  • host (str | None) – Server host (str), defaults to “127.0.0.1”

  • port (int) – Server port (int) defaults to 8050

class algomancy_gui.configuration.featureconfig.FeatureConfig(allow_parameter_upload_from_file=False, use_authentication=False, show_session_picker=True)[source]

Feature flags and optional functionality.

Parameters:
  • allow_parameter_upload_from_file (bool) – Allow uploading parameters from file.

  • use_authentication (bool) – Enable authentication for the app.

  • show_session_picker (bool) – Show the session picker on the admin page. When False, sessions are still active in the runtime but the GUI hides the dropdown/new/copy controls — useful for single-tenant workshops where switching sessions would only confuse users.

class algomancy_gui.configuration.pageconfig.PageConfig(home_page='standard', data_page='placeholder', scenario_page='placeholder', compare_page='placeholder', overview_page='standard')[source]

Page implementations and UI behavior.

Parameters:
  • home_page (BaseHomePage | str) – Home page implementation or registered page name. Defaults to “standard”.

  • data_page (BaseDataPage | str) – Data page implementation or registered page name. Defaults to “placeholder”.

  • scenario_page (BaseScenarioPage | str) – Scenario page implementation or registered page name. Defaults to “placeholder”.

  • compare_page (BaseComparePage | str) – Compare page implementation or registered page name. Defaults to “placeholder”.

  • overview_page (BaseOverviewPage | str) – Overview page implementation or registered page name. Defaults to “standard”.

class algomancy_gui.configuration.comparepageconfig.ComparePageConfig(default_open=<factory>, ordered_components=<factory>)[source]

Compare page specific settings.

Parameters:
  • default_open (List[str]) – Default components on the compare page. Defaults to an empty list.

  • ordered_components (List[str]) – List of components on the compare page. Defaults an to empty list.

VALID_COMPONENTS = ['side-by-side', 'kpis', 'compare', 'details']

List of valid components for the compare page.