Hi All:
I've been busy refactoring and adding to the python-omhe project.
This project's source can be found here:
http://github.com/aviars/python-omhe
I've added/updated the following:
- Added a testing harness (based on unittest) so you can write/run
tests to and verify the correct functinality of th package. Why? I
describe this in the main README (Section 6), but in a nutshell, I see
this test framework as a basis of using OMHE for FDA/FCC regulated
applications. I'll be add quite a bit to this section as well as
adding similar capabilities to RESTCat and her disease-specific/
condition-specific client applications (which are currently in
development for obesity/weightloss and heard disease). I think as
this project grows OMHE and RESTCat become a more and more viable open-
source alternative to the Continua Alliance.
Location ->
http://github.com/aviars/python-omhe/tree/master/omhe/tests/
- python-omhe is now a proper python package and can be installed with
easy_install or pip. Location ->
http://github.com/aviars/python-omhe/tree/master/omhe/
- Added sample code to push (viaHTTP Callback) and Pull server(pull)
data from a Wii Balance Board in OMHE format. Location ->
http://github.com/aviars/python-omhe/tree/master/omhe/hardware/wiibalance/
- Added a README for Wii Balance and WiiServe setup. Location ->
http://github.com/aviars/python-omhe/tree/master/omhe/hardware/wiibalance/
- The hardware specific code is now in a "hardware" folder and it has
subfolders for each specific piece of hardware that the package
supports (More to come).
- Put each command "validator" in its own file so it is easier to add/
contribute to the project.
- Re-factored the parseomhe class so the parse code is now much
simpler, shorter, and readable (I must admit It was a mess before.
The social pressure with open source forced me to clean it up).
- The command line utility "pomhe" now take one argument (an omhe
message) and outputs parsed JSON or JSON containing the specific
error.
- I made quite a few updates to the documentation.
That's all for now. I've posted some additional detail on the testing
harness below as an FYI. I hope to see some of you at the mHealth
Summit and HealthCampDC in our nation's capitol next week. feel free
to ping me if you have any questions.
Best,
Alan Viars
twitter @aviars
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
6. OMHE TESTING FRAMEWORK:
This section describes python-omhe's testing framework. Python-omhe
package has its own special testing harness based on unittest.
6.1 Why Build a Test Framework?:
The long term goal of the testing system is to provide quantifiable
results to validation of correct input, output, and to ensure the
tools throw the right exception when errant input is given.
We foresee some "omhe-powered" projects being part of systems that
fall under FDA and FCC regulation. This package addition is the
beginning of a larger test framework designed to appease regulators
(from a quantifiable and verifiable perspective). Also, automated
testing is just a good idea and "test-driven-development" makes for
cleaner, more modular code. It also makes developing OMHE-powered
applications easier and more reliable.
6.1 Running Tests:
You'll find test scripts inside 'omhe/tests'.
Right now only "bp" (blood pressure) has an automated suite of tests,
but others will be created in the near future.
To run the tests for blood pressure just run the following command
inside the "omhe/tests/" folder:
python test_bp.py
That's it. You should not receive any errors unless you've changed
something in the code base. This validates that correct input returns
parsed data, incorrect input raises the errors that it should.