[workspace] WorkspaceConfig#

TOML section: [workspace]

Pydantic model: WorkspaceConfig defined in hydromodpy.core.workspace.config.

Source on GitHub

Strict-binary workspace configuration.

The canonical workspace layout is:

<workspace>/
    workspace.toml
    data/
        cache.duckdb
    projects/
        <name>/
            hydromodpy.toml   <- TOML lives here when using scaffold
            catalog.duckdb
            simulations/
                <basename>.zarr/ or <basename>.zarr.zip

Fields under [workspace]:

project_root (required)

Directory of the project TOML. Usually auto-derived from the TOML location by the loader.

root (explicit workspace override)

When set, the shared data workspace root. Derives data_dir unless it is explicitly overridden.

catalog_path / data_dir / simulations_dir

Per-component explicit overrides. catalog_path and simulations_dir are project-local by default.

output_root

Optional redirect for heavy outputs (.solver_scratch/ and per-run figures/). Defaults to project_root.

Show fields:

Fields#

project_root

Path | UPath required user source

Path to the project directory. Required in TOML configs.

Example: "."

root

Path | UPath | None default = None user source

Explicit shared data workspace root. When set, derives data_dir unless it is overridden. Result catalogs stay project-local by default.

Example: "../.."

catalog_path

Path | None default = None dev source

Explicit path to the project catalog.duckdb. Defaults to <project_root>/catalog.duckdb.

data_dir

Path | None default = None dev source

Explicit path to the workspace data directory. Defaults to <root>/data.

simulations_dir

Path | None default = None dev source

Explicit path to the simulations Zarr directory. Defaults to <project_root>/simulations.

output_root

Path | None default = None user source

Root directory for per-project outputs (.solver_scratch/, figures/). Defaults to project_root when not set. Use this to redirect heavy outputs to a separate disk.

Example: "outputs/run_a"

Starter TOML snippet#

Click to expand a copy-pasteable [workspace] TOML skeleton

Copy this block into your project.toml and uncomment the lines you want to set. Sub-tables ([parent.subfield]) appear in the order Pydantic expects them.

[workspace]
# project_root = ""  # REQUIRED
# root = ...  # default = None
# output_root = ...  # default = None

Entity-relationship diagram#

ER diagram for WorkspaceConfig

Click to zoom and pan. Press Esc or click outside to close.