Skip to content

Commit 67f6f28

Browse files
committed
Implemented both --annotation and --name
1 parent 88ea540 commit 67f6f28

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

docker_tes_proxy/subcommands.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@ def subcommand(
898898
for mount_part in mount_parts:
899899
keyval = mount_part.split("=", 1)
900900
mount_attrs[keyval[0]] = keyval[-1]
901-
self.logger.debug(mount_attrs)
901+
902902
if mount_attrs.get("type") == "bind":
903903
local_path = mount_attrs.get("src", mount_attrs.get("source"))
904904
remote_path = mount_attrs.get(
@@ -916,6 +916,13 @@ def subcommand(
916916
f"--mount={mount_decl} cannot be honoured, as only type=bind can be emulated in GA4GH TES"
917917
)
918918

919+
tags = dict()
920+
# Emulation of --annotation, which is mapped to tags
921+
if isinstance(args.annotation, list):
922+
for annotation_decl in args.annotation:
923+
parts = annotation_decl.split("=", 1)
924+
tags[parts[0]] = parts[-1]
925+
919926
# Now, process all the volume tuples
920927
for local_path, remote_path, flags in volumes_tuples:
921928
local_path_exists = os.path.exists(local_path)
@@ -979,6 +986,8 @@ def subcommand(
979986
],
980987
inputs=inputs,
981988
outputs=outputs,
989+
tags=tags if len(tags) > 0 else None,
990+
name=args.name,
982991
)
983992

984993
if args.interactive:

0 commit comments

Comments
 (0)