Skip to content
Snippets Groups Projects
Commit 4343e587 authored by David Rafferty's avatar David Rafferty
Browse files

Merge branch 'RAP-218' into 'master'

Resolve RAP-218: fix the target CI pipeline

Closes RAP-218

See merge request eosc/prefactor3-cwl!36

Former-commit-id: 55031624
parents 9fb11344 85059414
Branches
Tags
No related merge requests found
image: lofareosc/prefactor3-cwl:latest image: lofareosc/prefactor3-cwl:latest
variables: variables:
TEST_HBA_DATASET_NAME: "test_data_30subbands_12timeslots.tar.gz" TEST_HBA_DATASET_NAME: "test_data.tar.gz"
CALIBRATOR_HBA_RESULTS_NAME: "results_calibrator.tar.gz" CALIBRATOR_HBA_RESULTS_NAME: "results_calibrator.tar.gz"
TARGET_HBA_RESULTS_NAME: "results_target.tar.gz" TARGET_HBA_RESULTS_NAME: "results_target.tar.gz"
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
...@@ -58,13 +58,18 @@ check_ateam_separation: ...@@ -58,13 +58,18 @@ check_ateam_separation:
script: script:
- cwltool --no-container --preserve-environment LD_LIBRARY_PATH --preserve-environment PATH --preserve-environment PYTHONPATH steps/check_ateam_separation.cwl test_jobs/check_ateam_separation.json - cwltool --no-container --preserve-environment LD_LIBRARY_PATH --preserve-environment PATH --preserve-environment PYTHONPATH steps/check_ateam_separation.cwl test_jobs/check_ateam_separation.json
run_hba_full: run_hba_calibrator:
stage: test_full stage: test_full
allow_failure: true allow_failure: true
needs: ["download_data"] needs: ["download_data"]
script: script:
- cwltool --no-container --preserve-environment LD_LIBRARY_PATH --preserve-environment PATH --preserve-environment PYTHONPATH workflows/HBA_calibrator.cwl test_jobs/HBA_calibrator.json - cwltool --no-container --preserve-environment LD_LIBRARY_PATH --preserve-environment PATH --preserve-environment PYTHONPATH workflows/HBA_calibrator.cwl test_jobs/HBA_calibrator.json
- test_jobs/check_workflow_results.py results /builds/eosc/prefactor3-cwl/data/results_calibrator - test_jobs/check_workflow_results.py results /builds/eosc/prefactor3-cwl/data/results_calibrator
- rm -rf results
run_hba_target:
stage: test_full
allow_failure: true
needs: ["download_data"]
script:
- cwltool --no-container --preserve-environment LD_LIBRARY_PATH --preserve-environment PATH --preserve-environment PYTHONPATH workflows/HBA_target.cwl test_jobs/HBA_target.json - cwltool --no-container --preserve-environment LD_LIBRARY_PATH --preserve-environment PATH --preserve-environment PYTHONPATH workflows/HBA_target.cwl test_jobs/HBA_target.json
- test_jobs/check_workflow_results.py results /builds/eosc/prefactor3-cwl/data/results_target - test_jobs/check_workflow_results.py results /builds/eosc/prefactor3-cwl/data/results_target
...@@ -82,6 +82,7 @@ ...@@ -82,6 +82,7 @@
} }
], ],
"avg_timeresolution_concat": 4, "avg_timeresolution_concat": 4,
"ncores": 12,
"cal_solutions": { "cal_solutions": {
"class": "File", "class": "File",
"path": "/builds/eosc/prefactor3-cwl/data/results_calibrator/cal_values/cal_solutions.h5" "path": "/builds/eosc/prefactor3-cwl/data/results_calibrator/cal_values/cal_solutions.h5"
......
...@@ -24,11 +24,13 @@ def main(results_path, control_path): ...@@ -24,11 +24,13 @@ def main(results_path, control_path):
""" """
# Check that all expected output files are present # Check that all expected output files are present
dcmp = dircmp(results_path, control_path) dcmp = dircmp(results_path, control_path)
if len(dcmp.left_only) > 0 or len(dcmp.right_only) > 0:
if len(dcmp.left_only) > 0: if len(dcmp.left_only) > 0:
print('ERROR: The following files are present in the output but not in the control: {}'.format(dcmp.left_only)) print('ERROR: The following files are present in the output but not in the '
sys.exit(1) 'control: {}'.format(dcmp.left_only))
if len(dcmp.right_only) > 0: if len(dcmp.right_only) > 0:
print('ERROR: The following files are present in the control but not in the output: {}'.format(dcmp.right_only)) print('ERROR: The following files are present in the control but not in the '
'output: {}'.format(dcmp.right_only))
sys.exit(1) sys.exit(1)
# Check that the calibration solutions match the control ones # Check that the calibration solutions match the control ones
...@@ -43,7 +45,7 @@ def main(results_path, control_path): ...@@ -43,7 +45,7 @@ def main(results_path, control_path):
if not np.allclose(check_soltab.val, control_soltab.val, rtol=1e-03, if not np.allclose(check_soltab.val, control_soltab.val, rtol=1e-03,
atol=1e-03, equal_nan=True): atol=1e-03, equal_nan=True):
print('ERROR: Val array of soltab {} of solset {} does not match ' print('ERROR: Val array of soltab {} of solset {} does not match '
'the control'.format(check_soltab.anme, check_solset.name)) 'the control'.format(check_soltab.name, check_solset.name))
sys.exit(1) sys.exit(1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment