Skip to content

Commit 3a8e569

Browse files
author
Alan Christie
committed
refactor: lin-prefix becomes link-glob
1 parent 8891ee5 commit 3a8e569

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

tests/workflow-definitions/simple-python-split-combine.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ steps:
5757
variable: outputFile
5858
- variable: inputDirPrefix
5959
from-predefined:
60-
variable: link-prefix
60+
variable: link-glob
6161
- variable: outputFile
6262
to-project:

workflow/workflow-schema.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ definitions:
124124

125125
# A Step variable
126126
# (whose value (a file) is to be copied to the project directory)
127+
#
128+
# This will eventually be removed,
129+
# instead coming from 'ouput' variables in workflow 'variables' block.
127130
step-variable-to-project:
128131
type: object
129132
additionalProperties: false
@@ -138,6 +141,9 @@ definitions:
138141

139142
# A Step variable
140143
# (whose value (a file) is to be copied from project directory)
144+
#
145+
# This will eventually be removed,
146+
# instead coming from 'input' variables in workflow 'variables' block.
141147
step-variable-from-project:
142148
type: object
143149
additionalProperties: false

workflow/workflow_engine.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,17 +78,18 @@ def __init__(
7878
*,
7979
wapi_adapter: WorkflowAPIAdapter,
8080
instance_launcher: InstanceLauncher,
81-
step_link_prefix: str = ".instance-",
81+
link_glob: str = ".instance-*",
8282
):
8383
"""Initialiser, given a Workflow API adapter, Instance laucnher,
84-
and a step (directory) link prefix (the directory prefix the DM uses to hard-link
85-
prior step instanes into the next step, typically '.instance-')"""
84+
and a step (directory) link 'glob' (a convenient directory glob to
85+
locate the DM hard-link directories of prior instances inserted into a
86+
step's instance directory, typically '.instance-*')"""
8687
# Keep the dependent objects
8788
self._wapi_adapter: WorkflowAPIAdapter = wapi_adapter
8889
self._instance_launcher: InstanceLauncher = instance_launcher
89-
self._step_link_prefix: str = step_link_prefix
90+
self._link_glob: str = link_glob
9091

91-
self._predefined_variables: dict[str, Any] = {"link-prefix": step_link_prefix}
92+
self._predefined_variables: dict[str, Any] = {"link-glob": link_glob}
9293

9394
def handle_message(self, msg: Message) -> None:
9495
"""Expect Workflow and Pod messages.

0 commit comments

Comments
 (0)