Skip to content

Commit 72f6740

Browse files
authored
Merge pull request #491 from jmchilton/galaxy_style_testing_syntax
More generalized planemo testing enhancements.
2 parents 4126656 + 6c2e169 commit 72f6740

34 files changed

Lines changed: 904 additions & 93 deletions

docs/_writing_cwl_intro.rst

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ tool is generated.
6464
--example_input 2.fastq \
6565
--example_output 2.fasta \
6666
--container 'dukegcb/seqtk' \
67+
--test_case \
6768
--help_from_command 'seqtk seq'
6869

6970
This command generates the following CWL YAML file.
@@ -88,9 +89,49 @@ This command generates the following CWL YAML file.
8889
Applying linter new_draft... CHECK
8990
.. INFO: Modern CWL version [cwl:draft-3]
9091

91-
A later revision of this document ill discuss defining more
92-
parameters for this tool and include information on generating and
93-
running tests with planemo for CWL tools.
92+
In addition to the actual tool file, a test file will be generated
93+
using the example command and provided test data. The file contents are as
94+
follows:
95+
96+
.. literalinclude:: writing/seqtk_seq_tests_v3.yml
97+
:language: yaml
98+
99+
This file is a planemo-specific artifact. This file may contain 1 or more
100+
tests - each test is an element of the top-level list. ``tool_init`` will use
101+
the example command to build just one test.
102+
103+
Each test consists of a few parts:
104+
105+
- ``doc`` - this attribute provides a short description for the test.
106+
- ``job`` - this can be the path to a CWL job description or a job
107+
description embedded right in the test (``tool_init`` builds the latter).
108+
- ``outputs`` - this section describes the expected output for a test. Each
109+
output ID of the tool or workflow under test can appear as a key. The
110+
example above just describes expected specific output file contents exactly
111+
but many more expectations can be described.
112+
113+
The tests described in this file can be run using the planemo ``test`` (or
114+
simply ``t``) command on the original file. By default, planemo will run tool
115+
tests with Galaxy but we can also specify the use of ``cwltool`` (the
116+
reference implementation of CWL) which will be quicker and more robust until
117+
while Galaxy support for the CWL is still in development.
118+
119+
$ planemo test --no-container --engine cwltool seqtk_seq.cwl
120+
Enable beta testing mode to test artifact that isn't a Galaxy tool.
121+
All 1 test(s) executed passed.
122+
seqtk_seq_0: passed
123+
124+
We can also open up the Galaxy web inteface with this tool loaded
125+
using the ``serve`` (or just ``s``) command.
126+
127+
::
128+
129+
$ planemo s --cwl seqtk_seq.cwl
130+
...
131+
serving on http://127.0.0.1:9090
132+
133+
Open up http://127.0.0.1:9090 in a web browser to view your new
134+
tool.
94135

95136
For more information on the Common Workflow Language check out the Draft 3
96137
`User Guide`_ and Specification_.

docs/_writing_test_and_serve.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
::
33

4-
$ planemo t --galaxy_root=/path/to/galaxy
4+
$ planemo t
55
...
66
All 1 test(s) executed passed.
77
seqtk_seq[0]: passed
@@ -10,8 +10,12 @@ Now we can open Galaxy with the ``serve`` (or just ``s``).
1010

1111
::
1212

13-
$ planemo s --galaxy_root=/path/to/galaxy
13+
$ planemo s
1414
...
1515
serving on http://127.0.0.1:9090
1616

1717
Open up http://127.0.0.1:9090 in a web browser to view your new tool.
18+
19+
Serve and test can be passed various command line arguments such as
20+
``--galaxy_root`` to specify a Galaxy instance to use (by default
21+
planemo will download and manage a instance just for planemo).

docs/galaxy_changelog.html

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,7 @@
33
<head>
44
<title>Galaxy Tool Framework Changes</title>
55
<meta charset="utf-8">
6-
<style>
7-
@import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz);
8-
@import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic);
9-
@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic);
10-
11-
body { font-family: 'Droid Serif'; }
12-
h1, h2, h3 {
13-
font-family: 'Yanone Kaffeesatz';
14-
font-weight: normal;
15-
}
16-
.remark-code, .remark-inline-code { font-family: 'Ubuntu Mono'; }
17-
</style>
6+
<link rel="stylesheet" type="text/css" href="style.css">
187
</head>
198
<body>
209
<textarea id="source">

docs/images/organic_mower_wat.jpg

69 KB
Loading

docs/planemo.linters.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ planemo.linters package
44
Submodules
55
----------
66

7+
planemo.linters.doi module
8+
--------------------------
9+
10+
.. automodule:: planemo.linters.doi
11+
:members:
12+
:undoc-members:
13+
:show-inheritance:
14+
715
planemo.linters.urls module
816
---------------------------
917

docs/planemo.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ planemo.config module
5353
:undoc-members:
5454
:show-inheritance:
5555

56+
planemo.docker module
57+
---------------------
58+
59+
.. automodule:: planemo.docker
60+
:members:
61+
:undoc-members:
62+
:show-inheritance:
63+
5664
planemo.exit_codes module
5765
-------------------------
5866

docs/planemo.test.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,22 @@ planemo.test package
44
Submodules
55
----------
66

7+
planemo.test.check_output module
8+
--------------------------------
9+
10+
.. automodule:: planemo.test.check_output
11+
:members:
12+
:undoc-members:
13+
:show-inheritance:
14+
15+
planemo.test.data module
16+
------------------------
17+
18+
.. automodule:: planemo.test.data
19+
:members:
20+
:undoc-members:
21+
:show-inheritance:
22+
723
planemo.test.results module
824
---------------------------
925

