Skip to content

Commit

Permalink
Fixed remote ports (#643)
Browse files Browse the repository at this point in the history
This commit fixes the injection of remote inputs using the `cwl_utils`
objects. Also, the unit test for input injection has been improved. Now,
other than checking the path of the output token of the `InputInjectorStep,`
the input file is copied to the same location, and a checksum check is
performed.

This commit also updates the Docker MacOS  GitHub Action to the latest
version.
  • Loading branch information
LanderOtto authored Jan 22, 2025
1 parent 6e21f11 commit 665a0c5
Show file tree
Hide file tree
Showing 3 changed files with 200 additions and 125 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
with:
node-version: "20"
- name: "Install Docker (MacOS X)"
uses: douglascamata/setup-docker-macos-action@v1-alpha.15
uses: douglascamata/setup-docker-macos-action@v1-alpha.16
with:
colima-additional-options: '--mount /private/var/folders:w --mount-type virtiofs'
if: ${{ startsWith(matrix.on, 'macos-') }}
Expand Down Expand Up @@ -249,7 +249,7 @@ jobs:
with:
node-version: "20"
- name: "Install Docker (MacOs X)"
uses: douglascamata/setup-docker-macos-action@v1-alpha.15
uses: douglascamata/setup-docker-macos-action@v1-alpha.16
with:
colima-additional-options: '--mount /private/var/folders:w --mount-type virtiofs'
if: ${{ startsWith(matrix.on, 'macos-') }}
Expand Down
63 changes: 32 additions & 31 deletions streamflow/cwl/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1252,38 +1252,39 @@ def _process_input_value(
_process_input_value(path_processor, output_directory, target, v)
for v in value
]
elif isinstance(
value, (get_args(cwl_utils.parser.File), get_args(cwl_utils.parser.Directory))
):
if value.path:
value.path = _remap_path(
path_processor=path_processor,
path=value.path,
old_dir=output_directory,
new_dir=target.workdir,
)
if value.location:
value.location = _remap_path(
path_processor=path_processor,
path=value.location,
old_dir=output_directory,
new_dir=target.workdir,
)
if value.secondaryFiles:
value.secondaryFiles = [
_process_input_value(path_processor, output_directory, target, sf)
for sf in value.secondaryFiles
]
if isinstance(value, get_args(cwl_utils.parser.Directory)) and value.listing:
value.listing = [
_process_input_value(path_processor, output_directory, target, sf)
for sf in value["listing"]
]
return value
elif isinstance(value, MutableMapping):
if utils.get_token_class(value) in ["File", "Directory"]:
if "location" in value:
value["location"] = _remap_path(
path_processor=path_processor,
path=value["location"],
old_dir=output_directory,
new_dir=target.workdir,
)
if "path" in value:
value["path"] = _remap_path(
path_processor=path_processor,
path=value["path"],
old_dir=output_directory,
new_dir=target.workdir,
)
if "secondaryFiles" in value:
value["secondaryFiles"] = [
_process_input_value(path_processor, output_directory, target, sf)
for sf in value["secondaryFiles"]
]
if "listing" in value:
value["listing"] = [
_process_input_value(path_processor, output_directory, target, sf)
for sf in value["listing"]
]
return value
else:
return {
k: _process_input_value(path_processor, output_directory, target, v)
for k, v in value.items()
}
return {
k: _process_input_value(path_processor, output_directory, target, v)
for k, v in value.items()
}
else:
return value

Expand Down
Loading

0 comments on commit 665a0c5

Please sign in to comment.