From 0aa6fc9cc3b20a9be3fbc73e4220a315beaedf5e Mon Sep 17 00:00:00 2001 From: Roy de Goei <goei@astron.nl> Date: Wed, 31 Aug 2022 14:09:17 +0000 Subject: [PATCH] SDC-679: Add dysco version form environment variable if exist otherwise None --- bin/lofar_sip_from_ms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/lofar_sip_from_ms.py b/bin/lofar_sip_from_ms.py index be25b50..2071aa8 100755 --- a/bin/lofar_sip_from_ms.py +++ b/bin/lofar_sip_from_ms.py @@ -7,7 +7,7 @@ import yaml from astropy.time import Time from datetime import timedelta import isodate - +import os def parse_args(): parser = ArgumentParser(description='Generates LOFAR SIP from MS') @@ -62,7 +62,7 @@ def collect_dataproduct_info(msin): dataproduct['dataProductType'] = 'Correlator data' dataproduct['_type'] = 'CorrelatedDataProduct' dataproduct['storageWriter'] = _storage_writer_to_storage_manager[storage_manager] - dataproduct['storageWriterVersion'] = 'NA' + dataproduct['storageWriterVersion'] = os.environ.get('DYSCO_COMMIT', 'None') dataproduct['subband'] = spectral_window.getcol('NAME', 0)[0].split('_')[-1] dataproduct['stationSubband'] = dataproduct['subband'] -- GitLab