hydromodpy.core.bootstrap_hook#

Lazy bootstrap trigger shared across layers.

The root hydromodpy._bootstrap registers its bootstrap callable here at import time (cheap: it only stores a reference). Layers that need the fully wired config / DI graph (config validation, the functional verbs, Project, the CLI) call ensure_bootstrapped() instead of importing the root _bootstrap module, which would be a forbidden upward import edge.

Deferring the heavy bootstrap from package import to first real use keeps import hydromodpy and hmp --help fast.

Functions

ensure_bootstrapped()

Run the registered bootstrap once.

set_bootstrap_hook(hook)

Register the bootstrap callable (called once by the root package).