hydromodpy.results.catalog.audit#
Audit log writer for catalog events.
Hosts a single helper, emit_audit_event(), which writes one row into
the audit_log table opened by the catalog DuckDB connection. Callers
emit events at the boundaries of state-changing operations (delete,
purge, …). The helper resolves the OS user, hostname, and HydroModPy
git commit best-effort; failures fall back to empty strings rather than
breaking the surrounding transaction.
The accepted event_type values are constrained at the schema level by
the CHECK on audit_log.event_type; this module mirrors the live
list as a literal type so a typo at the call site fails at type-check
time as well as at SQL-execution time.
Functions
|
Sweep |
|
Decorator that emits one |
|
Write one event into |
|
Insert one GDPR tombstone row into |
|
Recompute and verify the entire |