hydromodpy.core.workspace.config#

Workspace configuration with project-local result catalogs.

Resolution order (first match wins):

  1. Explicit - the TOML declares root or data_dir under [workspace]. A declared root derives the shared data directory unless data_dir is explicitly overridden.

  2. Env var - HMP_WORKSPACE is set and points to a directory used as the shared data workspace.

  3. Scaffold - the TOML lives at <workspace>/projects/<name>/hydromodpy.toml and the grand-grand-parent contains a data/ directory.

  4. Standalone project - the project directory itself is used as the shared data workspace.

Result catalogs are project-local by default: catalog_path resolves to <project_root>/catalog.duckdb and simulations_dir resolves to <project_root>/simulations. The shared workspace root only owns input data caches.