Skip to content

Commit c9131dc

Browse files
author
Alan Christie
committed
feat: Adjust realise_outputs
1 parent 3fda1a5 commit c9131dc

File tree

3 files changed

+20
-7
lines changed

3 files changed

+20
-7
lines changed

tests/test_test_api_adapter.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,3 +441,17 @@ def test_get_running_workflow_step_by_name():
441441
assert response["running_workflow"]["id"] == rwf_id
442442
assert response["name"] == "step-2"
443443
assert response["id"] == rwfs_id
444+
445+
446+
def test_basic_realise():
447+
# Arrange
448+
utaa = UnitTestWorkflowAPIAdapter()
449+
450+
# Act
451+
response, _ = utaa.realise_outputs(
452+
running_workflow_step_id="r-workflow-step-00000000-0000-0000-0000-000000000001",
453+
outputs=["a.txt"],
454+
)
455+
456+
# Assert
457+
assert not response

tests/wapi_adapter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,8 @@ def get_running_workflow_steps(self, *, running_workflow_id: str) -> dict[str, A
381381
return {"count": len(steps), "running_workflow_steps": steps}
382382

383383
def realise_outputs(
384-
self, *, running_workflow_step_id: str, variables: dict[str, str]
384+
self, *, running_workflow_step_id: str, outputs: list[str, str]
385385
) -> tuple[dict[str, Any], int]:
386386
del running_workflow_step_id
387-
del variables
387+
del outputs
388388
return {}, 0

workflow/workflow_abc.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -343,12 +343,11 @@ def get_job(
343343

344344
@abstractmethod
345345
def realise_outputs(
346-
self, *, running_workflow_step_id: str, outputs: list[tuple[str, str]]
346+
self, *, running_workflow_step_id: str, outputs: list[str]
347347
) -> tuple[dict[str, Any], int]:
348-
"""Copy (link) the step's files as outputs into the Project directory,
349-
while also renaming the file. A step ID is provided, along with a list of
350-
outputs (files in the instance directory) and the required counterpart file
351-
in the Project directory."""
348+
"""Copy (link) the step's files as outputs into the Project directory.
349+
A step ID is provided, along with a list of outputs
350+
(files that will be in the step's instance directory)."""
352351
# Should return an empty map or:
353352
# {
354353
# "error": "<error message>",

0 commit comments

Comments
 (0)