Python helpers for the EDC Dropmate
Project description
Dropmate-py
Python helpers for the EDC Dropmate.
🚨 This is an beta project. User-facing functionality is still under development 🚨
Installation
Install by cloning this repository and installing into a virtual environment:
$ pip install .
You can confirm proper installation via the dropmate
CLI:
$ dropmate --help
Usage: dropmate [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
audit Audit a consolidated Dropmate log.
audit-bulk Audit a directory of consolidated Dropmate logs.
Usage
NOTE: All functionality assumes that log records have been provided by Dropmate app version 1.5.16 or newer. Prior versions may not contain all the necessary data columns to conduct the data audit, and there may also be column naming discrepancies between the iOS and Android apps.
Environment Variables
The following environment variables are provided to help customize pipeline behaviors.
Variable Name | Description | Default |
---|---|---|
PROMPT_START_DIR |
Start path for UI file/dir prompt | '.' |
dropmate audit
Process a consolidated Dropmate log CSV.
Input Parameters
Parameter | Description | Type | Default |
---|---|---|---|
--log-filepath |
Path to Dropmate log CSV to parse. | Path|None |
GUI Prompt |
--min-alt-loss-ft |
Threshold altitude delta, feet. | int |
200 |
--min-firmware |
Threshold firmware version. | int|float |
5 |
--time-delta-minutes |
Dropmate internal clock delta from real-time. | int |
60 |
dropmate audit-bulk
Batch process a directory of consolidated Dropmate log CSVs.
Input Parameters
Parameter | Description | Type | Default |
---|---|---|---|
--log-dir |
Path to Dropmate log directory to parse. | Path|None |
GUI Prompt |
--log-pattern |
Dropmate log file glob pattern.1,2 | str |
"*.csv" |
--min-alt-loss-ft |
Threshold altitude delta, feet. | int |
200 |
--min-firmware |
Threshold firmware version. | int|float |
5 |
--time-delta-minutes |
Dropmate internal clock delta from real-time. | int |
60 |
- Case sensitivity is deferred to the host OS
- Recursive globbing requires manual specification (e.g.
**/*.csv
)
Contributing
NOTE: Due to deployment environment restrictions preventing the use of compiled libraries (e.g. Polars, Pandas/Numpy), tooling is intentionally limited to pure-Python implementations.
Development Environment
This project uses Poetry to manage dependencies. With your fork cloned to your local machine, you can install the project and its dependencies to create a development environment using:
$ poetry install
A pre-commit configuration is also provided to create a pre-commit hook so linting errors aren't committed:
$ pre-commit install
Testing & Coverage
A pytest suite is provided, with coverage reporting from pytest-cov. A tox configuration is provided to test across all supported versions of Python. Testing will be skipped for Python versions that cannot be found.
$ tox
Details on missing coverage, including in the test suite, is provided in the report to allow the user to generate additional tests for full coverage.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for dropmate_py-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4365af21d0bc63f28dae61874fedd922c0162247d836a1759e4ef2b04796fd7a |
|
MD5 | 61f07782f48e6ece4a6563e1db4067b8 |
|
BLAKE2b-256 | d163b81b37327615140d9f4c7d705ed1f47fdaab45f4b304ad6c24d4f553f540 |