From 13d17287d86e100a71fa2f32dd63e8a15a858015 Mon Sep 17 00:00:00 2001 From: Gerald Fruhmann Date: Tue, 18 Aug 2026 11:20:55 +0200 Subject: [PATCH 1/2] fix(ml): cast Decimal DB value to float in sleep consistency calculation --- ml-service/src/models/sleep_metrics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ml-service/src/models/sleep_metrics.py b/ml-service/src/models/sleep_metrics.py index 3eecb35..dbffd3a 100644 --- a/ml-service/src/models/sleep_metrics.py +++ b/ml-service/src/models/sleep_metrics.py @@ -11,7 +11,7 @@ def _std_hours_circular(hours: list[float]) -> float: """ if len(hours) < 2: return 0.0 - angles = [h / 24.0 * 2 * math.pi for h in hours] + angles = [float(h) / 24.0 * 2 * math.pi for h in hours] sin_mean = sum(math.sin(a) for a in angles) / len(angles) cos_mean = sum(math.cos(a) for a in angles) / len(angles) R = math.sqrt(sin_mean**2 + cos_mean**2) From 7187316cd76daef2dd814c5e9f34384570e0daa1 Mon Sep 17 00:00:00 2001 From: Gerald Fruhmann Date: Tue, 18 Aug 2026 11:27:55 +0200 Subject: [PATCH 2/2] chore(infra): switch api network from proxy to gateway-garmin homelab network renamed; garmin.home.lab is routed via gateway-garmin. --- docker-compose.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 21b371c..85c5168 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -88,7 +88,7 @@ services: condition: service_completed_successfully networks: - internal - - proxy + - gateway-garmin healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8000/ready"] interval: 30s @@ -231,5 +231,6 @@ volumes: networks: internal: driver: bridge - proxy: - external: true # must exist: docker network create proxy + gateway-garmin: + external: true + name: gateway-garmin