hydromodpy.results.export.prov#

W3C PROV-O JSON-LD lineage for HydroModPy simulations.

The exporter walks the catalog graph simulation -> tracked_files -> provenance and emits a PROV-O document (https://www.w3.org/TR/prov-o/) that maps:

  • the simulation itself onto a prov:Activity (a CreateAction for schema.org compatibility),

  • every input file onto a prov:Entity used by the activity,

  • every fetch / loader as an upstream prov:Activity (wasGeneratedBy) that produced the input,

  • every output asset onto a prov:Entity wasGeneratedBy the simulation activity.

The same payload is embedded by the RO-Crate exporter under @graph without modification, so consumers can run a single json.load and walk either tree.

Functions

build_prov_document(context)

Return both the create-action node and the supporting activities.

serialise_prov(context)

Return a standalone JSON-LD PROV-O document for context.

write_prov(catalog, sim_id, output_path, *)

Materialise a JSON-LD PROV-O document for sim_id.