Federate official Belgium data sources
GeoIntel release gates / Compile, test, contracts and builds (push) Canceled after 0s
GeoIntel release gates / Python and npm vulnerability policy (push) Canceled after 0s
GeoIntel release gates / GIS image, SBOM and container scan (push) Canceled after 0s

This commit is contained in:
Codex
2026-07-19 01:34:39 +02:00
parent 33bcd0f3bd
commit 50897c3473
37 changed files with 2179 additions and 186 deletions
@@ -205,6 +205,42 @@ def test_preflight_reconciles_spatial_and_unlocated_population(tmp_path: Path) -
assert len(manifest["schemas"]["geometry_schema_sha256"]) == 64
def test_preflight_supports_the_complete_national_scope() -> None:
result = PREFLIGHT.validate_statbel_release(
year=2025,
layout="new",
population_content=population_archive(),
population_url=POPULATION_URL,
geometry_content=geometry_archive(),
geometry_url=GEOMETRY_URL,
scope=PREFLIGHT.GEOGRAPHIC_SCOPES["belgium"],
)
accounting = result.manifest["scope_accounting"]
assert accounting["scope_key"] == "belgium"
assert accounting["member_count"] == 2
assert accounting["member_nis_codes"] == ["13008", "13025"]
assert accounting["spatial_population_total"] == 240
assert accounting["unlocated_population_total"] == 3
assert accounting["accounted_population_total"] == 243
def test_national_preflight_rejects_an_unscoped_baseline(tmp_path: Path) -> None:
with pytest.raises(PREFLIGHT.StatbelPreflightError) as exc_info:
PREFLIGHT.validate_statbel_release(
year=2025,
layout="new",
population_content=population_archive(),
population_url=POPULATION_URL,
geometry_content=geometry_archive(),
geometry_url=GEOMETRY_URL,
scope=PREFLIGHT.GEOGRAPHIC_SCOPES["belgium"],
baseline_snapshot=baseline_snapshot(tmp_path / "baseline.geojson"),
)
assert exc_info.value.code == "STATBEL_BASELINE_SCOPE_MISMATCH"
def test_preflight_reports_bounded_topology_repairs(tmp_path: Path) -> None:
result = validate(tmp_path, geometry_content=geometry_archive(repairable_invalid=True))