Skip to content

Commit

Permalink
Minor fixes to get tests to pass
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Nov 3, 2023
1 parent fad423a commit 5651d4b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/galaxy/managers/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -1121,7 +1121,7 @@ def do_inputs(inputs, values, prefix, step, other_values=None):
else:
module = step.module
step_dict["label"] = module.name
step_dict["inputs"] = do_inputs(module.get_runtime_inputs(), step.state.inputs, "", step)
step_dict["inputs"] = do_inputs(module.get_runtime_inputs(step), step.state.inputs, "", step)
step_dicts.append(step_dict)
return {
"name": workflow.name,
Expand Down
16 changes: 9 additions & 7 deletions lib/galaxy/tools/parameters/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import os
import os.path
import re
import urllib.parse
from typing import (
Any,
Dict,
Expand Down Expand Up @@ -2691,16 +2692,17 @@ def raw_to_galaxy(trans, as_dict_value):

object_class = as_dict_value["class"]
if object_class == "File":
relative_to = "/" # TODO
from galaxy.tool_util.cwl.util import abs_path

path = abs_path(as_dict_value.get("location"), relative_to)

name = os.path.basename(path)
# TODO: relative_to = "/"
location = as_dict_value.get("location")
name = (
as_dict_value.get("identifier")
or as_dict_value.get("basename")
or os.path.basename(urllib.parse.urlparse(location).path)
)
extension = as_dict_value.get("format") or "data"
dataset = Dataset()
source = DatasetSource()
source.source_uri = path
source.source_uri = location
# TODO: validate this...
source.transform = as_dict_value.get("transform")
dataset.sources.append(source)
Expand Down

0 comments on commit 5651d4b

Please sign in to comment.