thermograph/backend/tests
Emi Griffith abf37e6376
All checks were successful
PR build (required check) / changes (pull_request) Successful in 7s
secrets-guard / encrypted (pull_request) Successful in 5s
PR build (required check) / build-frontend (pull_request) Has been skipped
PR build (required check) / validate-observability (pull_request) Has been skipped
PR build (required check) / build-backend (pull_request) Successful in 44s
PR build (required check) / gate (pull_request) Successful in 2s
Add value-drift check comparing NASA vs Open-Meteo (ERA5)
backend/drift_check.py quantifies the migration's data impact by fetching both
live history sources (NASA POWER primary + the Open-Meteo/ERA5 fallback) for a
sample of cells and reporting, per variable: mean-absolute-difference / bias / max
(raw drift) and grade-band divergence (the share of days whose graded band actually
changes). Since Open-Meteo is ERA5, this doubles as a fidelity check for the ERA5
seed.

Because grades are percentiles within each source's own distribution, a uniform
bias moves MAD but not grades — so the two numbers are read together. Open-Meteo is
kept as a dormant fallback (not deleted), so both sources stay fetchable for this
comparison. The comparison logic is unit-tested; the per-cell fetch runs on a
networked box (python drift_check.py [--limit N] [--days N]).
2026-07-23 06:33:54 -07:00
..
accounts Subtree-merge thermograph-backend (origin/main) into backend/ 2026-07-22 22:01:11 -07:00
api Subtree-merge thermograph-backend (origin/main) into backend/ 2026-07-22 22:01:11 -07:00
core Subtree-merge thermograph-backend history-meteostat-gusts into backend/ 2026-07-22 22:26:03 -07:00
data Flip recent/forecast leg off Open-Meteo (NASA past + MET Norway forward) 2026-07-23 06:32:31 -07:00
notifications Subtree-merge thermograph-backend (origin/main) into backend/ 2026-07-22 22:01:11 -07:00
web Subtree-merge thermograph-backend geocode-local into backend/ 2026-07-22 22:24:31 -07:00
conftest.py Subtree-merge thermograph-backend (origin/main) into backend/ 2026-07-22 22:01:11 -07:00
test_drift_check.py Add value-drift check comparing NASA vs Open-Meteo (ERA5) 2026-07-23 06:33:54 -07:00
test_indexnow.py Subtree-merge thermograph-backend (origin/main) into backend/ 2026-07-22 22:01:11 -07:00
test_seed_era5.py Subtree-merge thermograph-backend era5-seed into backend/ 2026-07-22 22:26:27 -07:00
test_warm_cities.py Subtree-merge thermograph-backend (origin/main) into backend/ 2026-07-22 22:01:11 -07:00