hydromodpy.analysis.catalog#

Common catalog primitives for campaign-oriented analysis workflows.

Functions

detect_catalog_format(path, *, declared_format)

Resolve the effective catalog format from a declaration and suffix.

load_catalog_rows(spec)

Load normalized rows from a CSV or JSONL catalog.

merge_tags(*tag_groups)

Merge multiple tag groups while preserving the first-seen casing.

normalize_catalog_mapping(mapping)

Normalize raw CSV/JSONL row keys while preserving row values.

normalize_float(value)

Return one optional float-like value.

normalize_required_field_names(mapping, *, ...)

Return the subset of required fields that are missing from one mapping.

normalize_tags(value, *, separator)

Normalize tags from CSV or JSONL payloads.

normalize_text(value)

Return one stripped optional text value.

parse_bool(value)

Parse common string/number bool representations.

resolve_catalog_path(*, catalog_path, raw_value)

Resolve one optional path-like field relative to the catalog directory.

row_matches_selector(row, *, selector)

Return whether one generic catalog row matches a selector.

select_catalog_rows(rows, *, selector)

Filter catalog rows while preserving source order.

Classes

CatalogLoadSpec(path[, format, ...])

Generic CSV/JSONL catalog-loading contract.

CatalogRow(raw, resolved_paths, ...)

One normalized row loaded from a campaign catalog.

CatalogRowSelector([field_equals, tags, ...])

Generic row selector shared by catalog-backed campaign workflows.