.. _dootle.control.fsm.machines: =========================== dootle.control.fsm.machines =========================== .. py:module:: dootle.control.fsm.machines .. autoapi-nested-parse:: The FSM's for various components of doot Classes ------- .. autoapisummary:: dootle.control.fsm.machines.TaskMachine dootle.control.fsm.machines.ArtifactMachine dootle.control.fsm.machines.MainMachine dootle.control.fsm.machines.OverlordMachine Module Contents =============== .. _dootle.control.fsm.machines.TaskMachine: .. py:class:: TaskMachine(task: dootle.control.fsm._interface.TaskModel_p) Bases: :py:obj:`statemachine.StateMachine` A Statemachine controlling the tracking of task states .. py:attribute:: _ .. py:attribute:: setup .. py:attribute:: prepare .. py:attribute:: run .. py:attribute:: finish .. py:attribute:: skip .. py:attribute:: halt .. py:attribute:: fail .. py:attribute:: progress .. py:method:: run_until_init(tracker: doot.control.tracker._interface.WorkflowTracker_p, **kwargs) -> None .. py:method:: run_until_ready(tracker: doot.control.tracker._interface.WorkflowTracker_p, **kwargs) -> None .. py:method:: run_until_dead(tracker: doot.control.tracker._interface.WorkflowTracker_p, **kwargs) -> None .. py:method:: before_transition(source: Any, event: Any, target: Any) -> None .. _dootle.control.fsm.machines.ArtifactMachine: .. py:class:: ArtifactMachine(artifact: dootle.control.fsm._interface.ArtifactModel_p) Bases: :py:obj:`statemachine.StateMachine` A statemachine of artifact .. py:attribute:: Declared .. py:attribute:: Stale .. py:attribute:: ToClean .. py:attribute:: Removed .. py:attribute:: Exists .. py:attribute:: Finished .. py:attribute:: progress .. _dootle.control.fsm.machines.MainMachine: .. py:class:: MainMachine(model: Any = None, state_field: str = 'state', start_value: Any = None, rtc: bool = True, allow_event_without_transition: bool = False, listeners: List[object] | None = None) Bases: :py:obj:`statemachine.StateMachine` For running doot as main .. py:attribute:: init .. py:attribute:: setup .. py:attribute:: plugins .. py:attribute:: cli .. py:attribute:: reporter .. py:attribute:: commands .. py:attribute:: tasks .. py:attribute:: run .. py:attribute:: failed .. py:attribute:: report .. py:attribute:: shutdown .. py:attribute:: finished .. py:attribute:: progress .. py:attribute:: fail .. _dootle.control.fsm.machines.OverlordMachine: .. py:class:: OverlordMachine(model: Any = None, state_field: str = 'state', start_value: Any = None, rtc: bool = True, allow_event_without_transition: bool = False, listeners: List[object] | None = None) Bases: :py:obj:`statemachine.StateMachine` :param model: An optional external object to store state. See :ref:`domain models`. :param state_field: The model's field which stores the current state. Default: ``state``. :type state_field: str :param start_value: An optional start state value if there's no current state assigned on the :ref:`domain models`. Default: ``None``. :param rtc: Controls the :ref:`processing model`. Defaults to ``True`` that corresponds to a **run-to-completion** (RTC) model. :type rtc: bool :param allow_event_without_transition: If ``False`` when an event does not result in a transition, an exception ``TransitionNotAllowed`` will be raised. If ``True`` the state machine allows triggering events that may not lead to a state :ref:`transition`, including tolerance to unknown :ref:`event` triggers. Default: ``False``. :param listeners: An optional list of objects that provies attributes to be used as callbacks. See :ref:`listeners` for more details. .. py:attribute:: init .. py:attribute:: constants .. py:attribute:: config_file .. py:attribute:: logging .. py:attribute:: locations .. py:attribute:: shared .. py:attribute:: ready .. py:attribute:: failed .. py:attribute:: finished .. py:attribute:: progress .. py:attribute:: fail