An openaps plugin for cleaning and parsing glucose sensor data
Interpreting recent historical events is a foundational component in any openaps project, and this plugin aspires to be a central place for documenting and testing the parsing of glucose sensor data.
$ sudo easy_install openapscontrib.glucosetools
Clone the repository and link via setuptools:
$ python setup.py develop
$ openaps vendor add openapscontrib.glucosetools
$ openaps device add glucose glucosetools
Use the device help menu to see available commands.
$ openaps use glucose -h
usage: openaps-use glucose [-h] USAGE ...
optional arguments:
-h, --help show this help message and exit
## Device glucose:
vendor openapscontrib.glucosetools
glucosetools - tools for cleaning, condensing, and reformatting history data
USAGE Usage Details
clean Resolve inconsistencies and ordering from a sequence of glucose
data
latest Returns the latest glucose entry from a sequence of glucose data
Use the command help menu to see available arguments.
$ openaps use glucose clean -h
usage: openaps-use glucose clean [-h] [infile]
Resolve inconsistencies and ordering from a sequence of glucose data
positional arguments:
infile JSON-encoded glucose data
optional arguments:
-h, --help show this help message and exit
Tasks performed by this pass:
- Removes unknown and erroneous data entries
- Re-sorts all known values in reverse-chronological order
Contributions are welcome and encouraged in the form of bugs and pull requests.
Unit tests can be run manually via setuptools.
$ python setup.py test