Skip to content

Commit 84f4985

Browse files
feat: Minor log enhancement - tool version included (#102)
Minor log enhancement - tool version included
1 parent 181d5f3 commit 84f4985

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/unstract/sdk/tool/entrypoint.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import os
2-
3-
from unstract.sdk.constants import ToolEnv
41
from unstract.sdk.tool.base import BaseTool
52
from unstract.sdk.tool.executor import ToolExecutor
63
from unstract.sdk.tool.parser import ToolArgsParser
@@ -20,8 +17,6 @@ def launch(tool: BaseTool, args: list[str]) -> None:
2017
tool (AbstractTool): Tool to execute
2118
args (List[str]): Arguments passed to a tool
2219
"""
23-
# Implicitly set to indicate that the SDK is run from a tool
24-
os.environ[ToolEnv.EXECUTION_BY_TOOL] = "True"
2520
parsed_args = ToolArgsParser.parse_args(args)
2621
executor = ToolExecutor(tool=tool)
2722
executor.execute(parsed_args)

src/unstract/sdk/tool/executor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ def execute_run(self, args: argparse.Namespace) -> None:
5050
settings: dict[str, Any] = loads(args.settings)
5151

5252
tool_name = self.tool.properties["displayName"]
53+
tool_version = self.tool.properties["toolVersion"]
5354
self.tool.stream_log(
54-
f"Running tool '{tool_name}' with "
55+
f"Running tool '{tool_name}:{tool_version}' with "
5556
f"Workflow ID: {self.tool.workflow_id}, "
5657
f"Execution ID: {self.tool.execution_id}, "
5758
f"SDK Version: {get_sdk_version()}"

0 commit comments

Comments
 (0)