Commit Graph
13 Commits
Author SHA1 Message Date
willemjanandClaude Sonnet 5 fe6a471f17 add PDF export (FR10)
pdf_export.py builds a PDF report (summary stats, AGP chart, hypo/hyper
event summaries) via fpdf2 + matplotlib rather than plotly's kaleido, to
avoid bundling a Chromium build into the image just for this. The Export
page lets the user pick which sections to include and a date range, then
download the result to send to the hospital team.

This completes all ten functional requirements in
docs/requirements-reporting.md.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-07-26 21:10:46 +02:00
willemjanandClaude Sonnet 5 9929f44daa add Trends page: GMI trend, overnight/daytime, weekday pattern, bolus, site-age (FR7, FR8)
reporting.py gains overnight_daytime_split, day_of_week_pattern,
bolus_stats, and site_interval_stats. The last two are explicitly scoped
to bolus-only insulin (no basal reconstruction) since that needs the
Nightscout profile, which is the separate profile-tuning feature's
territory — documented as a caveat in both the UI and the design doc.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-07-26 21:06:06 +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
willemjanandClaude Sonnet 5 1207ff536f add Samenvatting and AGP Profiel pages (FR2, FR3, FR9)
Wires reporting.py's stats into two new pages: a summary panel (data
completeness, GMI, %CV, 5-band time-in-range vs. consensus targets) and
the standard AGP percentile chart (5th-95th and 25th-75th bands plus
median, aggregated by time-of-day across the selected period).

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-07-26 20:09:25 +02:00
willemjanandClaude Sonnet 5 3ef9a7666a add reporting foundation: multipage nav, auth gate, date-range fetch
First increment of the clinical reporting feature (see
docs/requirements-reporting.md and docs/design-reporting.md): moves the
existing live view to pages/1_Live.py, adds a password gate since the
dashboard URL will be shared with the diabetes team, adds
fetch_entries_range/fetch_treatments_range for multi-day report queries,
and adds reporting.py with the core clinical calculations (GMI, %CV,
5-band time-in-range, hypo/hyper event detection per the Battelino et al.
2019 persistence rule). No report pages wired up yet — that's next.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-07-26 20:00:48 +02:00
willemjanandClaude Sonnet 5 7379f6be8c pin trivy-action to the last docker-based release
@master resolves to a version that installs Trivy via a nested
setup-trivy composite action, which does an actions/checkout against
github.com with a token. On Gitea's act_runner that fails with "Input
required and not supplied: token" even when the token is explicitly
set to an empty string (act_runner doesn't distinguish empty from
unset). v0.26.0 introduced that composite/setup-trivy split; v0.25.0
is the last release that ships as a self-contained Docker image with
Trivy already baked in, so it needs no token at all.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-07-26 14:54:43 +02:00
willemjanandClaude Sonnet 5 e0d6b79e68 use the working duckdns hostname for the registry, fix trivy github auth
gitea.zb.local resolves but is plain HTTP, which Docker refuses as a
registry without daemon-level insecure-registry config. gitea.zb.lan
resolves but nothing answers there yet (proxy not configured for it).
gitea.zb-kw.duckdns.org is confirmed reachable end-to-end over HTTPS,
including the registry v2 API, from both the runner and the deploy
target, so use that consistently. Also fix aquasecurity/trivy-action's
token-setup-trivy input, which defaults to gitea.token and gets
rejected by github.com when it tries to clone the install script.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-07-25 22:02:53 +02:00
willemjan d6107515c0 updated sonarqube scan action version 2026-07-25 21:22:18 +02:00
willemjanandClaude Sonnet 5 566a817365 fix pytest module discovery in CI
CI invokes the pytest console script directly (pytest tests/ -v), which
unlike `python -m pytest` does not add the repo root to sys.path. That
broke imports of the top-level data_processing/nightscout_client
modules from the test files. Add pythonpath = ["."] so it works
regardless of invocation style.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-07-25 21:09:48 +02:00
willemjanandClaude Sonnet 5 e805dc9194 fix registry hostname and load .env automatically
gitea.thuis.local doesn't resolve on this network; the real internal
Gitea hostname is gitea.zb.local. Also load .env via python-dotenv so
the app works the same under PowerShell as bash, and add .dockerignore
so .env never ends up baked into the image.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-07-25 09:29:43 +02:00
willemjan 60735de445 added getting data from nightscout 2026-07-25 08:54:08 +02:00
willemjan c02110a82b first commit 2026-07-24 07:49:59 +02:00
willemjan edb261ee5c Initial commit 2026-07-23 14:38:33 +00:00