Compare commits

..
Author SHA1 Message Date
tudor 4a8e798c64 Merge pull request 'feat(api): compare endpoint enrichment — supplementary blocks, national averages, benchmarks, report-card labels' (#34) from feat/compare-api-enrichment into main
Stage (build -> staging -> E2E gate) / Build Backend (FastAPI) (push) Successful in 24s
Stage (build -> staging -> E2E gate) / Build Frontend (Next.js) (push) Successful in 57s
Stage (build -> staging -> E2E gate) / Build Pipeline (Meltano + dbt + Airflow) (push) Successful in 1m5s
Stage (build -> staging -> E2E gate) / Deploy to Staging (push) Successful in 1s
Stage (build -> staging -> E2E gate) / E2E Journeys against Staging (push) Failing after 4m49s
Reviewed-on: #34
2026-07-13 21:58:51 +00:00
-9
View File
@@ -706,15 +706,6 @@ async def compare_schools(
"phase": latest.get("phase", ""), "phase": latest.get("phase", ""),
"attainment_8_score": float(latest["attainment_8_score"]) if pd.notna(latest.get("attainment_8_score")) else None, "attainment_8_score": float(latest["attainment_8_score"]) if pd.notna(latest.get("attainment_8_score")) else None,
"rwm_expected_pct": float(latest["rwm_expected_pct"]) if pd.notna(latest.get("rwm_expected_pct")) else None, "rwm_expected_pct": float(latest["rwm_expected_pct"]) if pd.notna(latest.get("rwm_expected_pct")) else None,
# GIAS facts the compare "Who goes there" section needs
# (same fields the detail endpoint exposes)
"religious_denomination": convert_to_native(latest.get("religious_denomination")),
"age_range": convert_to_native(latest.get("age_range")),
"gender": convert_to_native(latest.get("gender")),
"has_sixth_form": convert_to_native(latest.get("has_sixth_form")),
"capacity": convert_to_native(latest.get("capacity")),
"gias_total_pupils": convert_to_native(latest.get("gias_total_pupils")),
"trust_name": convert_to_native(latest.get("trust_name")),
}, },
"yearly_data": clean_for_json(school_data), "yearly_data": clean_for_json(school_data),
**supplementary_by_urn.get(urn, dict(_EMPTY_SUPPLEMENTARY)), **supplementary_by_urn.get(urn, dict(_EMPTY_SUPPLEMENTARY)),