mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-22 13:21:33 +00:00
Fix sphinx docs broken after dependency hell
This commit is contained in:
parent
732b896d17
commit
a2d1531ea4
@ -3,10 +3,13 @@ Event handler base classes
|
|||||||
|
|
||||||
Subclass these to create your cusom event handlers.
|
Subclass these to create your cusom event handlers.
|
||||||
|
|
||||||
.. automodule:: tfw
|
.. automodule:: tfw.event_handler_base
|
||||||
|
|
||||||
.. autoclass:: EventHandlerBase
|
.. autoclass:: EventHandlerBase
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
.. autoclass:: TriggeredEventHandler
|
.. autoclass:: FSMAwareEventHandler
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. autoclass:: BroadcastingEventHandler
|
||||||
:members:
|
:members:
|
||||||
|
@ -3,10 +3,13 @@ FSM base classes
|
|||||||
|
|
||||||
Subclass these to create an FSM that fits your tutorial/challenge.
|
Subclass these to create an FSM that fits your tutorial/challenge.
|
||||||
|
|
||||||
.. automodule:: tfw
|
.. automodule:: tfw.fsm
|
||||||
|
|
||||||
.. autoclass:: FSMBase
|
.. autoclass:: FSMBase
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
.. autoclass:: LinearFSM
|
.. autoclass:: LinearFSM
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
|
.. autoclass:: YamlFSM
|
||||||
|
:members:
|
||||||
|
@ -6,7 +6,7 @@ Networking
|
|||||||
.. autoclass:: TFWServerConnector
|
.. autoclass:: TFWServerConnector
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
.. automodule:: tfw.networking.event_handlers
|
.. automodule:: tfw.networking.event_handlers.server_connector
|
||||||
|
|
||||||
.. autoclass:: ServerUplinkConnector
|
.. autoclass:: ServerUplinkConnector
|
||||||
:members:
|
:members:
|
||||||
@ -15,3 +15,8 @@ Networking
|
|||||||
|
|
||||||
.. autoclass:: MessageSender
|
.. autoclass:: MessageSender
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
|
.. automodule:: tfw.networking.fsm_aware
|
||||||
|
|
||||||
|
.. autoclass:: FSMAware
|
||||||
|
:members:
|
||||||
|
@ -23,6 +23,11 @@ class FSMBase(Machine, CallbackMixin):
|
|||||||
states, transitions = [], []
|
states, transitions = [], []
|
||||||
|
|
||||||
def __init__(self, initial=None, accepted_states=None):
|
def __init__(self, initial=None, accepted_states=None):
|
||||||
|
"""
|
||||||
|
:param initial: which state to begin with, defaults to the last one
|
||||||
|
:param accepted_states: list of states in which the challenge should be
|
||||||
|
considered successfully completed
|
||||||
|
"""
|
||||||
self.accepted_states = accepted_states or [self.states[-1].name]
|
self.accepted_states = accepted_states or [self.states[-1].name]
|
||||||
self.trigger_predicates = defaultdict(list)
|
self.trigger_predicates = defaultdict(list)
|
||||||
self.event_log = []
|
self.event_log = []
|
||||||
|
@ -16,6 +16,9 @@ class LinearFSM(FSMBase):
|
|||||||
(0) -- step_next --> (1) -- step_next --> (2) -- step_next --> (3) ...
|
(0) -- step_next --> (1) -- step_next --> (2) -- step_next --> (3) ...
|
||||||
"""
|
"""
|
||||||
def __init__(self, number_of_steps):
|
def __init__(self, number_of_steps):
|
||||||
|
"""
|
||||||
|
:param number_of_steps: how many states this FSM should have
|
||||||
|
"""
|
||||||
self.states = [State(name=str(index)) for index in range(number_of_steps)]
|
self.states = [State(name=str(index)) for index in range(number_of_steps)]
|
||||||
self.transitions = []
|
self.transitions = []
|
||||||
for state in self.states[:-1]:
|
for state in self.states[:-1]:
|
||||||
|
Loading…
Reference in New Issue
Block a user