energy_data_retrieval.catalogue_common#
Shared typed catalogue validation and immutable snapshot encoding.
Extracted from the data-center catalogue; sector-specific rules remain local.
- energy_data_retrieval.catalogue_common.canonical_digest(value)[source]#
Hash exactly canonical JSON bytes without materializing the whole encoding.
- Parameters:
value (Any)
- Return type:
str
- energy_data_retrieval.catalogue_common.validate_common(row, sources, schema)[source]#
Enforce typed fields, units, dated provenance and null quarantines.
- Parameters:
row (dict[str, Any])
sources (dict[str, Any])
schema (dict[str, Any])
- Return type:
None
- energy_data_retrieval.catalogue_common.write_snapshot(output, rows, sources, spec, catalogue, summaries)[source]#
Publish a validated, sorted JSONL projection as typed Zstandard Parquet.
- Parameters:
output (Path)
rows (list[dict[str, Any]])
sources (dict[str, Any])
spec (dict[str, Any])
catalogue (str)
summaries (dict[str, Any])
- Return type:
dict[str, Any]