feat(provenance): govern source snapshots and data inputs
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import importlib.util
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[2]
|
||||
SCRIPT = ROOT / "scripts" / "run_accuracy_phase2_foundation_audit.py"
|
||||
SPEC = importlib.util.spec_from_file_location("accuracy_phase2_foundation_audit", SCRIPT)
|
||||
assert SPEC is not None and SPEC.loader is not None
|
||||
MODULE = importlib.util.module_from_spec(SPEC)
|
||||
SPEC.loader.exec_module(MODULE)
|
||||
|
||||
|
||||
def test_phase2_foundation_audit_enumerates_exact_source_and_contract_policies() -> None:
|
||||
payload = MODULE.collect()
|
||||
|
||||
assert payload["phase"] == "P2"
|
||||
assert payload["migration_revision"] == "202608010001"
|
||||
assert payload["source_registry"]["definition_count"] >= 40
|
||||
assert payload["source_registry"]["required_building_policy"] == {
|
||||
"grb_primary_building_validation": "primary",
|
||||
"buildings_register_classification": "authoritative",
|
||||
"sentinel_2_classification": "contextual",
|
||||
"dhmv_classification": "authoritative",
|
||||
"osm_ground_truth_allowed": False,
|
||||
}
|
||||
assert {(item["key"], item["version"]) for item in payload["data_contracts"]} == {
|
||||
("geointel.vector.geojson", "1.0.0"),
|
||||
("geointel.raster.geotiff", "1.0.0"),
|
||||
("geointel.label.yolo", "1.0.0"),
|
||||
("geointel.label.yolo", "1.1.0"),
|
||||
("geointel.model.pytorch", "1.0.0"),
|
||||
}
|
||||
Reference in New Issue
Block a user