Index: docs/source/README.rst =================================================================== diff -u -rc6596d42d995bed3789849bd85c83da5a3837fac -r84a2eda208d7b18754a8fc101fdb8fd6ab8f4150 --- docs/source/README.rst (.../README.rst) (revision c6596d42d995bed3789849bd85c83da5a3837fac) +++ docs/source/README.rst (.../README.rst) (revision 84a2eda208d7b18754a8fc101fdb8fd6ab8f4150) @@ -51,41 +51,10 @@ source venv/bin/activate pip3 install dialin-0.0.1-py3-none-any.whl -Modules +Examples ================================== +.. literalinclude:: ../../tests/test_demo.py - -* See the tests directory for examples of how to use this API -* Also consult the Dialin API documentation which can be generated using the ``tools/document.sh`` script. - -.. code-block:: - - from dialin.hd.alarms import HDAlarms - from dialin.hd.blood_flow import HDBloodFlow - from dialin.hd.buttons import HDButtons - from dialin.hd.constants import RESET, NO_RESET - from dialin.hd.dialysate_inlet_flow import HDDialysateInletFlow - from dialin.hd.dialysate_outlet_flow import HDDialysateOutletFlow - from dialin.hd.hemodialysis_device import HD - from dialin.hd.pressure_occlusion import HDPressureOcclusion - from dialin.hd.rtc import HDRTC - from dialin.hd.treatment import HDTreatment - from dialin.hd.ui_proxy import HDUIProxy - from dialin.hd.watchdog import HDWatchdog - - - from dialin.dg.dialysate_generator import DG - - - from dialin.protocols.CAN import (DenaliCanMessenger, - DenaliMessage, - DenaliChannels, - LongDenaliMessageBuilder) - - - from dialin.utils.conversions import (integer_to_bytearray, - float_to_bytearray) - Internal API Development Environment ================================== After cloning this repository, inside the repository root directory: @@ -112,3 +81,4 @@ .. code-block:: $ ./build.sh + Index: docs/source/index.rst =================================================================== diff -u -rc6596d42d995bed3789849bd85c83da5a3837fac -r84a2eda208d7b18754a8fc101fdb8fd6ab8f4150 --- docs/source/index.rst (.../index.rst) (revision c6596d42d995bed3789849bd85c83da5a3837fac) +++ docs/source/index.rst (.../index.rst) (revision 84a2eda208d7b18754a8fc101fdb8fd6ab8f4150) @@ -16,8 +16,3 @@ .. contents:: .. include:: README.rst -.. toctree:: - :hidden: - index - - Index: tests/test_demo.py =================================================================== diff -u -r273a45daf0a9fd45d363d0b5ce16691c874a5eec -r84a2eda208d7b18754a8fc101fdb8fd6ab8f4150 --- tests/test_demo.py (.../test_demo.py) (revision 273a45daf0a9fd45d363d0b5ce16691c874a5eec) +++ tests/test_demo.py (.../test_demo.py) (revision 84a2eda208d7b18754a8fc101fdb8fd6ab8f4150) @@ -24,7 +24,8 @@ def test_dg_version(): """ Prints the DG version. - \returns None + + @return: None """ dg = DG() if dg.cmd_log_in_to_dg(): @@ -36,7 +37,8 @@ def test_hd_version(): """ Prints the HD version. - \returns None + + @return: None """ hd = HD() @@ -49,7 +51,8 @@ def test_hd_off_button(): """ Simulates pressing the off button - \returns None + + @return: None """ hd = HD() @@ -60,25 +63,11 @@ # simulate off button pressed hd.buttons.cmd_off_button_override(BUTTON_PRESSED, NO_RESET) - -def test_hd_stop_button(): - """ - Simulates pressing the stop button - \returns None - """ - raise NotImplementedError - """ - hd = HD() - - if hd.cmd_log_in_to_hd(): - hd.buttons.cmd_stop_button_override() - """ - - def test_hd_blood_flow(ml_per_min=110): """ Sets the HD blood flow rate (mL / min) - \returns None + + @return: None """ hd = HD() if hd.cmd_log_in_to_hd(): @@ -92,7 +81,8 @@ def test_stop_hd_blood_flow(): """ Stops the HD blood flow - \returns None + + @return: None """ hd = HD() if hd.cmd_log_in_to_hd():