hydromodpy.data.auto_scan#

Auto-scan the data/<variable>/ folders for custom files.

Called at the start of every hmp run and from hmp data check / hmp data list. Detects new or modified <variable>_custom_* files (mtime > last indexed timestamp), validates them via the adapters, normalises to the internal pivot format, and registers the result in data/cache.duckdb with provider="custom". API files (<variable>_<api>_*) in the same folder are left to the managers.

The module is idempotent: re-scanning an unchanged workspace is a no-op.

Functions

check_custom(workspace_path, *[, variable])

Dry-run validation of the drag-and-drop folders.

scan_custom(workspace_path, *[, catalog, now])

Scan all data/<variable>/ folders in workspace_path.

Classes

Artifact(variable, provider, station_id, ...)

Outcome of scanning one source file.

ScanReport([added, updated, skipped, errors])

Aggregate result of a scan across the workspace.