hydromodpy.results.export.context#

Shared context object that gathers data from the catalog for FAIR exports.

A FairExportContext is a pure-data view of one simulation. It is built once from the live SimulationCatalog and then handed to the specialised RO-Crate / STAC / PROV-O builders. Keeping a single collector here means the rest of the exporters never touch DuckDB directly, which also makes the layer matrix (results -> core/schema/results/spatial) trivial to honour.

Functions

build_context(catalog, sim_id)

Collect every catalog row and file the FAIR exporters need.

to_json(payload, path)

Write payload deterministically as UTF-8 JSON and return path.

Classes

AssetEntry(key, relative_path, media_type, roles)

One referenced artefact (Zarr, Parquet, COG, lockfile).

FairExportContext(sim_id, sim_row, runs_env, ...)

Read-only snapshot of every piece of metadata the exporters need.

InputEntry(role, category, original_path, ...)

One workspace input file used by the simulation.