aboutsummaryrefslogtreecommitdiff
path: root/doc/ccwl.skb
diff options
context:
space:
mode:
authorArun Isaac2024-03-22 01:29:40 +0000
committerArun Isaac2024-03-22 01:48:25 +0000
commite430937727b881be2b2428ad0f09a32ea0aaf198 (patch)
treef824400ca255da28d25a23b8e4486de7c14b4f0b /doc/ccwl.skb
parentd005c17106add8bd9ab07eddc30e9cf9b17de544 (diff)
downloadccwl-e430937727b881be2b2428ad0f09a32ea0aaf198.tar.gz
ccwl-e430937727b881be2b2428ad0f09a32ea0aaf198.tar.lz
ccwl-e430937727b881be2b2428ad0f09a32ea0aaf198.zip
ccwl: Implement js-expression.
js-expression corresponds to ExpressionTool in the CWL specification. * ccwl/ccwl.scm (<js-expression>): New type. (js-expression): New macro. (function-inputs, function-outputs, function-object): Support <js-expression> objects. (function-input-keys): Mention <js-expression> objects in docstring. * ccwl/cwl.scm (function->cwl, workflow->cwl-scm): Support <js-expression> objects. (command->cwl-scm): Move staging requirements handling to ... (staging-requirements): ... this new function. (js-expression->cwl, js-expression->cwl-scm): New functions. * ccwl/graphviz.scm (function->dot): Support <js-expression> objects. (command->graph): Abstract to ... (single-node-workflow->graph): ... this new function. (js-expression->dot, js-expression->graph): New functions. * scripts/ccwl (main): Support <js-expression> objects. * doc/ccwl.skb (Cookbook){Javascript expressions via ExpressionTool}: New section. * doc/js-expression-iota.scm: New file.
Diffstat (limited to 'doc/ccwl.skb')
-rw-r--r--doc/ccwl.skb12
1 files changed, 10 insertions, 2 deletions
diff --git a/doc/ccwl.skb b/doc/ccwl.skb
index cb78fd5..23bd798 100644
--- a/doc/ccwl.skb
+++ b/doc/ccwl.skb
@@ -1,5 +1,5 @@
;;; ccwl --- Concise Common Workflow Language
-;;; Copyright © 2021, 2023 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2021, 2023–2024 Arun Isaac <arunisaac@systemreboot.net>
;;;
;;; This file is part of ccwl.
;;;
@@ -389,7 +389,15 @@ the external CWL workflow.]
keys forward to the output. This is what the ,(code [identity])
construct is for. An example follows.]
(scheme-source "doc/identity-construct.scm")
- (image :file "doc/identity-construct.png"))))
+ (image :file "doc/identity-construct.png")))
+ (section :title [Javascript expressions via ExpressionTool]
+ :ident "javascript-expressions-via-expressiontool"
+ (p [ccwl supports CWL's ,(samp "ExpressionTool") using its
+,(code "js-expression") construct. The ,(code "js-expression")
+construct may be invoked from within workflows just like ,(code
+"command") constructs can be. Here's a workflow that uses ,(code
+"js-expression") to construct an array of numbers from 0 to n-1.]
+ (scheme-source "doc/js-expression-iota.scm"))))
(chapter :title [Contributing]
:ident "chapter-contributing"