diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 466d724263fa72c3a328d544bb384be0f1499dd5..d0731b1da88d1e2f9c4ab3ff51648ed0a9bc7cbe 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,6 +46,11 @@ losoto_abs: allow_failure: true script: - cwl-runner --no-container steps/LoSoTo.Abs.cwl test_jobs/losoto_abs.json +losoto_plot: + stage: test_steps + allow_failure: true + script: + - cwl-runner --no-container steps/LoSoTo.Plot.cwl test_jobs/losoto_plot.json parset_selector: stage: test_steps diff --git a/steps/LoSoTo.Plot.cwl b/steps/LoSoTo.Plot.cwl index 4b71e1991443a75c1ac7ddfa7bd3da6bc7829a01..c87748e4445e413ba188c41cebe7f2528a13709b 100644 --- a/steps/LoSoTo.Plot.cwl +++ b/steps/LoSoTo.Plot.cwl @@ -14,11 +14,13 @@ requirements: - | function get_config() { var par = ['soltab = ' + inputs.soltab] + if (inputs.ncpu !== null) par.push('ncpu='+inputs.ncpu); par.push('[plot]') par.push('operation = PLOT') for(var field_name in inputs){ - if(field_name === 'input_file' || - field_name === 'soltab') continue; + if(field_name === 'input_h5parm' || + field_name === 'soltab' || + field_name === 'ncpu') continue; if(inputs[field_name] === null || inputs[field_name] === 'null') continue; par.push(field_name+'='+inputs[field_name]) @@ -29,12 +31,15 @@ requirements: listing: - entryname: 'parset.config' entry: $(get_config().join('\n')) + - entryname: $(inputs.input_h5parm.basename) + entry: $(inputs.input_h5parm) + writable: true baseCommand: "losoto" arguments: - - $(inputs.input_file) + - $(inputs.input_h5parm.basename) - parset.config hints: @@ -42,7 +47,7 @@ hints: dockerPull: lofareosc/prefactor-ci:master inputs: - - id: input_file + - id: input_h5parm type: File - id: soltab type: string[] @@ -69,7 +74,6 @@ inputs: - e.g. ‘pol’ to plot XX-YY. - id: NColFig type: int? - type: string doc: | Number of columns in a multi-table image. By default is automatically chosen. @@ -132,4 +136,6 @@ inputs: outputs: - id: output_plots - type: Any[] + type: File[] + outputBinding: + glob: "$(inputs.prefix)*.png" diff --git a/test_jobs/losoto_plot.json b/test_jobs/losoto_plot.json new file mode 100644 index 0000000000000000000000000000000000000000..f4ed8634385489ed89ebc99ceed0c1509d127172 --- /dev/null +++ b/test_jobs/losoto_plot.json @@ -0,0 +1,6 @@ +{ + "input_h5parm": {"class": "File", "path": "/data/example.h5"}, + "soltab": ["sol000/phase000"], + "axesInPlot": ["time"], + "ncpu": 1 +}