energy_data_retrieval.wind_catalogue.epe#

Checksum-pinned EPE-hosted SIGA observations, without lifecycle promotion.

energy_data_retrieval.wind_catalogue.epe.verify_capture(batch, directory)[source]#

Reparse checksum-pinned original pages and both ID queries without writes.

The reviewed ledger remains the acceptance boundary. This check additionally proves its candidate transcription agrees with the retained original bytes. It does not establish the accuracy of the registry or reconcile farm scope.

Parameters:
  • batch (dict[str, Any])

  • directory (Path)

Return type:

None

energy_data_retrieval.wind_catalogue.epe.ceg_key(value)[source]#

Compare CEG suffix zero padding only; never collapse revisions or nuclei.

Parameters:

value (str)

Return type:

tuple[str, int, int]

energy_data_retrieval.wind_catalogue.epe.parse_partition(pages, *, sha256, expected_ids, confirmed_ids, state, retrieved_at)[source]#

Validate complete ID-addressed pages and retain original SIGA quantities.

The two independent ID queries must agree. The layer’s dataset date is not retrieval time or an assertion of present operation. kW values are divided by 1000 separately; physical guarantee is not installed capacity. Coordinates returned by the service in EPSG:4326 are observations of unknown accuracy.

Parameters:
  • pages (list[bytes])

  • sha256 (list[str])

  • expected_ids (list[int])

  • confirmed_ids (list[int])

  • state (str)

  • retrieved_at (str)

Return type:

list[dict[str, Any]]

energy_data_retrieval.wind_catalogue.epe.reconcile(candidates, existing, *, source_id, identity_source_id, now)[source]#

Attach unique WRI numeric-ID plus exact-name matches as dated observations.

Neither name-only matches nor multiple CEG revisions are accepted. Existing CEGs are checked without changing their spelling. Replays are idempotent; changed observations under the same source ID are rejected.

Parameters:
  • candidates (list[dict[str, Any]])

  • existing (list[dict[str, Any]])

  • source_id (str)

  • identity_source_id (str)

  • now (str)

Return type:

tuple[list[dict[str, Any]], list[dict[str, Any]]]

energy_data_retrieval.wind_catalogue.epe.audit_coverage(partitions, *, expected_ids, confirmed_ids, unknown_state_ids)[source]#

Check saved partition identities against a fresh complete service roster.

An empty partition is an explicit empty ID list, never an absent query or null response. This proves ID coverage at capture time only, not accuracy, project acceptance, lifecycle completeness, or a current operating census.

Parameters:
  • partitions (dict[str, list[int]])

  • expected_ids (list[int])

  • confirmed_ids (list[int])

  • unknown_state_ids (list[int])

Return type:

dict[str, Any]

energy_data_retrieval.wind_catalogue.epe.parse_id_response(data, sha256)[source]#

Read a checksum-pinned ArcGIS ID response; errors/null are not zero.

Parameters:
  • data (bytes)

  • sha256 (str)

Return type:

list[int]