diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 79e857311c1b020443f7e1b1220093ab4bf1d8fe..345f3cae30ec26d0716c13b94022d05d7b1ec235 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -59,6 +59,12 @@ losoto_norm: script: - cwl-runner --no-container steps/LoSoTo.Norm.cwl test_jobs/losoto_norm.json +losoto_reset: + stage: test_steps + allow_failure: true + script: + - cwl-runner --no-container steps/LoSoTo.Reset.cwl test_jobs/losoto_reset.json + parset_selector: stage: test_steps diff --git a/steps/LoSoTo.Reset.cwl b/steps/LoSoTo.Reset.cwl new file mode 100644 index 0000000000000000000000000000000000000000..149587c9e8c399f2324fdf640b82e0966ee21728 --- /dev/null +++ b/steps/LoSoTo.Reset.cwl @@ -0,0 +1,49 @@ +#!/usr/bin/env cwl-runner + +class: CommandLineTool +cwlVersion: v1.0 +id: losoto_reset + +doc: Subtract/divide two tables or a clock/tec/tec3rd/rm from a phase. + +requirements: + InlineJavascriptRequirement: {} + InitialWorkDirRequirement: + listing: + - entryname: 'parset.config' + entry: | + [reset] + soltab = $(inputs.soltab) + operation = RESET + $(inputs.dataVal !== null? 'dataVal=' + inputs.dataVal: '') + + - 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: dataVal + type: float? + doc: | + If given set values to this number, otherwise uses 1 for amplitude and 0 + for all other soltab types. +outputs: + - id: output_h5parm + type: File + outputBinding: + glob: $(inputs.input_h5parm.basename) diff --git a/test_jobs/losoto_reset.json b/test_jobs/losoto_reset.json new file mode 100644 index 0000000000000000000000000000000000000000..ff1cfa0ffb800683bec498e1b97949b3383b6a1d --- /dev/null +++ b/test_jobs/losoto_reset.json @@ -0,0 +1,7 @@ +{ + "input_h5parm": { + "class": "File", + "path": "/data/example.h5" + }, + "soltab": "sol000/amplitude000" +}