docs/presentations/2016_workflows.html

Lines changed: 104 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,20 @@
33
<head>
44
<title>Planemo: A Scientific Workflow SDK</title>
55
<meta charset="utf-8">
6-
<style>
7-
@import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz);
8-
@import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic);
9-
@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic);
10-
11-
body { font-family: 'Droid Serif'; }
12-
h1, h2, h3 {
13-
font-family: 'Yanone Kaffeesatz';
14-
font-weight: normal;
15-
}
16-
.remark-code, .remark-inline-code { font-family: 'Ubuntu Mono'; }
17-
</style>
6+
<link rel="stylesheet" type="text/css" href="style.css">
187
</head>
198
<body>
209
<textarea id="source">
2110

2211
class: center, middle
2312

24-
## Planemo: A Scientific Workflow SDK
13+
layout: true
14+
class: inverse, middle
15+
16+
---
17+
class: special
18+
# Planemo: A Scientific Workflow SDK
19+
John Chilton, Aysam Guerler, and the Galaxy Team
2520

2621
---
2722

@@ -52,6 +47,9 @@
5247

5348
???
5449

50+
The editor form now uses the same backbone driven MVC components as the
51+
new tool form presented last year.
52+
5553
---
5654

5755
### GUI Enhancements - Workflow Run Form
@@ -62,6 +60,84 @@
6260

6361
???
6462

63+
The run workflow form has likewise been overhauled and will be merged soon. This
64+
should allow more dynamic option control when running workflows.
65+
66+
---
67+
68+
### GUI Enhancements - Labels
69+
70+
TODO: UPDATE IMAGE
71+
72+
![Workflow Run Form](images/gx_new_workflow_run.png)
73+
74+
???
75+
76+
When reasoning about workflows and connections between steps, persistent and unique
77+
labels for steps and outputs are important. These are useful in the API and too a
78+
lesser extent in the GUI today.
79+
80+
A major theme of this presentation is going to be that workflows are programs, they
81+
are a coding artifact. I'm not sure anyone would disagree with me on that - but I
82+
think the implications may be counter-intuitive at times.
83+
84+
---
85+
86+
### GUI Enhancements - Nested Workflows
87+
88+
TODO: UPDATE IMAGE
89+
90+
![Nested Workflows](images/gx_new_workflow_run.png)
91+
92+
???
93+
94+
Workflows are programs, languages describing programs should provide abstractions for
95+
composition. Nesting workflows was one of the most requested feature requests of
96+
Galaxy and it now supports this.
97+
98+
---
99+
100+
### What About Planemo?
101+
102+
???
103+
104+
Enough screenshots right - when I present people expect to see long command-lines!
105+
106+
---
107+
108+
### Planemo's Success
109+
110+
It is *the way* to develop Galaxy tools in 2016! Why?
111+
112+
- Artifact-centric - not Galaxy-centric or registry-centric.
113+
- Fits into existing developer workflows - CLI, Git(hub), CI (Travis).
114+
- Flexible
115+
- Well documented w/focus on usage examples.
116+
117+
It is about **developer workflow**.
118+
119+
???
120+
121+
In 2014, Greg von Kuster presented a tool development workflow that involved
122+
publishing things to a local tool shed and running tests from there and viewing
123+
the results through the web interface. I call this registry or shed centric tool
124+
development (development activities "boot strap the tool shed, upload to the tool
125+
shed, run tests against the tool shed, view results in the tool shed, export capsule
126+
from the tool shed". Prior to that tool development was Galaxy-centric - "download
127+
Galaxy, update the Galaxy tool conf, update the Galaxy test data, run the Galaxy
128+
tests." Planemo is tool centric - lint the tool, test the tool, serve the tool.
129+
130+
---
131+
132+
class: bottom
133+
background-image: url(images/organic_mower_wat.jpg)
134+
background-position: center;
135+
background-repeat: no-repeat;
136+
background-size: contain;
137+
138+
### So Planemo?
139+
140+
Photo Credit: Peter Smith (@skwiot)
65141

66142
---
67143

@@ -75,8 +151,9 @@
75151

76152
???
77153

78-
The artisinal, free range, organic text editor of my choice. It is a go
79-
lang rewrite of a node rewrite of an Erlang editor from 1987 - it is the hottest editor you've never heard of.
154+
The hippest, artisinal, free range text editor of my choice. It is a go
155+
lang rewrite of a node rewrite of an Erlang editor from 1987 - it is super hot right
156+
now but I'm sure you've never heard of.
80157

81158
---
82159

@@ -90,17 +167,24 @@
90167
\"queries\": \"[{\\\"input2\\\": null, \\\"__index__\\\": 0}]\"}",
91168
```
92169

93-
Neither human writable, nor human readable.
94-
95-
JSON doesn't allow comments - one shouldn't have to describe a
96-
configuration file in JSON let alone write a program in it.
170+
- Neither human writable, nor human readable.
171+
- JSON doesn't allow comments.
172+
- One shouldn't have to describe a configuration file in JSON,
173+
let alone write a program in it.
97174

98175
---
99176

100-
### Format 2 Workflows
177+
### Format 2 Workflows - Example
101178

102179
TODO: SHOW EXAMPLE
103180

181+
---
182+
183+
### Format 2 Workflows
184+
185+
- Started as a way to build test workflows for Galaxy testing framework.
186+
- All steps can be labeled, connections described by ID.
187+
-
104188

105189
</textarea>
106190
<script src="https://gnab.github.io/remark/downloads/remark-latest.min.js">

0 commit comments

Comments
 (0)