Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sphinx docs fix #44 #45

Merged
merged 1 commit into from
Jun 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 57 additions & 21 deletions ast_monitor/interval_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
113 changes: 110 additions & 3 deletions docs/api/ast_monitor.rst
Original file line number Diff line number Diff line change
@@ -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:
Binary file added docs/ast_monitor-0.3.2.pdf
Binary file not shown.
3 changes: 2 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 -----------------------------------------------------

Expand Down