From cdf73381424d458b0997bef74384f984b08d9b83 Mon Sep 17 00:00:00 2001 From: mancini <mancini@astron.nl> Date: Thu, 28 Nov 2019 11:16:44 +0100 Subject: [PATCH] Add LoSoTo Duplicate step Former-commit-id: e98ca4e4ba7f5b62b9304e3571685989bd4e78be --- .gitlab-ci.yml | 6 +++++ steps/LoSoTo.Duplicate.cwl | 48 ++++++++++++++++++++++++++++++++++ test_jobs/losoto_duplicate.cwl | 7 +++++ 3 files changed, 61 insertions(+) create mode 100644 steps/LoSoTo.Duplicate.cwl create mode 100644 test_jobs/losoto_duplicate.cwl diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c6e83769..5585ff5f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -68,6 +68,12 @@ losoto_abs: script: - cwl-runner --no-container steps/LoSoTo.Abs.cwl test_jobs/losoto_abs.json +losoto_duplicate: + stage: test_steps + allow_failure: true + scripts: + - cwl-runner --no-container steps/LoSoTo.Duplicate.cwl test_jobs/losoto_duplicate.json + losoto_plot: stage: test_steps allow_failure: true diff --git a/steps/LoSoTo.Duplicate.cwl b/steps/LoSoTo.Duplicate.cwl new file mode 100644 index 00000000..777f6a6b --- /dev/null +++ b/steps/LoSoTo.Duplicate.cwl @@ -0,0 +1,48 @@ +#!/usr/bin/env cwl-runner + +class: CommandLineTool +cwlVersion: v1.0 +id: losoto_duplicate + +doc: | + Duplicate a table + +requirements: + InlineJavascriptRequirement: {} + InitialWorkDirRequirement: + listing: + - entryname: 'parset.config' + entry: | + [duplicate] + soltab = $(inputs.soltab) + operation = DUPLICATE + $(inputs.soltabOut !== null? 'soltabOut=' + inputs.soltabOut: '') + + - entryname: $(inputs.input_h5parm.basename) + entry: $(inputs.input_h5parm) + writable: true + +baseCommand: "losoto" + +arguments: + - $(inputs.input_h5parm.basename) + - parset.config + +hints: + DockerRequirement: + dockerPull: lofareosc/prefactor-ci:master + +inputs: + - id: input_h5parm + type: File + - id: soltab + type: string + doc: "Solution table" + - id: soltabOut + type: string? + doc: Output table name. By default choose next available from table type. +outputs: + - id: output_h5parm + type: File + outputBinding: + glob: $(inputs.input_h5parm.basename) diff --git a/test_jobs/losoto_duplicate.cwl b/test_jobs/losoto_duplicate.cwl new file mode 100644 index 00000000..ff1cfa0f --- /dev/null +++ b/test_jobs/losoto_duplicate.cwl @@ -0,0 +1,7 @@ +{ + "input_h5parm": { + "class": "File", + "path": "/data/example.h5" + }, + "soltab": "sol000/amplitude000" +} -- GitLab