hydromodpy.data.registry.cache_store#

Cache store: connection, schema bootstrap, register, frozen-mode helpers.

Concern: state-changing operations on raw catalog entries and the file-system anchors that back them (workspace root, lockfile, sidecars).

Functions

dt_to_str(dt)

emit_input_sidecar(path, *, sha256, source, ...)

Write the P3 JSON sidecar next to a freshly registered raw input.

encode_path_for_storage(catalog, file_path)

Encode file_path as a workspace-relative POSIX string.

frozen_enabled()

json_or_none(d)

locked_artifacts(catalog)

match_locked_artifact(catalog, *, variable, ...)

register(catalog, *, variable, source, file_path)

Register or update a data file entry.

reject_frozen_cache_miss(catalog, *, ...)

reject_frozen_entry_mismatch(catalog, entry)

reject_frozen_register(catalog, *, variable, ...)

resolve_entry_path(catalog, file_path, *[, ...])

sha256_or_none(path)

try_unlink(fp)

workspace_lockfile_path(catalog)

workspace_root(catalog)

Return the workspace root inferred from the cache DB location.