@@ -53,6 +53,9 @@ def __init__(self):
53
53
parser .add_argument ('--json-encoded' , default = 'e30=' , required = True )
54
54
parser .add_argument ('--docker-uri' , default = 'quay.io/wshands/fastqc:latest' , required = True )
55
55
parser .add_argument ('--dockstore-url' , default = 'https://dockstore.org/containers/quay.io/wshands/fastqc' , required = True )
56
+ parser .add_argument ('--launch-type' , default = 'tool' , const = 'tool' , nargs = '?' ,
57
+ choices = ['tool' , 'workflow' ], required = False ,
58
+ help = 'run a workflow or tool (default: %(default)s)' )
56
59
parser .add_argument ('--workflow-type' , default = 'sequence_upload_qc_report' , required = True )
57
60
parser .add_argument ('--parent-uuids' , default = 'parent-UUID-dummy-value' , required = True )
58
61
# FIXME: this append seems to crash on the mac but it would be the way to go if we want multiple parents
@@ -84,6 +87,7 @@ def __init__(self):
84
87
self .dockstore_url = args .dockstore_url
85
88
self .workflow_name = args .docker_uri .split (':' )[0 ]
86
89
self .workflow_version = args .docker_uri .split (':' )[1 ]
90
+ self .launch_type = args .launch_type
87
91
self .workflow_type = args .workflow_type
88
92
self .parent_uuids = args .parent_uuids
89
93
self .bundle_uuid = uuid4 ()
@@ -447,7 +451,7 @@ def run(self):
447
451
self .run_command (cmd , self .MAX_ATTEMPTS , self .DELAY_IN_SECONDS , True )
448
452
449
453
print ("Calling Dockstore to launch a Dockstore tool" )
450
- cmd = "dockstore tool launch --debug --entry " + self .docker_uri + " --json " + transformed_json_path
454
+ cmd = "dockstore " + self . launch_type + " launch --debug --entry "+ self .docker_uri + " --json " + transformed_json_path
451
455
self .run_command (cmd , self .MAX_PIPELINE_ATTEMPTS , self .DELAY_IN_SECONDS , cwd = self .tmp_dir )
452
456
453
457
t_end = time .time ()
0 commit comments