Source code for kaxanuk.attribution_analysis.config_handlers.configurator_interface

"""
Interface for classes creating Configuration entities and related dependencies.
"""

from kaxanuk.attribution_analysis.entities.configuration import Configuration

import abc

[docs] class ConfiguratorInterface(metaclass=abc.ABCMeta): """ Abstract base class for classes that create `Configuration` entities. Concrete implementations must provide the run `Configuration` and the port on which the dashboard should be served. Attributes ---------- DASHBOARD_PORT_MIN : int Minimum allowed value for the dashboard port. DASHBOARD_PORT_MAX : int Maximum allowed value for the dashboard port. """ DASHBOARD_PORT_MIN = 1 DASHBOARD_PORT_MAX = 9999
[docs] @abc.abstractmethod def get_configuration(self) -> Configuration: """ Build and return the validated run configuration. Returns ------- Configuration The configuration for the current attribution analysis run. """ ...
[docs] @abc.abstractmethod def get_dashboard_port(self) -> int: """ Return the port on which the dashboard should be served. Returns ------- int Port number between `DASHBOARD_PORT_MIN` and `DASHBOARD_PORT_MAX`. """ ...
# @abc.abstractmethod # def get_input_handler(self) -> InputHandlerInterface: # ...