Skip to content

Commit 5ac641c

Browse files
authored
Merge pull request #1 from dockstore-testing/feature/grab_bag
Feature/grab bag
2 parents 82f3712 + 6a8a146 commit 5ac641c

File tree

8 files changed

+163
-28
lines changed

8 files changed

+163
-28
lines changed

.dockstore.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
version: 1.2
2+
tools:
3+
- subclass: CWL
4+
primaryDescriptorPath: /md5sum/dockstore-tool-md5sum.cwl
5+
testParameterFiles:
6+
- /md5sum/md5sum.json
7+
name: cwl_tool
8+
authors:
9+
- orcid: 0000-0002-6130-1021
10+
workflows:
11+
- subclass: CWL
12+
primaryDescriptorPath: /md5sum/md5sum.cwl
13+
testParameterFiles:
14+
- /md5sum/md5sum.json
15+
name: cwl_workflow
16+
authors:
17+
- orcid: 0000-0002-6130-1021
18+
- subclass: WDL
19+
primaryDescriptorPath: /md5sum/md5sum.wdl
20+
testParameterFiles:
21+
- /md5sum/md5sum.wdl.json
22+
name: wdl
23+
authors:
24+
- orcid: 0000-0002-6130-1021

.github/workflows/validate.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Validate workflows
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-22.04
9+
10+
steps:
11+
- uses: actions/checkout@v3
12+
13+
- uses: actions/setup-python@v4
14+
with:
15+
python-version: '3.9'
16+
17+
- name: Setup engines
18+
run: |
19+
curl -o requirements.txt "https://raw.githubusercontent.com/dockstore/dockstore/1.13.0-beta.3/dockstore-webservice/src/main/resources/requirements/1.13.0/requirements3.txt"
20+
pip3 install --user -r requirements.txt
21+
22+
- run: sudo apt-get install -y moreutils
23+
24+
- name: Validate cwl
25+
run: |
26+
cwltool --validate checker_workflow_wrapping_tool.cwl
27+
cwltool --validate checker_workflow_wrapping_workflow.cwl
28+
29+
- name: Validate wdl
30+
run: |
31+
wget https://github.com/broadinstitute/cromwell/releases/download/83/womtool-83.jar
32+
java -jar womtool-83.jar validate checker.wdl

.github/workflows/workflows.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Test workflows
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-22.04
8+
9+
steps:
10+
11+
- uses: actions/checkout@v3
12+
- uses: actions/setup-python@v4
13+
with:
14+
python-version: '3.9'
15+
16+
- name: Setup engines
17+
run: |
18+
curl -o requirements.txt "https://raw.githubusercontent.com/dockstore/dockstore/1.13.0-beta.3/dockstore-webservice/src/main/resources/requirements/1.13.0/requirements3.txt"
19+
pip3 install --user -r requirements.txt
20+
21+
- name: Setup CLI
22+
run: |
23+
curl -L -o dockstore https://github.com/dockstore/dockstore/releases/download/1.12.2/dockstore
24+
chmod +x dockstore
25+
mkdir /home/runner/dockstore_bin
26+
mv dockstore /home/runner/dockstore_bin
27+
echo "/home/runner/dockstore_bin" >> $GITHUB_PATH
28+
- name: Prime CLI
29+
run: |
30+
echo "$PATH"
31+
mkdir ~/.dockstore
32+
# we recommend suppressing INFO output for Cromwell, but if you run into a problem
33+
# you may need to change ERROR to INFO to give you hints on how to debug
34+
printf "cromwell-vm-options: -DLOG_LEVEL=ERROR\nserver-url: https://dockstore.org/api" > ~/.dockstore/config
35+
dockstore
36+
37+
- name: Run cwl workflows with CLI
38+
run: |
39+
dockstore --script workflow launch --local-entry checker_workflow_wrapping_workflow.cwl --json md5sum.json
40+
dockstore --script workflow launch --local-entry checker_workflow_wrapping_tool.cwl --json md5sum.json
41+
42+
- name: Run wdl workflow with CLI
43+
run: |
44+
dockstore --script workflow launch --local-entry checker.wdl --json md5sum.wdl.json

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,7 @@ Extend either one depending on whether you are wrapping a tool or a workflow
1515
```
1616
java -jar ~/.dockstore/libraries/cromwell-29.jar run --inputs md5sum.wdl.json checker.wdl
1717
```
18+
19+
## With Dockstore CLI
20+
21+
If the Dockstore CLI is setup, the github actions setup in this repo demonstrate how to run these workflows with it.

checker_workflow_wrapping_tool.cwl

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
cwlVersion: v1.0
22
class: Workflow
33

