From fd422ae4ea1306aa53c909f664e1fc1a66bb8abe Mon Sep 17 00:00:00 2001 From: Jared O'Connell Date: Mon, 24 Jun 2024 15:03:01 -0400 Subject: [PATCH] Addressed review comments --- src/arcaflow_plugin_sdk/schema.py | 11 ++++++----- src/arcaflow_plugin_sdk/test_plugin.py | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/arcaflow_plugin_sdk/schema.py b/src/arcaflow_plugin_sdk/schema.py index e807e0f..0126643 100644 --- a/src/arcaflow_plugin_sdk/schema.py +++ b/src/arcaflow_plugin_sdk/schema.py @@ -5991,14 +5991,15 @@ def __call__( result = self._handler(step_local_data.initialized_object, params) if not isinstance(result, tuple): raise BadArgumentException( - "The step returned type {};".format(type(result)) - + " expected a tuple with two values: output ID string" - " and a step-specific value." + f"The implementation of step {run_id}/{self.id} returned" + f" type {type(result)}; expected a tuple with two" + " values: output ID string and a step-specific value." ) if len(result) != 2: raise BadArgumentException( - "The step returned {} results instead of 2. Did your step" - " return the correct results?".format(len(result)) + f"The implementation of step {run_id}/{self.id} returned" + f"{len(result)} results instead of 2. Did your step" + " return the correct results?" ) output_id, output_data = result if output_id not in self.outputs: diff --git a/src/arcaflow_plugin_sdk/test_plugin.py b/src/arcaflow_plugin_sdk/test_plugin.py index 2180a07..e6622eb 100644 --- a/src/arcaflow_plugin_sdk/test_plugin.py +++ b/src/arcaflow_plugin_sdk/test_plugin.py @@ -55,7 +55,7 @@ def cleanup(): @plugin.step( "incorrect-return", "Incorrect Return", - "A test that doesn't include the output ID.", + "A step that returns a bad output which omits the output ID.", {"success": EmptyTestOutput}, ) def incorrect_return_step(