From a5fa8d018e650cf359e4ecd8774c600ccf7cade0 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 28 Sep 2023 22:48:59 +0100 Subject: cwl: Add generic workflow or command serialization function. * ccwl/cwl.scm (workflow-or-command->cwl): New public function. --- ccwl/cwl.scm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ccwl/cwl.scm b/ccwl/cwl.scm index 30ec6ec..4c4fef0 100644 --- a/ccwl/cwl.scm +++ b/ccwl/cwl.scm @@ -29,10 +29,18 @@ #:use-module (ccwl utils) #:use-module (ccwl yaml) #:export (workflow->cwl - command->cwl)) + command->cwl + workflow-or-command->cwl)) (define %cwl-version "v1.2") +(define workflow-or-command->cwl + (match-lambda* + (((? workflow? workflow) port) + (workflow->cwl workflow port)) + (((? command? command) port) + (command->cwl command port)))) + (define (workflow->cwl workflow port) "Render WORKFLOW, a object, to PORT as a CWL YAML specification." -- cgit v1.2.3