tconnectsync 2.1.4__tar.gz → 2.1.6__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.4/tconnectsync.egg-info → tconnectsync-2.1.6}/PKG-INFO +1 -1
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/setup.cfg +1 -1
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/domain/tandemsource/pump_settings.py +3 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/parser/nightscout.py +11 -8
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/sync/tandemsource/process.py +4 -2
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/sync/tandemsource/update_profiles.py +4 -1
- {tconnectsync-2.1.4 → tconnectsync-2.1.6/tconnectsync.egg-info}/PKG-INFO +1 -1
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/LICENSE.md +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/README.md +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/pyproject.toml +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/setup.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/__init__.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/api/__init__.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/api/android.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/api/common.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/api/controliq.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/api/tandemsource.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/api/webui.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/api/ws2.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/autoupdate.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/check.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/domain/__init__.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/domain/bolus.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/domain/device_settings.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/domain/tandemsource/__init__.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/domain/tandemsource/event_class.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/domain/therapy_event.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/domain/utility.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/eventparser/__init__.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/eventparser/build_events.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/eventparser/events.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/eventparser/generic.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/eventparser/raw_event.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/eventparser/static_dicts.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/eventparser/transforms.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/eventparser/utils.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/features.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/nightscout.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/parser/__init__.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/parser/ciq_therapy_events.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/parser/tconnect.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/process.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/secret.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/sync/__init__.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/sync/basal.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/sync/bolus.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/sync/cgm.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/sync/iob.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/sync/profile.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/sync/pump_events.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/sync/tandemsource/__init__.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/sync/tandemsource/autoupdate.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/sync/tandemsource/choose_device.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/sync/tandemsource/helpers.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/sync/tandemsource/heroku_helpers.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/sync/tandemsource/process_alarm.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/sync/tandemsource/process_basal.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/sync/tandemsource/process_basal_resume.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/sync/tandemsource/process_basal_suspension.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/sync/tandemsource/process_bolus.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/sync/tandemsource/process_cartridge.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/sync/tandemsource/process_cgm_alert.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/sync/tandemsource/process_cgm_reading.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/sync/tandemsource/process_cgm_start_join_stop.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/sync/tandemsource/process_user_mode.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/util/__init__.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/util/cli.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/util/constants.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync.egg-info/SOURCES.txt +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync.egg-info/dependency_links.txt +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync.egg-info/entry_points.txt +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync.egg-info/requires.txt +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync.egg-info/top_level.txt +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tests/test_autoupdate.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tests/test_process.py +0 -0
- {tconnectsync-2.1.4 → tconnectsync-2.1.6}/tests/test_secret.py +0 -0
|
@@ -251,30 +251,33 @@ class NightscoutEntry:
|
|
|
251
251
|
return {
|
|
252
252
|
# insulin duration in hours; Nightscout JS bug requires all top-level fields to be strings
|
|
253
253
|
"dia": "%s" % (profile.insulinDuration / 60),
|
|
254
|
-
"carbratio": [
|
|
254
|
+
"carbratio": list(sorted([
|
|
255
255
|
{
|
|
256
256
|
"time": minutes_to_ns_time(segment.startTime),
|
|
257
257
|
"timeAsSeconds": segment.startTime * 60,
|
|
258
258
|
"value": segment.carbRatio / 1000 # milliunits->units
|
|
259
|
-
} for segment in profile.tDependentSegs
|
|
260
|
-
],
|
|
259
|
+
} for segment in profile.tDependentSegs if not segment.skip
|
|
260
|
+
], key=lambda x: x["timeAsSeconds"])),
|
|
261
261
|
|
|
262
262
|
"carbs_hr": NIGHTSCOUT_PROFILE_CARBS_HR_VALUE,
|
|
263
263
|
"delay": NIGHTSCOUT_PROFILE_DELAY_VALUE,
|
|
264
|
-
|
|
264
|
+
|
|
265
|
+
"sens": list(sorted([ # Correction factor / isf
|
|
265
266
|
{
|
|
266
267
|
"time": minutes_to_ns_time(segment.startTime),
|
|
267
268
|
"timeAsSeconds": segment.startTime * 60,
|
|
268
269
|
"value": segment.isf
|
|
269
|
-
} for segment in profile.tDependentSegs
|
|
270
|
-
],
|
|
271
|
-
|
|
270
|
+
} for segment in profile.tDependentSegs if not segment.skip
|
|
271
|
+
], key=lambda x: x["timeAsSeconds"])),
|
|
272
|
+
|
|
273
|
+
"basal": list(sorted([
|
|
272
274
|
{
|
|
273
275
|
"time": minutes_to_ns_time(segment.startTime),
|
|
274
276
|
"timeAsSeconds": segment.startTime * 60,
|
|
275
277
|
"value": segment.basalRate / 1000 # milliunits->units
|
|
276
278
|
} for segment in profile.tDependentSegs
|
|
277
|
-
],
|
|
279
|
+
], key=lambda x: x["timeAsSeconds"])),
|
|
280
|
+
|
|
278
281
|
"target_low": [
|
|
279
282
|
{
|
|
280
283
|
"time": "00:00",
|
|
@@ -82,7 +82,9 @@ class ProcessTimeRange:
|
|
|
82
82
|
if c.enabled():
|
|
83
83
|
logger.info("%s is enabled from features %s" % (clazz, self.features))
|
|
84
84
|
ns_entries = c.process(events, events_first_time, events_last_time)
|
|
85
|
-
|
|
85
|
+
w = c.write(ns_entries)
|
|
86
|
+
if w:
|
|
87
|
+
processed_count += w
|
|
86
88
|
else:
|
|
87
89
|
logger.info("Skipping %s, is not enabled from features %s" % (clazz, self.features))
|
|
88
90
|
|
|
@@ -95,6 +97,6 @@ class ProcessTimeRange:
|
|
|
95
97
|
else:
|
|
96
98
|
logger.info("Skipping %s, is not enabled from features %s" % (updater_class.__name__, self.features))
|
|
97
99
|
|
|
98
|
-
logger.info("Processed %d events. Last event ID seen: %d" % (processed_count, last_event_id))
|
|
100
|
+
logger.info("Processed %d events. Last event ID seen: %d" % (processed_count if processed_count else 0, last_event_id if last_event_id else -1))
|
|
99
101
|
return processed_count, last_event_id
|
|
100
102
|
|
|
@@ -8,7 +8,7 @@ from ...features import DEFAULT_FEATURES
|
|
|
8
8
|
from ... import features
|
|
9
9
|
from ...domain.tandemsource.pump_settings import PumpSettings
|
|
10
10
|
from ...parser.nightscout import (
|
|
11
|
-
NightscoutEntry
|
|
11
|
+
NightscoutEntry, ENTERED_BY
|
|
12
12
|
)
|
|
13
13
|
from ...secret import NIGHTSCOUT_PROFILE_UPLOAD_MODE
|
|
14
14
|
|
|
@@ -53,6 +53,8 @@ class UpdateProfiles:
|
|
|
53
53
|
if ns_profile_obj is None:
|
|
54
54
|
ns_profile_obj = {}
|
|
55
55
|
|
|
56
|
+
logger.info("Current Nightscout profile was authored by: %s" % (ns_profile_obj.get('enteredBy')))
|
|
57
|
+
|
|
56
58
|
diff, ns_profile_new = self.compare_profiles(pump_settings, ns_profile_obj)
|
|
57
59
|
if not diff:
|
|
58
60
|
logger.info("Pump and Nightscout profiles up to date")
|
|
@@ -145,6 +147,7 @@ class UpdateProfiles:
|
|
|
145
147
|
return False, ns_profile_obj
|
|
146
148
|
|
|
147
149
|
logger.info("New Nightscout profile object: %s", new_ns_profile)
|
|
150
|
+
new_ns_profile['enteredBy'] = ENTERED_BY
|
|
148
151
|
return True, new_ns_profile
|
|
149
152
|
|
|
150
153
|
def nightscout_profiles_identical(self, configured: dict, translated: dict) -> bool:
|
|
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.4 → tconnectsync-2.1.6}/tconnectsync/sync/tandemsource/process_basal_resume.py
RENAMED
|
File without changes
|
{tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/sync/tandemsource/process_basal_suspension.py
RENAMED
|
File without changes
|
|
File without changes
|
{tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/sync/tandemsource/process_cartridge.py
RENAMED
|
File without changes
|
{tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/sync/tandemsource/process_cgm_alert.py
RENAMED
|
File without changes
|
{tconnectsync-2.1.4 → tconnectsync-2.1.6}/tconnectsync/sync/tandemsource/process_cgm_reading.py
RENAMED
|
File without changes
|
|
File without changes
|
{tconnectsync-2.1.4 → tconnectsync-2.1.6}/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
|