From 5e28b09ca8e8caabf611224bcffc69efad604574 Mon Sep 17 00:00:00 2001 From: Austin Raney Date: Wed, 21 Aug 2024 11:54:20 -0400 Subject: [PATCH] chore: improve assert message context --- python/ngen_cal/src/ngen/cal/ngen_hooks/ngen_output.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/ngen_cal/src/ngen/cal/ngen_hooks/ngen_output.py b/python/ngen_cal/src/ngen/cal/ngen_hooks/ngen_output.py index 609f4f44..808054b1 100644 --- a/python/ngen_cal/src/ngen/cal/ngen_hooks/ngen_output.py +++ b/python/ngen_cal/src/ngen/cal/ngen_hooks/ngen_output.py @@ -36,7 +36,9 @@ def ngen_cal_model_configure(self, config: ModelExec) -> None: # this will only execute if all other hooks return None (or they don't exist) @hookimpl(specname="ngen_cal_model_output", trylast=True) def get_output(self, id: str) -> pd.Series | None: - assert self._ngen_realization is not None, "ngen realization required" + assert ( + self._ngen_realization is not None + ), "ngen realization required; ensure `ngen_cal_model_configure` was called and the plugin was properly configured" if not self._output_file.exists(): print(