4-
dct:creator:
5-
'@id': http://orcid.org/0000-0002-7681-6415
6-
foaf:name: Brian O'Connor
7-
foaf:mbox: mailto:briandoconnor@gmail.com
4+
s:author:
5+
- class: s:Person
6+
s:identifier: http://orcid.org/0000-0002-7681-6415
7+
s:email: mailto:briandoconnor@gmail.com
8+
s:name: Brian O'Connor
89
9-
dct:contributor:
10-
foaf:name: Denis Yuen
11-
foaf:mbox: mailto:denis.yuen@oicr.on.ca
10+
s:contributor:
11+
- class: s:Person
12+
s:identifier: https://orcid.org/0000-0002-6130-1021
13+
s:email: mailto:dyuen@oicr.on.ca
14+
s:name: Denis Yuen
1215
1316
inputs:
1417
input_file: File
@@ -32,3 +35,11 @@ steps:
3235
3336
doc: |
3437
This demonstrates how to wrap a "real" tool with a checker workflow that runs both the tool and a tool that performs verification of results
38+
39+
$namespaces:
40+
s: https://schema.org/
41+
edam: http://edamontology.org/
42+
43+
$schemas:
44+
- https://schema.org/version/latest/schemaorg-current-http.rdf
45+
- http://edamontology.org/EDAM_1.18.owl

checker_workflow_wrapping_workflow.cwl

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
cwlVersion: v1.0
22
class: Workflow
33

4-
dct:creator:
5-
'@id': http://orcid.org/0000-0002-7681-6415
6-
foaf:name: Brian O'Connor
7-
foaf:mbox: mailto:briandoconnor@gmail.com
4+
s:author:
5+
- class: s:Person
6+
s:identifier: http://orcid.org/0000-0002-7681-6415
7+
s:email: mailto:briandoconnor@gmail.com
8+
s:name: Brian O'Connor
89
9-
dct:contributor:
10-
foaf:name: Denis Yuen
11-
foaf:mbox: mailto:denis.yuen@oicr.on.ca
10+
s:contributor:
11+
- class: s:Person
12+
s:identifier: https://orcid.org/0000-0002-6130-1021
13+
s:email: mailto:dyuen@oicr.on.ca
14+
s:name: Denis Yuen
1215
1316
requirements:
1417
- class: SubworkflowFeatureRequirement
@@ -35,3 +38,11 @@ steps:
3538
3639
doc: |
3740
This demonstrates how to wrap a "real" workflow with a checker workflow that runs both the tool and a tool that performs verification of results
41+
42+
$namespaces:
43+
s: https://schema.org/
44+
edam: http://edamontology.org/
45+
46+
$schemas:
47+
- https://schema.org/version/latest/schemaorg-current-http.rdf
48+
- http://edamontology.org/EDAM_1.18.owl

md5sum/dockstore-tool-md5sum.cwl

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,15 @@ label: Simple md5sum tool
66
cwlVersion: v1.0
77

88
$namespaces:
9-
dct: http://purl.org/dc/terms/
10-
foaf: http://xmlns.com/foaf/0.1/
9+
s: https://schema.org/
10+
edam: http://edamontology.org/
1111

1212
doc: |
1313
[![Docker Repository on Quay.io](https://quay.io/repository/briandoconnor/dockstore-tool-md5sum/status "Docker Repository on Quay.io")](https://quay.io/repository/briandoconnor/dockstore-tool-md5sum)
1414
[![Build Status](https://travis-ci.org/briandoconnor/dockstore-tool-md5sum.svg)](https://travis-ci.org/briandoconnor/dockstore-tool-md5sum)
1515
A very, very simple Docker container for the md5sum command. See the [README](https://github.com/briandoconnor/dockstore-tool-md5sum/blob/master/README.md) for more information.
1616

1717

18-
#dct:creator:
19-
# '@id': http://orcid.org/0000-0002-7681-6415
20-
# foaf:name: Brian O'Connor
21-
# foaf:mbox: briandoconnor@gmail.com
22-
2318
requirements:
2419
- class: DockerRequirement
2520
dockerPull: quay.io/briandoconnor/dockstore-tool-md5sum:1.0.4

md5sum/md5sum.cwl

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
cwlVersion: v1.0
22
class: Workflow
33

4-
dct:creator:
5-
'@id': http://orcid.org/0000-0002-7681-6415
6-
foaf:name: Brian O'Connor
7-
foaf:mbox: mailto:briandoconnor@gmail.com
84

9-
dct:contributor:
10-
foaf:name: Denis Yuen
11-
foaf:mbox: mailto:denis.yuen@oicr.on.ca
5+
s:contributor:
6+
- class: s:Person
7+
s:identifier: https://orcid.org/0000-0002-6130-1021
8+
s:email: mailto:dyuen@oicr.on.ca
9+
s:name: Denis Yuen
10+
11+
s:author:
12+
- class: s:Person
13+
s:identifier: http://orcid.org/0000-0002-7681-6415
14+
s:email: mailto:briandoconnor@gmail.com
15+
s:name: Brian O'Connor
16+
1217
1318
inputs:
1419
input_file: File
@@ -24,3 +29,12 @@ steps:
2429
in:
2530
input_file: input_file
2631
out: [output_file]
32+
33+
34+
$namespaces:
35+
s: https://schema.org/
36+
edam: http://edamontology.org/
37+
38+
$schemas:
39+
- https://schema.org/version/latest/schemaorg-current-http.rdf
40+
- http://edamontology.org/EDAM_1.18.owl

0 commit comments

Comments
 (0)