Skip to content

Commit

Permalink
Merge pull request #95 from mvdbeek/connected_value
Browse files Browse the repository at this point in the history
Use `ConnectedValue` for connected values
  • Loading branch information
jmchilton authored Jul 19, 2024
2 parents 785cd40 + c30a228 commit eb07ecc
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions gxformat2/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,10 @@ def _runtime_value():
return {"__class__": "RuntimeValue"}


def _connected_value():
return {"__class__": "ConnectedValue"}


def transform_tool(context, step):
if "tool_id" not in step:
raise Exception("Tool steps must define a tool_id.")
Expand Down Expand Up @@ -437,12 +441,9 @@ def replace_links(value, key=""):
if _is_link(value):
append_link(key, value)
# Filled in by the connection, so to force late
# validation of the field just mark as RuntimeValue.
# It would be better I guess if this were some other
# value dedicated to this purpose (e.g. a ficitious
# {"__class__": "ConnectedValue"}) that could be further
# validated by Galaxy.
return _runtime_value()
# validation of the field just mark as ConnectedValue,
# which should be further validated by Galaxy
return _connected_value()
if isinstance(value, dict):
new_values = {}
for k, v in value.items():
Expand Down

0 comments on commit eb07ecc

Please sign in to comment.