Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP fix #1330 #1566

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions cwltool/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,11 +448,12 @@ def job(
)

step_input = {}
for inp in self.tool["inputs"]:
field = shortname(inp["id"])
if not inp.get("not_connected"):
step_input[field] = job_order[inp["id"]]

for inp in job_order:
field = shortname(inp)
step_input[field] = job_order[inp]
if hasattr(inp, "get"):
if not inp.get("not_connected"):
step_input[field] = job_order[field]
try:
yield from self.embedded_tool.job(
step_input,
Expand Down
20 changes: 20 additions & 0 deletions cwltool/workflow_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,9 @@ def object_from_state(
incomplete: bool = False,
) -> Optional[CWLObjectType]:
inputobj = {} # type: CWLObjectType
for s in state.keys():
if hasattr(state[s], "value"):
inputobj[s] = state[s].value
for inp in params:
iid = original_id = cast(str, inp["id"])
if frag_only:
Expand Down Expand Up @@ -551,6 +554,23 @@ def do_output_callback(self, final_output_callback: OutputCallbackType) -> None:
_logger.debug("[%s] outputs %s", self.name, json_dumps(wo, indent=4))

self.did_callback = True
paramskey = []
paramskeys = []

if self.tool["outputs"] is not None:
for inp in self.tool["outputs"]:
for k, v in inp.items():
if k == "id":
paramskey.append(v)
paramskeys.append(shortname(v))

newwo = {}
for k, v in wo.items():
if k in paramskey:
newwo[k] = v
elif k in paramskeys:
newwo[k] = v
wo = newwo

final_output_callback(wo, self.processStatus)

Expand Down