Skip to content

Commit cf68ac4

Browse files
committed
sync with template; fix lesson-check
1 parent 1200fb4 commit cf68ac4

File tree

185 files changed

+1293
-1444
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+1293
-1444
lines changed

CONDUCT.md renamed to CODE_OF_CONDUCT.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
layout: page
33
title: "Contributor Code of Conduct"
4-
permalink: /conduct/
54
---
65
As contributors and maintainers of this project,
76
we pledge to respect all people who contribute through reporting issues,

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ This is a good way to introduce yourself
2727
and to meet some of our community members.
2828

2929
1. If you do not have a [GitHub][github] account,
30-
you can [send us comments by email][contact].
30+
you can [send us comments by email][discuss-list].
3131
However,
3232
we will be able to respond more quickly if you use one of the other methods described below.
3333

Makefile

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ RMD_DST = $(patsubst _episodes_rmd/%.Rmd,_episodes/%.md,$(RMD_SRC))
6363
# Lesson source files in the order they appear in the navigation menu.
6464
MARKDOWN_SRC = \
6565
index.md \
66-
CONDUCT.md \
66+
CODE_OF_CONDUCT.md \
6767
setup.md \
6868
$(sort $(wildcard _episodes/*.md)) \
6969
reference.md \
@@ -88,27 +88,17 @@ ${RMD_DST} : ${RMD_SRC}
8888
@bin/knit_lessons.sh ${RMD_SRC}
8989

9090
## lesson-check : validate lesson Markdown.
91-
lesson-check :
91+
lesson-check : lesson-fixme
9292
@bin/lesson_check.py -s . -p ${PARSER} -r _includes/links.md
9393

9494
## lesson-check-all : validate lesson Markdown, checking line lengths and trailing whitespace.
9595
lesson-check-all :
9696
@bin/lesson_check.py -s . -p ${PARSER} -l -w
9797

98-
## lesson-figures : re-generate inclusion displaying all figures.
99-
lesson-figures :
100-
@bin/extract_figures.py -p ${PARSER} ${MARKDOWN_SRC} > _includes/all_figures.html
101-
10298
## unittest : run unit tests on checking tools.
10399
unittest :
104100
python bin/test_lesson_check.py
105101

106-
RUNNER=cwl-runner
107-
108-
## unittest-examples: run unit tests for the examples
109-
unittest-examples :
110-
cd _includes/cwl; cwltest --test=conformance-test.yml --tool=${RUNNER}
111-
112102
## lesson-files : show expected names of generated files for debugging.
113103
lesson-files :
114104
@echo 'RMD_SRC:' ${RMD_SRC}

_config.yml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ title: "Common Workflow Language User Guide"
1111
# Contact. This *must* include the protocol: if it's an email
1212
# address, it must look like "mailto:lessons@software-carpentry.org",
1313
# or if it's a URL, "https://gitter.im/username/ProjectName".
14-
contact: "http://www.commonwl.org/#Support"
14+
email: "http://www.commonwl.org/#Support"
1515

1616
#------------------------------------------------------------
1717
# Generic settings (should not need to change).
@@ -34,8 +34,8 @@ repository: common-workflow-language/user-guide
3434
# template_repo: "https://github.com/swcarpentry/styles"
3535
# example_repo: "https://github.com/swcarpentry/lesson-example"
3636
# example_site: "https://swcarpentry.github.com/lesson-example"
37-
# workshop_repo: "https://github.com/swcarpentry/workshop-template"
38-
# workshop_site: "https://swcarpentry.github.io/workshop-template"
37+
workshop_repo: "https://github.com/swcarpentry/workshop-template"
38+
workshop_site: "https://swcarpentry.github.io/workshop-template"
3939
# training_site: "https://swcarpentry.github.io/instructor-training"
4040

4141
# Surveys.
@@ -50,24 +50,34 @@ start_time: 0
5050
collections:
5151
episodes:
5252
output: true
53-
permalink: /:path/
53+
permalink: /:path/index.html
5454
extras:
5555
output: true
56+
permalink: /:path/index.html
5657

5758
# Set the default layout for things in the episodes collection.
5859
defaults:
5960
- values:
60-
root: ..
61+
root: .
62+
layout: page
6163
- scope:
6264
path: ""
6365
type: episodes
6466
values:
67+
root: ..
6568
layout: episode
69+
- scope:
70+
path: ""
71+
type: extras
72+
values:
73+
root: ..
74+
layout: page
6675

6776
# Files and directories that are not to be copied.
6877
exclude:
6978
- Makefile
70-
- bin
79+
- bin/
80+
- .Rproj.user/
7181

72-
# Turn off built-in syntax highlighting.
73-
highlighter: false
82+
# Turn on built-in syntax highlighting.
83+
highlighter: rouge

_episodes/01-introduction.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,5 @@ technologies such as Docker and be used with CWL implementations from different
2828
vendors. CWL is well suited for describing large-scale workflows in cluster,
2929
cloud and high performance computing environments where tasks are scheduled in
3030
parallel across many nodes.
31+
32+
{% include links.md %}

_episodes/02-1st-example.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,4 @@ This tool has no formal output, so the `outputs` section is an empty list.
8282

8383
[json]: http://json.org
8484
[yaml]: http://yaml.org
85+
{% include links.md %}

_episodes/03-input.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,3 +151,4 @@ is optional. The default position is 0.
151151
The `baseCommand` field will always appear in the final command line before the parameters.
152152

153153
[touch]: http://www.linfo.org/touch.html
154+
{% include links.md %}

_episodes/04-output.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ wrapper and the input object on the command line:
4444
$ touch hello.txt && tar -cvf hello.tar hello.txt
4545
$ cwl-runner tar.cwl tar-job.yml
4646
[job tar.cwl] /tmp/tmpqOeawQ$ tar \
47-
xf \
47+
--extract --file \
4848
/tmp/tmpGDk8Y1/stg80bbad20-494d-47af-8075-dffc32df03a3/hello.tar
4949
[job tar.cwl] completed success
5050
{
@@ -77,3 +77,5 @@ outputs:
7777

7878
The `glob` field consists of the name of a file in the output directory.
7979
If you don't know name of the file in advance, you can use a wildcard pattern like `glob: '*.txt'`.
80+
81+
{% include links.md %}

_episodes/05-stdout.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,4 @@ Final process status is success
5252
5353
~~~
5454
{: .output}
55+
{% include links.md %}

_episodes/06-params.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ input object on the command line:
3737
$ rm hello.tar || true && touch goodbye.txt && tar -cvf hello.tar goodbye.txt
3838
$ cwl-runner tar-param.cwl tar-param-job.yml
3939
[job tar-param.cwl] /tmp/tmpwH4ouT$ tar \
40-
xf \
40+
--extract --file \
4141
/tmp/tmpREYiEt/stgd7764383-99c9-4848-af51-7c2d6e5527d9/hello.tar \
4242
goodbye.txt
4343
[job tar-param.cwl] completed success
4444
{
45-
"example_out": {
45+
"extracted_file": {
4646
"checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
4747
"basename": "goodbye.txt",
4848
"nameroot": "goodbye",
@@ -62,7 +62,7 @@ These are evaluated and replaced with value being referenced.
6262

6363
~~~
6464
outputs:
65-
example_out:
65+
extracted_out:
6666
type: File
6767
outputBinding:
6868
glob: $(inputs.extractfile)
@@ -80,3 +80,5 @@ Note that because `File` parameters are objects, to get the path to an
8080
input file you must reference the path field on a file object; to
8181
reference the path to the tar file in the above example you would write
8282
`$(inputs.tarfile.path)`.
83+
84+
{% include links.md %}

_episodes/07-containers.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,4 @@ the container, as reflected in the invocation of the `node` command.
8989

9090

9191
[docker]: https://docker.io
92+
{% include links.md %}

_episodes/08-arguments.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,4 @@ designated output directory. Other parameters include `$(runtime.tmpdir)`,
9292
CWL specification for details.
9393

9494
[runtime]: http://www.commonwl.org/v1.0/CommandLineTool.html#Runtime_environment
95+
{% include links.md %}

_episodes/09-array-inputs.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,5 @@ Note that the arrays of inputs are specified inside square brackets `[]` in `arr
7777
array values that are not defined with an associated key is marked by a leading
7878
`-`, as demonstrated in the next lesson.
7979
You can specify arrays of arrays, arrays of records, and other complex types.
80+
81+
{% include links.md %}

_episodes/10-array-outputs.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ Final process status is success
3838
"output": [
3939
{
4040
"size": 0,
41-
"location": "/home/peter/work/common-workflow-language/draft-3/examples/foo.txt",
41+
"location": "foo.txt",
4242
"checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
4343
"class": "File"
4444
},
4545
{
4646
"size": 0,
47-
"location": "/home/peter/work/common-workflow-language/draft-3/examples/baz.txt",
47+
"location": "baz.txt",
4848
"checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
4949
"class": "File"
5050
}
@@ -56,3 +56,5 @@ Final process status is success
5656
The array of expected outputs is specified in `array-outputs-job.yml` with each
5757
entry marked by a leading `-`. This format can also be used in CWL descriptions
5858
to mark entries in arrays, as demonstrated in several of the upcoming sections.
59+
60+
{% include links.md %}

_episodes/11-records.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,5 @@ $ cat output.txt
113113

114114
In the third example, only `itemD` is provided, so it appears on the
115115
command line.
116+
117+
{% include links.md %}

_episodes/12-env.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,4 @@ HOME=/home/example
5555
TMPDIR=/tmp/tmp63Obpk
5656
~~~
5757
{: .output}
58+
{% include links.md %}

_episodes/13-expressions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,4 @@ You can only use expressions in certain fields. These are:
114114

115115
[file-prop]: http://www.commonwl.org/v1.0/CommandLineTool.html#File
116116
[rec-practices]: http://www.commonwl.org/user_guide/rec-practices/
117+
{% include links.md %}

_episodes/14-runtime.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,4 @@ $ cat output.txt
5252
CONFIGVAR=Hello world!
5353
~~~
5454
{: .output}
55+
{% include links.md %}

_episodes/15-staging.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,4 @@ Final process status is success
4949
}
5050
~~~
5151
{: .output}
52+
{% include links.md %}

_episodes/16-file-formats.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,4 @@ Final process status is success
8585

8686
[IANA]: https://www.iana.org/assignments/media-types/media-types.xhtml
8787
[EDAM]: http://www.ebi.ac.uk/ols/ontologies/edam/terms?iri=http%3A%2F%2Fedamontology.org%2Fformat_1915
88+
{% include links.md %}

_episodes/17-metadata.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,4 @@ requirements in order to use the tool, and a few more metadata fields.
4545
{: .source}
4646

4747
[schema-salad]: http://www.commonwl.org/v1.0/SchemaSalad.html#Explicit_context
48+
{% include links.md %}

_episodes/19-custom-types.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,4 @@ the software that the description was written for and other useful metadata.
9898
These features are discussed further in other chapters of this user guide.
9999

100100
[biom]: http://biom-format.org/
101+
{% include links.md %}

_episodes/20-software-requirements.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,4 @@ include the DOI for the main tool citation and the URL to the tool.
5757
[dependencies]: https://github.com/common-workflow-language/cwltool#leveraging-softwarerequirements-beta
5858
[identifiers]: https://identifiers.org/
5959
[scicrunch-add-tool]: https://scicrunch.org/page/tutorials/336
60+
{% include links.md %}

_episodes/21-1st-workflow.md

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ compiles it.
2323
~~~
2424
{: .source}
2525

26-
<a href="https://view.commonwl.org/workflows/github.com/common-workflow-language/user_guide/blob/gh-pages/_includes/cwl/21-1st-workflow/1st-workflow.cwl"><img src="https://view.commonwl.org/graph/svg/github.com/common-workflow-language/user_guide/blob/gh-pages/_includes/cwl/21-1st-workflow/1st-workflow.cwl" alt="Visualization of 1st-workflow.cwl" /></a>
26+
> ## Visualization of 1st-workflow.cwl
27+
> <a href="https://view.commonwl.org/workflows/github.com/common-workflow-language/user_guide/blob/gh-pages/_includes/cwl/21-1st-workflow/1st-workflow.cwl"><img src="https://view.commonwl.org/graph/svg/github.com/common-workflow-language/user_guide/blob/gh-pages/_includes/cwl/21-1st-workflow/1st-workflow.cwl" alt="Visualization of 1st-workflow.cwl" /></a>
28+
{: .callout}
2729

2830
Use a JSON object in a separate file to describe the input of a run:
2931

@@ -40,14 +42,14 @@ command line:
4042
~~~
4143
$ echo "public class Hello {}" > Hello.java && tar -cvf hello.tar Hello.java
4244
$ cwl-runner 1st-workflow.cwl 1st-workflow-job.yml
43-
[job untar] /tmp/tmp94qFiM$ tar xf /home/example/hello.tar Hello.java
45+
[job untar] /tmp/tmp94qFiM$ tar --create --file /home/example/hello.tar Hello.java
4446
[step untar] completion status is success
4547
[job compile] /tmp/tmpu1iaKL$ docker run -i --volume=/tmp/tmp94qFiM/Hello.java:/var/lib/cwl/job301600808_tmp94qFiM/Hello.java:ro --volume=/tmp/tmpu1iaKL:/var/spool/cwl:rw --volume=/tmp/tmpfZnNdR:/tmp:rw --workdir=/var/spool/cwl --read-only=true --net=none --user=1001 --rm --env=TMPDIR=/tmp java:7 javac -d /var/spool/cwl /var/lib/cwl/job301600808_tmp94qFiM/Hello.java
4648
[step compile] completion status is success
4749
[workflow 1st-workflow.cwl] outdir is /home/example
4850
Final process status is success
4951
{
50-
"classout": {
52+
"compiled_class": {
5153
"location": "/home/example/Hello.class",
5254
"checksum": "sha1$e68df795c0686e9aa1a1195536bd900f5f417b18",
5355
"class": "File",
@@ -71,8 +73,8 @@ document. The `class` field indicates this document describes a workflow.
7173

7274
~~~
7375
inputs:
74-
inp: File
75-
ex: string
76+
tarball: File
77+
name_of_file_to_extract: string
7678
~~~
7779
{: .source}
7880

@@ -83,7 +85,7 @@ specific workflows steps.
8385

8486
~~~
8587
outputs:
86-
classout:
88+
compiled_class:
8789
type: File
8890
outputSource: compile/classfile
8991
~~~
@@ -92,16 +94,16 @@ outputs:
9294
The `outputs` section describes the outputs of the workflow. This is a
9395
list of output parameters where each parameter consists of an identifier
9496
and a data type. The `outputSource` connects the output parameter `classfile`
95-
of the `compile` step to the workflow output parameter `classout`.
97+
of the `compile` step to the workflow output parameter `compiled_class`.
9698

9799
~~~
98100
steps:
99101
untar:
100102
run: tar-param.cwl
101103
in:
102-
tarfile: inp
103-
extractfile: ex
104-
out: [example_out]
104+
tarfile: tarball
105+
extractfile: name_of_file_to_extract
106+
out: [extracted_file]
105107
~~~
106108
{: .source}
107109

@@ -114,13 +116,15 @@ instead the order is determined by the dependencies between steps (using
114116
another may run in parallel.
115117

116118
The first step, `untar` runs `tar-param.cwl` (described previously in
117-
[Parameter references][params]). This tool has two input parameters, `tarfile`
118-
and `extractfile` and one output parameter `example_out`.
119+
[Parameter references]({{ page.root }}{% link _episodes/06-params.md %})).
120+
This tool has two input parameters, `tarfile` and `extractfile` and one output
121+
parameter `example_out`.
119122

120123
The ``in`` section of the workflow step connects these two input parameters to
121-
the inputs of the workflow, `inp` and `ex` using `source`. This means that when
122-
the workflow step is executed, the values assigned to `inp` and `ex` will be
123-
used for the parameters `tarfile` and `extractfile` in order to run the tool.
124+
the inputs of the workflow, `tarball` and `name_of_file_to_extract` using
125+
`source`. This means that when the workflow step is executed, the values
126+
assigned to `tarball` and `name_of_file_to_extract` will be used for the
127+
parameters `tarfile` and `extractfile` in order to run the tool.
124128

125129
The `out` section of the workflow step lists the output parameters that are
126130
expected from the tool.
@@ -129,14 +133,14 @@ expected from the tool.
129133
compile:
130134
run: arguments.cwl
131135
in:
132-
src: untar/example_out
136+
src: untar/extracted_file
133137
out: [classfile]
134138
~~~
135139
{: .source}
136140

137141
The second step `compile` depends on the results from the first step by
138142
connecting the input parameter `src` to the output parameter of `untar` using
139-
`untar/example_out`. The output of this step `classfile` is connected to the
143+
`untar/extracted_file`. The output of this step `classfile` is connected to the
140144
`outputs` section for the Workflow, described above.
141145

142-
[params]: ../06-params/
146+
{% include links.md %}

0 commit comments

Comments
 (0)