Use full-area fast path for regional history
This commit is contained in:
@@ -23,6 +23,7 @@ FULL_AREA_CLIPPED_OPERATOR_TOOLS = {
|
||||
"provision_official_landuse_timeseries.py",
|
||||
"provision_regional_grb_buildings.py",
|
||||
"provision_regional_grb_context.py",
|
||||
"provision_regional_historical_landuse.py",
|
||||
"provision_waterinfo_station_history.py",
|
||||
"provision_mol_bwk_natura2000.py",
|
||||
"provision_agricultural_parcel_history.py",
|
||||
|
||||
@@ -232,6 +232,15 @@ def test_full_area_fast_path_requires_matching_area_and_clipped_operator_provena
|
||||
source="manual",
|
||||
source_metadata={"geometry_clipped_to_area": True},
|
||||
)
|
||||
regional_historical = Dataset(
|
||||
id=uuid4(),
|
||||
project_id=project_id,
|
||||
area_id=area_id,
|
||||
name="Regional historical buildings",
|
||||
dataset_type="vector",
|
||||
source="operator_official_import",
|
||||
provenance_metadata={"operator_tool": "provision_regional_historical_landuse.py"},
|
||||
)
|
||||
untrusted = Dataset(
|
||||
id=uuid4(),
|
||||
project_id=project_id,
|
||||
@@ -243,6 +252,7 @@ def test_full_area_fast_path_requires_matching_area_and_clipped_operator_provena
|
||||
|
||||
assert VectorFeatureService.can_use_full_area_fast_path(trusted, area_id) is True
|
||||
assert VectorFeatureService.can_use_full_area_fast_path(explicit, area_id) is True
|
||||
assert VectorFeatureService.can_use_full_area_fast_path(regional_historical, area_id) is True
|
||||
assert VectorFeatureService.can_use_full_area_fast_path(untrusted, area_id) is False
|
||||
assert VectorFeatureService.can_use_full_area_fast_path(trusted, uuid4()) is False
|
||||
assert VectorFeatureService.can_use_full_area_fast_path(trusted, None) is False
|
||||
|
||||
@@ -226,9 +226,11 @@ def test_upload_contract_is_regional_temporal_and_partition_audited(tmp_path: Pa
|
||||
assert data["observed_at"] == "1969-01-01T00:00:00Z"
|
||||
assert source_metadata["member_count"] == 28
|
||||
assert source_metadata["partitioned_source_audit"] is True
|
||||
assert source_metadata["geometry_clipped_to_area"] is True
|
||||
assert source_metadata["identity_stable"] is False
|
||||
assert provenance["partition_count"] == 28
|
||||
assert provenance["raw_source_responses_retained"] is True
|
||||
assert provenance["geometry_clipped_to_area"] is True
|
||||
|
||||
|
||||
def test_regional_historical_operator_is_packaged_and_release_checked() -> None:
|
||||
|
||||
@@ -561,6 +561,7 @@ def upload_snapshot(
|
||||
"member_nis_codes": list(scope.nis_codes),
|
||||
"partitioned_source_audit": True,
|
||||
"coverage_complete": bool(manifest["coverage_complete"]),
|
||||
"geometry_clipped_to_area": True,
|
||||
"empty_partition_nis_codes": manifest["empty_partitions"],
|
||||
"attribution": ATTRIBUTION,
|
||||
"source_catalog_url": SOURCE_CATALOG_URL,
|
||||
@@ -586,6 +587,7 @@ def upload_snapshot(
|
||||
"partition_identity_sha256": manifest["partition_identity_sha256"],
|
||||
"combined_output_sha256": manifest["output_sha256"],
|
||||
"raw_source_responses_retained": True,
|
||||
"geometry_clipped_to_area": True,
|
||||
"geometry_simplification_tolerance_degrees": simplify_tolerance_degrees,
|
||||
"generated_at": manifest["generated_at"],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user