hydromodpy.results.storage_contract#

Shared result-storage layout contract.

HydroModPy keeps one workspace-level catalog database and per-simulation artefacts below the workspace simulations directory. This module centralises that vocabulary so path builders, documentation-oriented tests, and public facades do not drift back toward ambiguous ā€œone database per runā€ language.

The catalog filename itself lives in hydromodpy.core.state.paths so every layer (core, results, cli, data) shares one canonical definition.

Parquet naming#

Two distinct shapes coexist on disk and both happen to end in .parquet:

  • Container directory (PARQUET_DIR_SUFFIX): the per-simulation folder <basename>.parquet/ that groups every view payload for one run.

  • Single-file payload (PARQUET_FILE_SUFFIX): the individual <view>.parquet files placed inside the container directory.

Because both literals are the same string, naive glob("*.parquet") calls are ambiguous. Callers that walk the workspace must therefore filter by Path.is_dir() or Path.is_file() to disambiguate intent.

PARQUET_DATASET_MARKER is reserved for the future Hive-partitioned dataset layout (<view>.parquet/<part=...>/...). It is not used by the current v1 contract; new partitioned datasets must place this subdirectory marker at their root so directory-walking code can detect them without a heuristic.

Classes

ResultStorageLayer(name,Ā scope,Ā ...)

One physical storage layer used by persisted simulation results.