tconnectsync 2.1.3__tar.gz → 2.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tconnectsync-2.1.3/tconnectsync.egg-info → tconnectsync-2.1.4}/PKG-INFO +1 -1
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/setup.cfg +1 -1
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/secret.py +1 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/sync/tandemsource/process_basal.py +14 -3
- {tconnectsync-2.1.3 → tconnectsync-2.1.4/tconnectsync.egg-info}/PKG-INFO +1 -1
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/LICENSE.md +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/README.md +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/pyproject.toml +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/setup.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/__init__.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/api/__init__.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/api/android.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/api/common.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/api/controliq.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/api/tandemsource.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/api/webui.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/api/ws2.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/autoupdate.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/check.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/domain/__init__.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/domain/bolus.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/domain/device_settings.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/domain/tandemsource/__init__.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/domain/tandemsource/event_class.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/domain/tandemsource/pump_settings.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/domain/therapy_event.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/domain/utility.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/eventparser/__init__.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/eventparser/build_events.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/eventparser/events.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/eventparser/generic.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/eventparser/raw_event.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/eventparser/static_dicts.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/eventparser/transforms.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/eventparser/utils.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/features.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/nightscout.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/parser/__init__.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/parser/ciq_therapy_events.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/parser/nightscout.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/parser/tconnect.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/process.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/sync/__init__.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/sync/basal.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/sync/bolus.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/sync/cgm.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/sync/iob.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/sync/profile.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/sync/pump_events.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/sync/tandemsource/__init__.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/sync/tandemsource/autoupdate.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/sync/tandemsource/choose_device.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/sync/tandemsource/helpers.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/sync/tandemsource/heroku_helpers.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/sync/tandemsource/process.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/sync/tandemsource/process_alarm.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/sync/tandemsource/process_basal_resume.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/sync/tandemsource/process_basal_suspension.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/sync/tandemsource/process_bolus.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/sync/tandemsource/process_cartridge.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/sync/tandemsource/process_cgm_alert.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/sync/tandemsource/process_cgm_reading.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/sync/tandemsource/process_cgm_start_join_stop.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/sync/tandemsource/process_user_mode.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/sync/tandemsource/update_profiles.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/util/__init__.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/util/cli.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/util/constants.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync.egg-info/SOURCES.txt +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync.egg-info/dependency_links.txt +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync.egg-info/entry_points.txt +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync.egg-info/requires.txt +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync.egg-info/top_level.txt +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tests/test_autoupdate.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tests/test_process.py +0 -0
- {tconnectsync-2.1.3 → tconnectsync-2.1.4}/tests/test_secret.py +0 -0
|
@@ -79,6 +79,7 @@ NIGHTSCOUT_PROFILE_UPLOAD_MODE = get_one_of('NIGHTSCOUT_PROFILE_UPLOAD_MODE', 'a
|
|
|
79
79
|
# Default Nightscout profile segment fields which aren't stored by Tandem
|
|
80
80
|
NIGHTSCOUT_PROFILE_CARBS_HR_VALUE = get('NIGHTSCOUT_PROFILE_CARBS_HR_VALUE', '20')
|
|
81
81
|
NIGHTSCOUT_PROFILE_DELAY_VALUE = get('NIGHTSCOUT_PROFILE_DELAY_VALUE', '20')
|
|
82
|
+
IGNORE_ZERO_UNIT_BASAL = get_bool('IGNORE_ZERO_UNIT_BASAL', 'false')
|
|
82
83
|
|
|
83
84
|
ENABLE_TESTING_MODES = get_bool('ENABLE_TESTING_MODES', 'false')
|
|
84
85
|
SKIP_NS_LAST_UPLOADED_CHECK = get_bool('SKIP_NS_LAST_UPLOADED_CHECK', 'false')
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
import arrow
|
|
3
3
|
|
|
4
|
+
from ...secret import IGNORE_ZERO_UNIT_BASAL
|
|
4
5
|
from ...features import DEFAULT_FEATURES
|
|
5
6
|
from ... import features
|
|
6
7
|
from ...eventparser.generic import Events, decode_raw_events, EVENT_LEN
|
|
@@ -54,7 +55,9 @@ class ProcessBasal:
|
|
|
54
55
|
|
|
55
56
|
ns_entries = []
|
|
56
57
|
for item in with_duration:
|
|
57
|
-
|
|
58
|
+
ns = self.basal_to_nsentry(*item)
|
|
59
|
+
if ns:
|
|
60
|
+
ns_entries.append(ns)
|
|
58
61
|
|
|
59
62
|
return ns_entries
|
|
60
63
|
|
|
@@ -73,16 +76,24 @@ class ProcessBasal:
|
|
|
73
76
|
|
|
74
77
|
def basal_to_nsentry(self, start, duration, event):
|
|
75
78
|
if type(event) == eventtypes.LidBasalRateChange:
|
|
79
|
+
value = insulin_float_round(event.commandedbasalrate)
|
|
80
|
+
if IGNORE_ZERO_UNIT_BASAL and value < 0.01:
|
|
81
|
+
logger.info("Ignoring basal entry with %.2f unit basal because IGNORE_ZERO_UNIT_BASAL=true: %s" % (value, event))
|
|
82
|
+
return None
|
|
76
83
|
return NightscoutEntry.basal(
|
|
77
|
-
value =
|
|
84
|
+
value = value,
|
|
78
85
|
duration_mins = duration.seconds / 60,
|
|
79
86
|
created_at = start.format(),
|
|
80
87
|
reason = ', '.join(bitmask_to_list(event.changetype)),
|
|
81
88
|
pump_event_id = "%s" % event.eventId
|
|
82
89
|
)
|
|
83
90
|
if type(event) == eventtypes.LidBasalDelivery:
|
|
91
|
+
value = insulin_milliunits_to_real(event.commandedRate)
|
|
92
|
+
if IGNORE_ZERO_UNIT_BASAL and value < 0.01:
|
|
93
|
+
logger.info("Ignoring basal entry with %.2f unit basal because IGNORE_ZERO_UNIT_BASAL=true: %s" % (value, event))
|
|
94
|
+
return None
|
|
84
95
|
return NightscoutEntry.basal(
|
|
85
|
-
value =
|
|
96
|
+
value = value,
|
|
86
97
|
duration_mins = duration.seconds / 60,
|
|
87
98
|
created_at = start.format(),
|
|
88
99
|
reason = ', '.join(bitmask_to_list(event.commandedRateSource)),
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/sync/tandemsource/process_basal_resume.py
RENAMED
|
File without changes
|
{tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/sync/tandemsource/process_basal_suspension.py
RENAMED
|
File without changes
|
|
File without changes
|
{tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/sync/tandemsource/process_cartridge.py
RENAMED
|
File without changes
|
{tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/sync/tandemsource/process_cgm_alert.py
RENAMED
|
File without changes
|
{tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/sync/tandemsource/process_cgm_reading.py
RENAMED
|
File without changes
|
|
File without changes
|
{tconnectsync-2.1.3 → tconnectsync-2.1.4}/tconnectsync/sync/tandemsource/process_user_mode.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|