From 0b359cf2c32cde81b4311d55273c8f6c14ca6b93 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Tue, 2 Nov 2021 01:17:41 +0530 Subject: ccwl: Support external CWL workflows. * ccwl/ccwl.scm: Import (yaml). Export cwl-workflow?, cwl-workflow, cwl-workflow-file, cwl-workflow-inputs and cwl-workflow-outputs. (): New type. (cwl-workflow, function-input-keys, function-outputs, function-object): New functions. (command-input-keys, command-object): Delete functions. (collect-steps): Replace command-object with function-object, command-input-keys with function-input-keys and command-outputs with function-outputs. * ccwl/cwl.scm (workflow->cwl-scm): Handle objects. * tests/ccwl.scm ("read all forms of inputs and outputs from a CWL workflow"): New test. * guix.scm: Import (gnu packages guile-xyz) and (guix utils). (guile-libyaml): New variable. (ccwl)[inputs]: Add guile-libyaml. --- tests/ccwl.scm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests/ccwl.scm') diff --git a/tests/ccwl.scm b/tests/ccwl.scm index 8f09fea..5d8a17f 100644 --- a/tests/ccwl.scm +++ b/tests/ccwl.scm @@ -34,4 +34,18 @@ 'file) 'inputBinding))) +(test-equal "read all forms of inputs and outputs from a CWL workflow" + '(((spam string)) + ((ham stdout) + (eggs stdout))) + (let ((cwl-workflow (cwl-workflow "tests/input-output-parameters.cwl"))) + (list (map (lambda (input) + (list (input-id input) + (input-type input))) + (cwl-workflow-inputs cwl-workflow)) + (map (lambda (output) + (list (output-id output) + (output-type output))) + (cwl-workflow-outputs cwl-workflow))))) + (test-end "ccwl") -- cgit v1.2.3