diff --git a/ast_monitor/interval_training.py b/ast_monitor/interval_training.py index 31ac29d..f443246 100644 --- a/ast_monitor/interval_training.py +++ b/ast_monitor/interval_training.py @@ -8,20 +8,32 @@ class IntervalTraining: """ Initialization method of the IntervalTraining class.\n + Args: - training: dict - an interval training - tick_time: int - tick time in milliseconds + ---- + training: dict + an interval training + tick_time: int + tick time in milliseconds + + Returns: + ------- + None """ def __init__(self, training: dict, basic_data) -> None: """ Initialization method of the IntervalTraining class.\n + Args: - training: dict - an interval training - tick_time: int - tick time in milliseconds + ---- + training: dict + an interval training + tick_time: int + tick time in milliseconds + + Returns: + ------- + None """ self.file = training['file'] self.name = training['interval'][0]['name'] @@ -46,9 +58,15 @@ def __init__(self, training: dict, basic_data) -> None: def __eq__(self, __o: object) -> bool: """ Method for comparing two IntervalTraining objects.\n + Args: - __o: IntervalTraining - an interval training to be compared to + ---- + __o: IntervalTraining + an interval training to be compared to + + Returns: + ------- + bool """ return ( self.name == __o.name and @@ -65,9 +83,15 @@ def __eq__(self, __o: object) -> bool: def start(self, write_log: bool = False) -> None: """ Starting an interval training.\n + Args: - write_log: bool - writing log if True + ---- + write_log: bool + writing log if True + + Returns: + ------- + None """ # Writing the header of the training. if write_log: @@ -82,14 +106,20 @@ def start(self, write_log: bool = False) -> None: break self.abort_training = True - def start_speed_phase(self, interval: int, write_log: bool) -> None: + def start_speed_phase(self, interval: int) -> None: """ Starting a speed phase of an interval.\n + Args: - interval: int - index of the interval - write_log: bool - writing log if True + ---- + interval: int + index of the interval + write_log: bool + writing log if True + + Returns: + ------- + None """ self.current_interval = interval, 'speed' self.speed_notification = True @@ -122,11 +152,17 @@ def start_speed_phase(self, interval: int, write_log: bool) -> None: def start_recovery_phase(self, interval: int, write_log: bool) -> None: """ Starting a recovery phase of an interval.\n + Args: - interval: int - index of the interval - write_log: bool - writing log if True + ---- + interval: int + index of the interval + write_log: bool + writing log if True + + Returns: + ------- + None """ self.current_interval = interval, 'recovery' self.recovery_notification = True diff --git a/docs/api/ast_monitor.rst b/docs/api/ast_monitor.rst index 734a812..8e1e930 100644 --- a/docs/api/ast_monitor.rst +++ b/docs/api/ast_monitor.rst @@ -1,7 +1,114 @@ -:mod:`ast_monitor` -================================ + AST_Monitor package - API +========================== -.. automodule:: ast_monitor +AST-Monitor --- A wearable Raspberry Pi computer for cyclists + +-------------------------------------------- +Basic data module +-------------------------------------------- + +.. automodule:: basic_data + :noindex: + :members: + :inherited-members: + :undoc-members: + :show-inheritance: + +-------------------------------------------- +Digital Twin module +-------------------------------------------- + +.. automodule:: digital_twin + :noindex: + :members: + :inherited-members: + :undoc-members: + :show-inheritance: + +-------------------------------------------- +GPS Sensor module +-------------------------------------------- + +.. automodule:: gps_sensor + :noindex: + :members: + :inherited-members: + :undoc-members: + :show-inheritance: + +-------------------------------------------- +HR Sensor module +-------------------------------------------- + +.. automodule:: hr_sensor + :noindex: + :members: + :inherited-members: + :undoc-members: + :show-inheritance: + +-------------------------------------------- +Interval Training module +-------------------------------------------- + +.. automodule:: interval_training + :noindex: + :members: + :inherited-members: + :undoc-members: + :show-inheritance: + +-------------------------------------------- +Main Window module +-------------------------------------------- + +.. automodule:: mainwindow + :noindex: + :members: + :inherited-members: + :undoc-members: + :show-inheritance: + +-------------------------------------------- +Model module +-------------------------------------------- + +.. automodule:: model + :noindex: + :members: + :inherited-members: + :undoc-members: + :show-inheritance: + +-------------------------------------------- +Simulation module +-------------------------------------------- + +.. automodule:: simulation + :noindex: + :members: + :inherited-members: + :undoc-members: + :show-inheritance: + +-------------------------------------------- +Training Session module +-------------------------------------------- + +.. automodule:: training_session + :noindex: + :members: + :inherited-members: + :undoc-members: + :show-inheritance: + +-------------------------------------------- +Write log module +-------------------------------------------- + +.. automodule:: write_log + :noindex: :members: + :inherited-members: :undoc-members: :show-inheritance: diff --git a/docs/ast_monitor-0.3.2.pdf b/docs/ast_monitor-0.3.2.pdf new file mode 100644 index 0000000..8fb5928 Binary files /dev/null and b/docs/ast_monitor-0.3.2.pdf differ diff --git a/docs/conf.py b/docs/conf.py index b3906a2..3eb7f84 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -14,7 +14,8 @@ import os import sys -sys.path.insert(0, os.path.abspath('.')) +sys.path.insert(0, os.path.abspath('..')) +sys.path.insert(0, os.path.abspath('../ast_monitor/')) # -- Project information -----------------------------------------------------