WorkflowContext#

class hydromodpy.core.WorkflowContext(cfg, config_path, raw_toml, data_plan=None, setup=<factory>, loaded_data=<factory>, execution=<factory>, store=None, sim_id=None, parent_sim_id=None, reserved_sim_id=None, postprocess_runner=None, effective_results_config=None, forced_results_flags=())[source]#

Bases: object

Mutable workflow state split into setup/loaded_data/execution scopes.

models_by_run_id is the source of truth for produced solver models. Concrete solver instances are resolved explicitly from that registry.

Also carries result-store lifecycle fields needed by the workflow layer: store, sim_id, and postprocess_runner.

cfg and data_plan are typed as Any because core cannot import from sibling layers. Concrete types are config.hydromodpy_config.HydroModPyConfig and data.plan.DataLoadPlan.

Parameters:
get_model(run_id)[source]#

Return the exact model produced by a concrete process run.

Parameters:

run_id (str)

Return type:

Any

get_run_for_solver(solver_name)[source]#

Return the unique planned run matching solver_name, if any.

Parameters:

solver_name (str)

Return type:

Any

get_model_for_solver(solver_name)[source]#

Return the produced model for solver_name, if that run completed.

Parameters:

solver_name (str)

Return type:

Any