hydromodpy.core.contracts.solver_registry#

Solver-registry Protocol and module-level provider singleton.

The 15x15 layer matrix forbids simulation -> solver and analysis -> solver. Planning, the runner, post-run ingestion, transport helpers, and comparison launchers reach the solver registry through SolverRegistryProvider. The concrete provider is wired in at package bootstrap by hydromodpy._bootstrap.

The singleton state lives here (in core) to give simulation and analysis a single source of truth for the installed provider, instead of two parallel singletons. The getter raises when the provider is missing: every consumer is critical enough that silently returning None would mask bootstrap regressions.

Functions

get_solver_registry_provider()

Return the installed provider.

set_solver_registry_provider(provider)

Install the registry provider used by simulation and analysis.

Classes

SolverRegistryProvider(*args, **kwargs)

Read-only view of the solver registry consumed outside solver.