9 Commits
Author SHA1 Message Date
dasemu 2e40eee95a Merge branch 'feature/weather-sky-snow-type' 2026-03-17 17:57:28 +01:00
dasemu 70e3a1cf92 feat(weather): add sky conditions and snow type to predictions
Add WMO weather_code from Open-Meteo to derive sky conditions
(sunny/cloudy/foggy/storm) and infer snow type (powder/hard/wet/spring)
from temperature and snowfall data. Both fields flow through the full
pipeline: weather API, hybrid predictor, SQLite storage, REST API
schemas, Telegram bot messages, and scheduler tasks.
2026-03-17 17:54:43 +01:00
dasemu 61b4d8334d feat(bot): add daily push notification subscription system
Add /suscribir and /desuscribir commands to the Telegram bot so users
can opt in to receive the next-day prediction automatically at 20:00
when the extended task fires. Subscribers are persisted in a new
notification_subscribers SQLite table with soft-delete semantics.
2026-03-17 17:46:02 +01:00
dasemu 5e2a22340f refactor(crowd_analysis): simplify table + upgrade YOLO + add regional holidays
- Remove internal YOLO counts (cars/people/buses/total_vehicles) from crowd_analysis table
- Keep only crowd_density and confidence_scores for persistence (no ML training impact)
- Upgrade from YOLOv8n to YOLOv11m for better person detection (fewer false positives)
- Add regional holidays: Día de Castilla y León (4/23), Santiago Apóstol (7/25, shared with Galicia)
- Add Easter Monday (moveable, 2018-2035) for Castilla y León and Galicia
- Update all tests to match simplified crowd_analysis schema

Tests: all 38 SQLite/crowd_analyzer tests + 13 feature tests passing.
2026-03-13 18:03:15 +01:00
dasemu f6a65f41d9 feat: unified architecture and webcam archive optimization
- Refactor backend into a single process (FastAPI + APScheduler + Telegram Bot)
- Implement 'current_forecasts' and 'past_forecasts' architecture in storage
- Optimize historical webcam collector with date range discovery for Pajares, San Isidro, and Fuentes
- Clean up legacy scripts and tables (prediction_runs, prediction_stations)
- Update tests and operations documentation
2026-03-13 11:56:59 +01:00
dasemu e6add1b727 fix(core): clean predictor debt 2026-03-13 10:51:29 +01:00
dasemu 9d97afe538 feat(api): add FastAPI backend with JWT authentication
REST API serving forecast data with HS256 JWT auth (14-day tokens).
Public: /health, /auth/register, /auth/login.
Protected: /stations, /forecast, /forecast/history, /forecast/{id}, /status.
Includes APScheduler for periodic forecasts and Telegram bot subprocess.
2026-03-13 09:36:18 +01:00
dasemu 2a34054399 feat(bot): add horizon commands 2026-03-13 08:40:55 +01:00
dasemu 9c8ba03574 feat(storage): migrate project to sqlite 2026-03-13 06:50:18 +01:00