hydromodpy.results.catalog#

Catalog facade for the results layer.

Central registry for finished simulations. Backed by DuckDB for tabular state and by Zarr / Parquet for field arrays and timeseries written under the workspace.

Public API#

  • SimulationCatalog: connection-managed entry point. Methods cover registration (register_simulation), per-simulation writers (write_parameters, write_timeseries, write_budget, write_field, write_mesh …), readers / queries (query_field, query_timeseries, list_simulations, sql), reference resolution (resolve, __getitem__, find, latest, best), and lifecycle helpers (finalize, cleanup, export_package, import_package, delete).

  • RegistrationResult: dataclass returned by register_simulation.

  • Errors: SimulationNotFoundError, AmbiguousReferenceError, DuplicateSimulationNameError.

  • short_id(): Git-style short identifier (first 8 hex chars).

Modules

adapters

Concrete CatalogBackend implementations.

audit

Audit log writer for catalog events.

constants

Catalog constants and small solver helpers.

cross_db

Cross-DB helpers federating the project catalog with the data cache.

dataset_loader

Catalog-wide ML/DL dataset loader.

discovery

Reference resolution and Run/Group discovery.

facade

Catalog facade composing every concern mixin.

lifecycle

Simulation lifecycle helpers (open / finalize / delete / cleanup / close).

migrations

Catalog DuckDB schema migrations.

package_io

.hmp package import/export wrappers.

parquet_views

Parquet-backed DuckDB view helpers for per-simulation tabular outputs.

ports

Storage backend Protocol for the catalog.

protocol

SimulationStore Protocol for result-catalog backends.

reads

Read-side queries against the catalog.

registration

Simulation registration into the catalog.

schema

Self-documenting schema accessors for SimulationCatalog.

storage_paths

Filesystem path resolution for catalog artefacts.

views

Materialised DuckDB views used by the catalog read path.

writes

Per-simulation write operations.

writes_duckdb

DuckDB write concern for SimulationCatalog.

writes_helpers

Shared helpers for the WritesMixin concern split.

writes_parquet

Parquet write concern for SimulationCatalog.

writes_zarr

Zarr write concern for SimulationCatalog.