From e430937727b881be2b2428ad0f09a32ea0aaf198 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Fri, 22 Mar 2024 01:29:40 +0000 Subject: ccwl: Implement js-expression. js-expression corresponds to ExpressionTool in the CWL specification. * ccwl/ccwl.scm (): New type. (js-expression): New macro. (function-inputs, function-outputs, function-object): Support objects. (function-input-keys): Mention objects in docstring. * ccwl/cwl.scm (function->cwl, workflow->cwl-scm): Support 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 objects. (command->graph): Abstract to ... (single-node-workflow->graph): ... this new function. (js-expression->dot, js-expression->graph): New functions. * scripts/ccwl (main): Support objects. * doc/ccwl.skb (Cookbook){Javascript expressions via ExpressionTool}: New section. * doc/js-expression-iota.scm: New file. --- doc/js-expression-iota.scm | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 doc/js-expression-iota.scm (limited to 'doc/js-expression-iota.scm') diff --git a/doc/js-expression-iota.scm b/doc/js-expression-iota.scm new file mode 100644 index 0000000..066e4ae --- /dev/null +++ b/doc/js-expression-iota.scm @@ -0,0 +1,7 @@ +(define iota + (js-expression #:inputs (n #:type int) + #:expression "$({\"sequence\": Array.from(Array(inputs.n).keys())})" + #:outputs (sequence #:type (array int)))) + +(workflow ((n #:type int)) + (iota #:n n)) -- cgit v1.2.3