From 40db32d3c36b4e304b9c8e39ae7f252aef5522d7 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 30 May 2024 02:22:30 +0100 Subject: 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. --- doc/ccwl.skb | 13 +++++++++++++ doc/inline-javascript-requirement.scm | 3 +++ doc/resource-requirement.scm | 3 +++ 3 files changed, 19 insertions(+) create mode 100644 doc/inline-javascript-requirement.scm create mode 100644 doc/resource-requirement.scm (limited to 'doc') 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)))) -- cgit v1.2.3