train_all() now raises RainUnavailableError when use_rain=True and the
Open-Meteo history cannot be loaded, instead of logging a warning and
writing gauge-only (v2) bundles over the deployed v3 set -- which is what
the 2026-09-01 server retrain did unnoticed. --no-rain remains the explicit
way to get v2. CLI exits 2 with a one-line error. Three tests cover the
guard, the opt-out, and the v3 happy path.
scripts/retrain.sh trains into models/.staging, refuses to promote unless
metrics.json shows hgb-v3+ and >=14 trained stations, then renames bundles
into place (previous generation kept in models/.previous). No API restart:
predict.py reloads by mtime on the hourly precompute.
water-monitor-retrain.{service,timer}: 1st of each month 03:30, Persistent,
OMP_NUM_THREADS=4, Nice=15, same sandbox as the API unit. install.sh now
does `uv sync` into .venv (one env rule; removes a stale venv/) and enables
the timer. water-monitor.service in the repo matched neither the deployed
unit nor the uv env; it now does (run.py --web-api, .venv, EnvironmentFile).
176 lines
2.4 KiB
Plaintext
176 lines
2.4 KiB
Plaintext
# Python
|
|
__pycache__/
|
|
*.py[cod]
|
|
*$py.class
|
|
*.so
|
|
.Python
|
|
build/
|
|
develop-eggs/
|
|
dist/
|
|
downloads/
|
|
eggs/
|
|
.eggs/
|
|
lib/
|
|
lib64/
|
|
parts/
|
|
sdist/
|
|
var/
|
|
wheels/
|
|
share/python-wheels/
|
|
*.egg-info/
|
|
.installed.cfg
|
|
*.egg
|
|
PIPFILE.lock
|
|
|
|
# Virtual environments
|
|
.env
|
|
.venv
|
|
env/
|
|
venv/
|
|
ENV/
|
|
env.bak/
|
|
venv.bak/
|
|
|
|
# IDE
|
|
.vscode/
|
|
.idea/
|
|
*.swp
|
|
*.swo
|
|
*~
|
|
|
|
# Kiro IDE (keep local only)
|
|
.kiro/
|
|
|
|
# Logs
|
|
*.log
|
|
logs/
|
|
water_monitor.log
|
|
water_monitor_performance.log
|
|
|
|
# Database files
|
|
*.db
|
|
*.sqlite
|
|
*.sqlite3
|
|
water_levels.db
|
|
demo_water_sqlite.db
|
|
|
|
# Configuration files with secrets
|
|
.env.local
|
|
.env.production
|
|
config.local.py
|
|
|
|
# Docker
|
|
.dockerignore
|
|
|
|
# OS
|
|
.DS_Store
|
|
.DS_Store?
|
|
._*
|
|
.Spotlight-V100
|
|
.Trashes
|
|
ehthumbs.db
|
|
Thumbs.db
|
|
|
|
# Temporary files
|
|
*.tmp
|
|
*.temp
|
|
temp/
|
|
tmp/
|
|
|
|
# Coverage reports
|
|
htmlcov/
|
|
.tox/
|
|
.nox/
|
|
.coverage
|
|
.coverage.*
|
|
.cache
|
|
nosetests.xml
|
|
coverage.xml
|
|
*.cover
|
|
*.py,cover
|
|
.hypothesis/
|
|
.pytest_cache/
|
|
cover/
|
|
|
|
# Jupyter Notebook
|
|
.ipynb_checkpoints
|
|
|
|
# pyenv
|
|
.python-version
|
|
|
|
# pipenv
|
|
Pipfile.lock
|
|
|
|
# PEP 582
|
|
__pypackages__/
|
|
|
|
# Celery
|
|
celerybeat-schedule
|
|
celerybeat.pid
|
|
|
|
# SageMath parsed files
|
|
*.sage.py
|
|
|
|
# Environments
|
|
.env
|
|
.env.local
|
|
.env.development.local
|
|
.env.test.local
|
|
.env.production.local
|
|
|
|
# mypy
|
|
.mypy_cache/
|
|
.dmypy.json
|
|
dmypy.json
|
|
|
|
# Pyre type checker
|
|
.pyre/
|
|
|
|
# pytype static type analyzer
|
|
.pytype/
|
|
|
|
# Cython debug symbols
|
|
cython_debug/
|
|
|
|
# Docker volumes
|
|
vm_data/
|
|
grafana_data/
|
|
# Runtime station config (persisted CRUD); bundled default lives in src/data/
|
|
/stations.json
|
|
|
|
# Ruflo local secrets and runtime data
|
|
.env.*.local
|
|
.claude-flow/data/
|
|
.claude-flow/logs/
|
|
.claude-flow/sessions/
|
|
|
|
# Trained flood-forecast model artifacts (produced on the server, ~100 MB; see docs/FLOOD_FORECASTING.md)
|
|
models/*.joblib
|
|
models/cache/
|
|
models/metrics.json
|
|
# scripts/retrain.sh working dirs (staging + one rollback generation)
|
|
models/.staging/
|
|
models/.previous/
|
|
|
|
# Playwright MCP browser artifacts (screenshots/snapshots from agent sessions)
|
|
.playwright-mcp/
|
|
|
|
# Agent tooling state (whole dirs; the entries above only covered subpaths)
|
|
.claude/
|
|
.claude-flow/
|
|
.swarm/
|
|
# local MCP server wiring, not project config
|
|
.mcp.json
|
|
# CLAUDE.md is intentionally NOT ignored — track it if you want the agent
|
|
# conventions shared with collaborators; it is untracked today.
|
|
|
|
# Model evaluation output (regenerate with scripts/evaluate_variants.py)
|
|
models/eval_*.json
|
|
|
|
# Editor/merge leftovers and stray shell-redirect artifacts. The repo root once
|
|
# collected 56 zero-byte files named after fragments of shell commands.
|
|
*.orig
|
|
*.rej
|
|
*.bak
|
|
*~
|