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

default network access for ICT to CLT conversion and handle single node wfb payload #291

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Changes from all 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
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
Loading