willemjan c54dcf616a
willemjan/glucose-dashboard/pipeline/pr-feature/insulin-profile This commit looks good
Add basal/bolus/carb/target overlays to the Live and Dagoverzicht charts
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
2026-07-24 07:49:59 +02:00
2026-08-10 23:19:27 +02:00
2026-07-26 21:10:46 +02:00
2026-07-24 07:49:59 +02:00

glucose-dashboard

Dashboard van glucosedata, live opgehaald uit een Nightscout-instantie. Meerdere pagina's (zie zijbalk): een rollend live-overzicht en een set klinische rapportagepagina's (zie docs/requirements-reporting.md en docs/design-reporting.md).

Instellen

  1. Zorg voor een draaiende Nightscout-instantie en een API-token (Admin Tools

    Manage Tokens in Nightscout — geef het token minimaal readable-rechten) of het klassieke API secret.

  2. Kopieer .env.example naar .env en vul NIGHTSCOUT_URL, één van de twee auth-opties, en DASHBOARD_PASSWORD_HASH in (zie het voorbeeldbestand voor hoe je die hash genereert — de dashboard-URL wordt gedeeld met het diabetesteam, dus elke pagina zit achter een wachtwoord). app.py laadt .env zelf in (via python-dotenv), dus dit werkt hetzelfde onder PowerShell, cmd of bash — je hoeft de variabelen niet zelf in je shell te zetten.

  3. Lokaal draaien:

    uv venv
    uv pip install -r requirements.txt --python .venv
    .venv\Scripts\streamlit run app.py
    
  4. Met Docker Compose:

    docker compose up -d
    

    docker-compose.yml leest .env via env_file — dat bestand wordt niet meegecommit (zie .gitignore).

Tests en lint

pytest tests/ -v
ruff check .
S
Description
dashboard van glucose data
Readme
322 KiB
Languages
Python 99.8%
Dockerfile 0.2%