Skip to content

Commit ab94bd7

Browse files
author
Alan Christie
committed
feat: Add get_generated_outputs_for_step_output() to API adapter
1 parent d955a19 commit ab94bd7

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

tests/wapi_adapter.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,13 @@ def get_running_workflow_steps(self, *, running_workflow_id: str) -> dict[str, A
381381
steps.append(item)
382382
return {"count": len(steps), "running_workflow_steps": steps}
383383

384+
def get_generated_outputs_for_step_output(
385+
self, *, running_workflow_step_id: str, output: str
386+
) -> tuple[dict[str, Any], int]:
387+
del running_workflow_step_id
388+
del output
389+
return {"outputs": []}, HTTPStatus.OK
390+
384391
def realise_outputs(
385392
self, *, running_workflow_step_id: str, outputs: list[str, str]
386393
) -> tuple[dict[str, Any], int]:

workflow/workflow_abc.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,19 @@ def get_job(
341341
# }
342342
# If not present an empty dictionary should be returned.
343343

344+
@abstractmethod
345+
def get_generated_outputs_for_step_output(
346+
self, *, running_workflow_step_id: str, output: str
347+
) -> tuple[dict[str, Any], int]:
348+
"""Gets the set of outputs for the output variable of a given step.
349+
The step must have stopped for this to return any meaningful value.
350+
Returned files might also include paths that are relative to the
351+
Step's instance directory."""
352+
# Should return a (possibly empty) list of paths and filenames:
353+
# {
354+
# "outputs": ["file1.sdf", "file2.sdf"]
355+
# }
356+
344357
@abstractmethod
345358
def realise_outputs(
346359
self, *, running_workflow_step_id: str, outputs: list[str]

0 commit comments

Comments
 (0)