audit_prune#
- hydromodpy.audit_prune(workspace=None, *, apply=False)[source]#
Apply
retention_policiestoaudit_logfor the workspace catalog.Parameters#
- workspace
Path to a workspace or project directory. Resolved via
hydromodpy.cli.helpers.find_catalog_root()so any path under the project tree works.Noneresolves to the current directory.- apply
False(default) counts rows that would be removed without modifying the file.Trueactually deletes rows.
Returns#
- dict[str, int]
Mapping
event_type -> rows_affected. Empty when no retention policy is registered.
Raises#
- FileNotFoundError
If the workspace does not host a
catalog.duckdb.