Skip to content

Commit

Permalink
transfer jobs as tuple, not set
Browse files Browse the repository at this point in the history
  • Loading branch information
sellth committed Dec 8, 2023
1 parent 70908b7 commit 2fa772c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cubi_tk/sodar/ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def build_file_list(self) -> typing.List[typing.Dict[Path, Path]]:
output_paths.append({"spath": src, "ipath": Path(src.name)})
return output_paths

def build_jobs(self, source_paths: typing.Iterable[Path]) -> typing.Set[TransferJob]:
def build_jobs(self, source_paths: typing.Iterable[Path]) -> typing.Tuple[TransferJob]:
"""Build file transfer jobs."""

transfer_jobs = []
Expand Down Expand Up @@ -289,7 +289,7 @@ def build_jobs(self, source_paths: typing.Iterable[Path]) -> typing.Set[Transfer
)
)

return set(transfer_jobs)
return tuple(transfer_jobs)


def setup_argparse(parser: argparse.ArgumentParser) -> None:
Expand Down
3 changes: 3 additions & 0 deletions tests/test_sodar_ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ class DummyColl(object):
lz_uuid,
]

# to make it sortable
mockjob.return_value.path_local = 1

# Test env file missing
with pytest.raises(SystemExit):
main(argv)
Expand Down

0 comments on commit 2fa772c

Please sign in to comment.