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. --- scripts/ccwl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/ccwl b/scripts/ccwl index 43cf224..984d22a 100755 --- a/scripts/ccwl +++ b/scripts/ccwl @@ -123,10 +123,11 @@ Compile SOURCE-FILE. (let ((result (load (canonicalize-path (assq-ref args 'source-file)) read-syntax))) (if (or (command? result) + (js-expression? result) (workflow? result)) result (raise-exception - (condition (formatted-message "Last expression in file ~a returns neither workflow nor command" + (condition (formatted-message "Last expression in file ~a returns none of workflow, command or js-expression" (assq-ref args 'source-file))))))) (current-output-port))))) ((program args ...) -- cgit v1.2.3