Commit Graph
7 Commits
Author SHA1 Message Date
willemjan f7a0b94a54 lint fix
CI/CD / test (push) Successful in 24s
CI/CD / sonarqube (push) Successful in 21s
CI/CD / build-and-scan (push) Successful in 52s
CI/CD / deploy (push) Successful in 3s
willemjan/glucose-dashboard/pipeline/head This commit looks good
2026-09-06 14:44:50 +02:00
willemjan 95b3aff310 Updated charts for glucose data and profile chart
CI/CD / test (push) Failing after 6s
CI/CD / sonarqube (push) Skipped
CI/CD / build-and-scan (push) Skipped
CI/CD / deploy (push) Skipped
2026-09-06 14:43:19 +02:00
willemjan d33516e2a1 Avoid pandas Timedelta(days=1) deprecation warning
pd.Timedelta(days=1) triggers a DeprecationWarning about NumPy's
"generic" timedelta unit in this pandas version; pd.Timedelta(1, unit="D")
is equivalent and warning-free.
2026-09-05 22:38:07 +02:00
willemjan c54dcf616a Add basal/bolus/carb/target overlays to the Live and Dagoverzicht charts
willemjan/glucose-dashboard/pipeline/pr-feature/insulin-profile This commit looks good
Overlay the full insulin picture onto the interactive glucose charts:
basal rate as a semi-transparent step-area (profile schedule overridden
by active temp basal), bolus doses as size-scaled dots split into
food/correction/SMB categories (food and correction labeled with units,
SMB left unlabeled), carbs as bars, and the pump's target glucose as a
line — each with its own color, alpha, and legend entry. Shared trace-
building helpers live in ui_common.py so both pages (and the PDF report
in a follow-up PR) render identically.

Builds on the pump profile work in #29 (profile_data.py, load_profile()).
2026-09-05 22:30:10 +02:00
willemjan 00fb81b283 Add clinical threshold lines to AGP/Dagoverzicht charts, TIR stacked bar to Samenvatting
Closes gitea #14, #15.
2026-08-01 22:26:26 +02:00
willemjan 29d20ca441 fix: Nightscout API silently truncated multi-day fetches to ~3-4 days
_entries_since/_treatments_since requested a single page via `count`,
but Nightscout's /api/v1/entries and /api/v1/treatments ignore a large
`count` and cap the response around ~1150/~700 documents regardless of
how far back the requested period goes. Every report page relying on
fetch_entries_range/fetch_treatments_range (7/14/30/90-day selectors)
was silently only getting the most recent ~3-4 days, no matter the
selected period.

Fixed by paginating with `find[date][$lte]` cursors in a new
_paginated_get(), walking back until the requested `since` boundary is
reached or the server returns a short/empty page (= genuinely no more
data, confirmed by manually paginating against the real instance:
entries go back 50+ days, treatments only ~4 days on this install).

Also added reporting.completeness_warning(), shared by the interactive
pages (via ui_common.render_completeness_warning) and the PDF export,
that distinguishes "a structural gap at the start of the period" (data
wasn't fetched/available) from "scattered gaps below the clinical AGP
coverage threshold" (Danne et al. 2017) — the previous single generic
"X% sensor coverage" message read as a CGM/sensor problem even when
the real cause was this fetch bug.
2026-07-31 14:21:35 +02:00
willemjanandClaude Sonnet 5 04c5f521fe add Dagoverzicht, Hypo Events, and Hyper Events pages (FR4, FR5, FR6)
Dagoverzicht stacks one glucose trace per calendar day (small multiples
via a shared 0-24h x-axis). The two event pages share a new
render_event_level() helper in ui_common.py so Level 1/Level 2 hypo and
hyper are rendered identically: count/avg/longest/events-per-week
metrics, a time-of-day histogram, and a table of individual events.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-07-26 20:13:38 +02:00