.. image:: images/logo.jpg :target: images/logo.jpg :alt: Diality The Dialin API supports cross-functional testing of the Denali system. It supports the Systems level testing, Software Verification & Validation, and pre-release SW and FW developmental testing by exposing and simulating interaction with the UI, HD, and DG sub-components. To use this API, it is recommended to install the API directly from a pre-packaged .whl file. Once installed to your local virtual python environment with pip, you can import modules as needed to develop your tests. Installation ================================== * Assumes your ssh key has already been setup with our internal BitBucket servers * Assumes your computer is in the office or that you are using LogMeIn. The VPN has a DNS issue which may break the installation. All release versions will eventually be placed on their own separate branch to facilitate backwards compatibility and a fully accessible and testable API version history. How to install from the master branch, which contains the latest in-development changes (Available!) .. code-block:: #!/bin/bash virtualenv --python=python3 venv source venv/bin/activate pip3 install git+ssh://git@dvm-linux02:7999/vv/dialin.git How to install a specific release version (Not yet available) .. code-block:: #!/bin/bash virtualenv --python=python3 venv source venv/bin/activate branch="0.0.1" # update the branch_name here pip3 install git+ssh://git@dvm-linux02:7999/vv/dialin.git@$branch Install from a pre-built .whl file: ================================== .. code-block:: #!/bin/bash virtualenv --python=python3 venv source venv/bin/activate pip3 install dialin-0.0.1-py3-none-any.whl Modules ================================== * 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: .. code-block:: $ cd tools $ ./setup_environment.sh Unit Testing ================================== All internal tests of the dialin API can be found in the tests directory at the root of this git repository: .. code-block:: (venv) $ cd tests (venv) $ python3 dialin_unit_test_example.py Building the Dialin package ================================== .. code-block:: $ ./build.sh