Skip to content

Commit

Permalink
default network access for ICT to CLT conversion and handle single no…
Browse files Browse the repository at this point in the history
…de WFB payload (#291)

Co-authored-by: Vasu Jaganath <vasu.jaganath@axleinfo.com>
  • Loading branch information
vjaganat90 and Vasu Jaganath authored Oct 31, 2024
1 parent ae6652e commit 060a85b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/sophios/api/utils/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ def extract_state(inp: Json) -> Json:
plugin = next((ict for ict in plugins if ict['pid'] == node_pid), None)
clt: Json = {}
if plugin:
clt = ict_to_clt(plugin)
# by default have network access true
# so we don't get runtime error for docker/container pull
clt = ict_to_clt(plugin, True)
# just have the clt payload in run
node['run'] = clt
inp_restrict = inp_inter['state']
Expand Down Expand Up @@ -165,7 +167,11 @@ def wfb_to_wic(inp: Json) -> Cwl:
workflow_temp["steps"].append(node) # node["cwlScript"] # Assume dict form
else: # A single node workflow
node = inp_restrict["nodes"][0]
workflow_temp = node["cwlScript"] if node.get("cwlScript") else node['run']
if node.get("cwlScript"):
workflow_temp = node["cwlScript"]
else:
workflow_temp["steps"] = []
workflow_temp["steps"].append(node)
return workflow_temp


Expand Down

0 comments on commit 060a85b

Please sign in to comment.