Skip to content

Commit 35ef549

Browse files
author
caaespin
committed
Merge branch 'release/1.0.17'
2 parents 24a35ce + 5742526 commit 35ef549

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

Dockstore.cwl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ dct:creator:
2424
2525
requirements:
2626
- class: DockerRequirement
27-
dockerPull: "quay.io/ucsc_cgl/dockstore-tool-runner:1.0.16"
27+
dockerPull: "quay.io/ucsc_cgl/dockstore-tool-runner:1.0.17"
28+
2829
hints:
2930
- class: ResourceRequirement
3031
coresMin: 1
@@ -75,6 +76,12 @@ inputs:
7576
inputBinding:
7677
prefix: --workflow-type
7778
79+
launch_type:
80+
type: string?
81+
doc: "String that describes the launch type: tool or workflow"
82+
inputBinding:
83+
prefix: --launch-type
84+
7885
parent_uuids:
7986
type: string
8087
doc: "UUIDs for parent"

DockstoreRunner.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ def __init__(self):
5353
parser.add_argument('--json-encoded', default='e30=', required=True)
5454
parser.add_argument('--docker-uri', default='quay.io/wshands/fastqc:latest', required=True)
5555
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)')
5659
parser.add_argument('--workflow-type', default='sequence_upload_qc_report', required=True)
5760
parser.add_argument('--parent-uuids', default='parent-UUID-dummy-value', required=True)
5861
# 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):
8487
self.dockstore_url = args.dockstore_url
8588
self.workflow_name = args.docker_uri.split(':')[0]
8689
self.workflow_version = args.docker_uri.split(':')[1]
90+
self.launch_type = args.launch_type
8791
self.workflow_type = args.workflow_type
8892
self.parent_uuids = args.parent_uuids
8993
self.bundle_uuid = uuid4()
@@ -447,7 +451,7 @@ def run(self):
447451
self.run_command(cmd, self.MAX_ATTEMPTS, self.DELAY_IN_SECONDS, True)
448452

449453
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
451455
self.run_command(cmd, self.MAX_PIPELINE_ATTEMPTS, self.DELAY_IN_SECONDS, cwd=self.tmp_dir)
452456

453457
t_end = time.time()

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,15 @@ Most people, other than developers of this tool, will use the Dockstore CLI to i
9999

100100
# patch in /usr/local/lib/python2.7/dist-packages/cwltool
101101
# make a tmpdir like /datastore
102-
docker build -t quay.io/ucsc_cgl/dockstore-tool-runner:1.0.16 .
102+
docker build -t quay.io/ucsc_cgl/dockstore-tool-runner:1.0.17 .
103103
# fill in your JSON from Dockstore.json template as Dockstore.my.json
104104
mkdir /datastore; chown ubuntu:ubuntu /datastore/
105105
# local execution
106106
TMPDIR=/datastore dockstore tool launch --entry Dockstore.cwl --local-entry --json Dockstore.my.json
107107
# as root in /datastore
108108
TMPDIR=/datastore dockstore tool launch --entry ~ubuntu/gitroot/BD2KGenomics/dcc-dockstore-tool-runner/Dockstore.cwl --local-entry --json ~ubuntu/gitroot/BD2KGenomics/dcc-dockstore-tool-runner/Dockstore.my.json
109109
# execute published on dockstore (this is the way most people will use this tool!)
110-
dockstore tool launch --entry quay.io/ucsc_cgl/dockstore-tool-runner:1.0.16 --json Dockstore.my.json
110+
dockstore tool launch --entry quay.io/ucsc_cgl/dockstore-tool-runner:1.0.17 --json Dockstore.my.json
111111

112112
# running you see it launch the cwltool command, you mind find this useful while debugging
113113
cwltool --enable-dev --non-strict --enable-net --outdir /datastore/./datastore/launcher-ff6b55b3-52e8-430c-9a70-1ff295332698/outputs/ --tmpdir-prefix /datastore/./datastore/launcher-ff6b55b3-52e8-430c-9a70-1ff295332698/working/ /home/ubuntu/gitroot/BD2KGenomics/dcc-dockstore-tool-runner/Dockstore.cwl /datastore/./datastore/launcher-ff6b55b3-52e8-430c-9a70-1ff295332698/workflow_params.json

0 commit comments

Comments
 (0)