summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorArun Isaac2021-06-22 08:35:37 +0530
committerArun Isaac2021-06-22 08:35:37 +0530
commitb78afadc51c4c5666114fab26db31e0199c1f50c (patch)
tree5b80bfae3ae93592fe722ec72f624da9211648ea /doc
parentf99a10235c437899448f2a2cd112e5d9a7c16464 (diff)
downloadccwl-b78afadc51c4c5666114fab26db31e0199c1f50c.tar.gz
ccwl-b78afadc51c4c5666114fab26db31e0199c1f50c.tar.lz
ccwl-b78afadc51c4c5666114fab26db31e0199c1f50c.zip
doc: Specify command inputs in a separate argument.
* doc/capture-output-file-with-parameter-reference.scm, doc/capture-output-file.scm, doc/capture-stdout.scm, doc/checksum.scm, doc/decompress-compile-run.scm, doc/hello-world.scm: Specify command inputs in a separate argument. * doc/ccwl.skb (Tutorial)[First example]: Update description of command definition accordingly.
Diffstat (limited to 'doc')
-rw-r--r--doc/capture-output-file-with-parameter-reference.scm10
-rw-r--r--doc/capture-output-file.scm9
-rw-r--r--doc/capture-stdout.scm5
-rw-r--r--doc/ccwl.skb16
-rw-r--r--doc/checksum.scm15
-rw-r--r--doc/decompress-compile-run.scm19
-rw-r--r--doc/hello-world.scm3
7 files changed, 45 insertions, 32 deletions
diff --git a/doc/capture-output-file-with-parameter-reference.scm b/doc/capture-output-file-with-parameter-reference.scm
index 3104fae..bb5476b 100644
--- a/doc/capture-output-file-with-parameter-reference.scm
+++ b/doc/capture-output-file-with-parameter-reference.scm
@@ -1,9 +1,9 @@
(define extract-specific-file
- (command #:run "tar" "--extract" "--file" (input 'archive #:type 'File)
- (input 'extractfile #:type 'string)
- #:outputs (output 'extracted-file
- #:type 'File
- #:binding '((glob . "$(inputs.extractfile)")))))
+ (command #:inputs (archive #:type 'File) (extractfile #:type 'string)
+ #:run "tar" "--extract" "--file" archive extractfile
+ #:outputs (extracted-file
+ #:type 'File
+ #:binding '((glob . "$(inputs.extractfile)")))))
(workflow ((archive #:type File) (extractfile #:type string))
(extract-specific-file #:archive archive #:extractfile extractfile))
diff --git a/doc/capture-output-file.scm b/doc/capture-output-file.scm
index b13549e..6c5dbbd 100644
--- a/doc/capture-output-file.scm
+++ b/doc/capture-output-file.scm
@@ -1,8 +1,9 @@
(define extract
- (command #:run "tar" "--extract" "--file" (input 'archive #:type 'File)
- #:outputs (output 'extracted-file
- #:type 'File
- #:binding '((glob . "hello.txt")))))
+ (command #:inputs (archive #:type 'File)
+ #:run "tar" "--extract" "--file" archive
+ #:outputs (extracted-file
+ #:type 'File
+ #:binding '((glob . "hello.txt")))))
(workflow ((archive #:type File))
(extract #:archive archive))
diff --git a/doc/capture-stdout.scm b/doc/capture-stdout.scm
index 1f26a95..6913809 100644
--- a/doc/capture-stdout.scm
+++ b/doc/capture-stdout.scm
@@ -1,6 +1,7 @@
(define print
- (command #:run "echo" (input 'message #:type 'string)
- #:outputs (output 'printed-message #:type 'stdout)))
+ (command #:inputs (message #:type 'string)
+ #:run "echo" message
+ #:outputs (printed-message #:type 'stdout)))
(workflow ((message #:type string))
(print #:message message))
diff --git a/doc/ccwl.skb b/doc/ccwl.skb
index 57baa94..f31cba8 100644
--- a/doc/ccwl.skb
+++ b/doc/ccwl.skb
@@ -58,12 +58,16 @@ string.])
(p [The first form in this code defines the ,(code "print")
command. This form is the equivalent of defining a
-,(code "CommandLineTool") class workflow in CWL. All arguments after
-,(code "#:run") specify the command that will be run. One of those
-arguments ,(code "(input 'message #:type 'string)") refers to a
-,(code "string") type input named ,(code "message"). Notice how the
-command definition is very close to a shell command, only that it is
-slightly annotated with inputs and their types.])
+,(code "CommandLineTool") class workflow in CWL. The arguments after
+,(code "#:inputs") define the inputs to the workflow. The arguments
+after ,(code "#:run") specify the command that will be run. The input
+,(code "(message #:type 'string)") defines a ,(code "string") type
+input named ,(code "message"). The command defined in the
+,(code "#:run") argument is the command itself followed by a list of
+command arguments. One of the arguments references the input
+,(code "message"). Notice how the command definition is very close to
+a shell command, only that it is slightly annotated with inputs and
+their types.])
(p [The second form describes the actual workflow and is the
equivalent of defining a ,(code "Workflow") class workflow in CWL. The
diff --git a/doc/checksum.scm b/doc/checksum.scm
index 206c2a0..4d8bfaf 100644
--- a/doc/checksum.scm
+++ b/doc/checksum.scm
@@ -1,14 +1,17 @@
(define md5sum
- (command #:run "md5sum" (input 'file #:type 'File)
- #:outputs (output 'md5 #:type 'stdout)))
+ (command #:inputs (file #:type 'File)
+ #:run "md5sum" file
+ #:outputs (md5 #:type 'stdout)))
(define sha1sum
- (command #:run "sha1sum" (input 'file #:type 'File)
- #:outputs (output 'sha1 #:type 'stdout)))
+ (command #:inputs (file #:type 'File)
+ #:run "sha1sum" file
+ #:outputs (sha1 #:type 'stdout)))
(define sha256sum
- (command #:run "sha256sum" (input 'file #:type 'File)
- #:outputs (output 'sha256 #:type 'stdout)))
+ (command #:inputs (file #:type 'File)
+ #:run "sha256sum" file
+ #:outputs (sha256 #:type 'stdout)))
(workflow ((file #:type File))
(tee (md5sum #:file file)
diff --git a/doc/decompress-compile-run.scm b/doc/decompress-compile-run.scm
index 437fb41..a2c58bb 100644
--- a/doc/decompress-compile-run.scm
+++ b/doc/decompress-compile-run.scm
@@ -1,16 +1,19 @@
(define decompress
- (command #:run "gzip" "--stdout" "--decompress" (input 'compressed #:type 'File)
- #:outputs (output 'decompressed #:type 'stdout)))
+ (command #:inputs (compressed #:type 'File)
+ #:run "gzip" "--stdout" "--decompress" compressed
+ #:outputs (decompressed #:type 'stdout)))
(define compile
- (command #:run "gcc" "-x" "c" (input 'source #:type 'File)
- #:outputs (output 'executable
- #:type 'File
- #:binding '((glob . "a.out")))))
+ (command #:inputs (source #:type 'File)
+ #:run "gcc" "-x" "c" source
+ #:outputs (executable
+ #:type 'File
+ #:binding '((glob . "a.out")))))
(define run
- (command #:run (input 'executable)
- #:outputs (output 'stdout #:type 'stdout)))
+ (command #:inputs executable
+ #:run executable
+ #:outputs (stdout #:type 'stdout)))
(workflow ((compressed-source #:type File))
(pipe (decompress #:compressed compressed-source)
diff --git a/doc/hello-world.scm b/doc/hello-world.scm
index 262b99f..1624053 100644
--- a/doc/hello-world.scm
+++ b/doc/hello-world.scm
@@ -1,5 +1,6 @@
(define print
- (command #:run "echo" (input 'message #:type 'string)))
+ (command #:inputs (message #:type 'string)
+ #:run "echo" message))
(workflow ((message #:type string))
(print #:message message))