aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2024-09-11 15:58:25 +0100
committerArun Isaac2024-09-11 15:59:13 +0100
commit7ee4844373b31c43eb1d1a2cbf46edfab0b7a71b (patch)
tree0a0d53669796257c9c7f27604aa1ade1487c05fb
parent5ef416199d69090219261b367a74b9e374579ef8 (diff)
downloadravanan-7ee4844373b31c43eb1d1a2cbf46edfab0b7a71b.tar.gz
ravanan-7ee4844373b31c43eb1d1a2cbf46edfab0b7a71b.tar.lz
ravanan-7ee4844373b31c43eb1d1a2cbf46edfab0b7a71b.zip
workflow: Ensure required inputs are specified.
* ravanan/workflow.scm: Import (ravanan ui). (run-workflow): Error out when required inputs are not specified.
-rw-r--r--ravanan/workflow.scm9
1 files changed, 9 insertions, 0 deletions
diff --git a/ravanan/workflow.scm b/ravanan/workflow.scm
index 87458e0..98e7f1c 100644
--- a/ravanan/workflow.scm
+++ b/ravanan/workflow.scm
@@ -29,6 +29,7 @@
#:use-module (ravanan vectors)
#:use-module (ravanan work command-line-tool)
#:use-module (ravanan work utils)
+ #:use-module (ravanan ui)
#:export (run-workflow))
(define %supported-requirements
@@ -286,6 +287,14 @@ authenticate to the slurm API with. @var{slurm-api-endpoint} and
(else
(error "output not found" output-id)))))
+ ;; Ensure required inputs are specified.
+ (vector-for-each (lambda (input)
+ (let ((input-id (assoc-ref input "id")))
+ (unless (or (optional-input? input)
+ (assoc input-id inputs))
+ (user-error "Required input `~a' not specified"
+ input-id))))
+ (assoc-ref cwl "inputs"))
(let ((cell-values
(run-propnet
(propnet (workflow->propagators name cwl)