transitio.report.build_report

Contents

transitio.report.build_report#

transitio.report.build_report(validation, *, hosted=None, provenance=None)#

Merge a validate_feed result with an optional hosted report.

Parameters:
  • validation (dict) – The transitio.validate_feed result.

  • hosted (dict, optional) – A hosted canonical-validator JSON report for the same dataset version (MobilityDatabase.validation_report); its notice groups are merged by code.

  • provenance (dict, optional) – Provenance block (feed/dataset IDs, source URL, checksums, retrieval timestamp) — typically the download sidecar contents — embedded verbatim for reproducibility.

Returns:

{"summary": {...}, "notices": [...]}. Each notice group carries code, severity, source (local/hosted/both), totalNotices (local occurrences), hostedTotalNotices when the hosted report has the same code, and up to 50 sampleNotices context mappings.

Return type:

dict