From 676322e6756c9a3b52d8cd1d0e6fd39f7ccc7983 Mon Sep 17 00:00:00 2001
From: Arun Isaac
Date: Tue, 1 Jun 2021 14:53:34 +0530
Subject: Introduce new command definition syntax.
* ccwl/ccwl.scm: Do not export input and output.
(): Delete source field. Add position field.
(input): Accept position and prefix fields in constructor. Do not
initialize non-existent source field.
(): Delete additional-inputs field. Add inputs field. Delete
set-command-outputs and set-command-stdin setters.
(command): Rewrite as macro that accepts new command definition
syntax.
(): Delete type.
(command->cwl): Generate CWL from new type.
(command-input-keys): Simplify to support new type.
---
ccwl/ccwl.scm | 204 ++++++++++++++++++++++++++++++++--------------------------
1 file changed, 111 insertions(+), 93 deletions(-)
diff --git a/ccwl/ccwl.scm b/ccwl/ccwl.scm
index 81f9a13..55db7a0 100644
--- a/ccwl/ccwl.scm
+++ b/ccwl/ccwl.scm
@@ -33,8 +33,6 @@
#:use-module (ccwl yaml)
#:export (command
workflow
- input
- output
step
pipeline
write-cwl))
@@ -42,13 +40,13 @@
(define %cwl-version "v1.2")
(define-immutable-record-type
- (make-input id type label default source prefix other)
+ (make-input id type label default position prefix other)
input?
(id input-id)
(type input-type)
(label input-label)
(default input-default)
- (source input-source set-input-source)
+ (position input-position)
(prefix input-prefix)
(other input-other))
@@ -56,14 +54,10 @@
(make-unspecified-default)
unspecified-default?)
-(define* (input id #:key (type 'File) label (default (make-unspecified-default)) (other '()))
+(define* (input id #:key (type 'File) label (default (make-unspecified-default)) position prefix (other '()))
"Build and return an object."
- ;; The user should never set source, and should not set prefix
- ;; directly during construction of the object. Hence, do not
- ;; expose it as a parameter of this constructor.
- (let ((source #f)
- (prefix #f))
- (make-input id type label default source prefix other)))
+ (make-input id type label default position prefix other))
+
(define-immutable-record-type