aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorArun Isaac2024-05-30 02:22:30 +0100
committerArun Isaac2024-05-30 02:22:30 +0100
commit40db32d3c36b4e304b9c8e39ae7f252aef5522d7 (patch)
treef6a12f8cfd8944a8d8382b0196bb59952b2a1c67 /doc
parent9bacaf6df1fa3e2b1f66441ebc197906c9dafc5c (diff)
downloadccwl-40db32d3c36b4e304b9c8e39ae7f252aef5522d7.tar.gz
ccwl-40db32d3c36b4e304b9c8e39ae7f252aef5522d7.tar.lz
ccwl-40db32d3c36b4e304b9c8e39ae7f252aef5522d7.zip
doc: Document passing in arbitrary CWL Requirements.
* doc/ccwl.skb (Cookbook)[Pass in arbitrary CWL Requirements]: New section. * doc/inline-javascript-requirement.scm, doc/resource-requirement.scm: New files.
Diffstat (limited to 'doc')
-rw-r--r--doc/ccwl.skb13
-rw-r--r--doc/inline-javascript-requirement.scm3
-rw-r--r--doc/resource-requirement.scm3
3 files changed, 19 insertions, 0 deletions
diff --git a/doc/ccwl.skb b/doc/ccwl.skb
index fb4f665..700406d 100644
--- a/doc/ccwl.skb
+++ b/doc/ccwl.skb
@@ -343,6 +343,19 @@ to ,(emph "stage") the input file into the output directory. We may
express this in ccwl using the ,(code "#:stage?") parameter to the
inputs to be staged. Here is a rather concocted example.]
(scheme-source "doc/staging-input-files.scm")))
+ (section :title [Pass in arbitrary CWL Requirements]
+ :ident "section-pass-in-arbitrary-cwl-requirements"
+ (p [Sometimes it is necessary to pass in arbitrary CWL
+Requirments that are not explicitly supported by ccwl. You can do this
+using the ,(code "#:requirements") parameter. The ,(code
+"#:requirements") parameter must be a scheme tree that is serializable
+to YAML (to put it more bluntly, a tree that ,(ref :url
+"https://github.com/mwette/guile-libyaml/" :text "guile-libyaml") will
+accept). Here are a couple of examples passing in an ,(code
+"InlineJavascriptRequirement") and a ,(code "ResourceRequirement")
+respectively.]
+ (scheme-source "doc/inline-javascript-requirement.scm")
+ (scheme-source "doc/resource-requirement.scm")))
(section :title [Array types]
:ident "section-array-types"
(p [ccwl supports array types using the following syntax.]
diff --git a/doc/inline-javascript-requirement.scm b/doc/inline-javascript-requirement.scm
new file mode 100644
index 0000000..1b2a80f
--- /dev/null
+++ b/doc/inline-javascript-requirement.scm
@@ -0,0 +1,3 @@
+(command #:inputs (number #:type int)
+ #:run "echo" "$(1 + inputs.number)"
+ #:requirements ((InlineJavascriptRequirement)))
diff --git a/doc/resource-requirement.scm b/doc/resource-requirement.scm
new file mode 100644
index 0000000..a29d17b
--- /dev/null
+++ b/doc/resource-requirement.scm
@@ -0,0 +1,3 @@
+(command #:run "some-command"
+ #:requirements ((ResourceRequirement
+ (coresMin . 4))))