From c9e25c248302cda240f9e428da4b3b6f3e214773 Mon Sep 17 00:00:00 2001 From: Florez Ospina Juan Felipe Date: Fri, 11 Apr 2025 11:02:38 +0200 Subject: [PATCH] Add new placeholder for submitter name and remove metadata element 'station' conflicting with third party converter --- pipelines/actris_header/JFJ_ACSM_017.actris_header | 2 +- pipelines/actris_header/PAY_ACSM_092.actris_header | 2 +- pipelines/steps/update_actris_header.py | 8 +------- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/pipelines/actris_header/JFJ_ACSM_017.actris_header b/pipelines/actris_header/JFJ_ACSM_017.actris_header index d701cc5..66b06eb 100644 --- a/pipelines/actris_header/JFJ_ACSM_017.actris_header +++ b/pipelines/actris_header/JFJ_ACSM_017.actris_header @@ -1,7 +1,7 @@ ${header_size} 1001 ${originator_name}; Brem, Benjamin; Gysel-Beer, Martin ${lab}, Paul Scherrer Institute, PSI,,,, 5232, Villigen PSI, Switzerland -Nowak, Nora +${submitter_name} GAW-WDCA EMEP CREATE ACTRIS 1 1 ${start_day} ${rev_day} diff --git a/pipelines/actris_header/PAY_ACSM_092.actris_header b/pipelines/actris_header/PAY_ACSM_092.actris_header index 1e52128..35d88e6 100644 --- a/pipelines/actris_header/PAY_ACSM_092.actris_header +++ b/pipelines/actris_header/PAY_ACSM_092.actris_header @@ -1,7 +1,7 @@ ${header_size} 1001 ${originator_name}; Brem, Benjamin; Gysel-Beer, Martin ${lab}, Paul Scherrer Institute, PSI,,,, 5232, Villigen PSI, Switzerland -Nowak, Nora +${submitter_name} GAW-WDCA EMEP CREATE ACTRIS 1 1 ${start_day} ${rev_day} diff --git a/pipelines/steps/update_actris_header.py b/pipelines/steps/update_actris_header.py index 6e2258b..0c4becb 100644 --- a/pipelines/steps/update_actris_header.py +++ b/pipelines/steps/update_actris_header.py @@ -42,15 +42,9 @@ def load_yaml(path): 'station': metadata['station'], } actris_metadata['originator_name'] = metadata['originator'].get('name', '') + actris_metadata['submitter_name'] = metadata['submitter'].get('name', '') return flatten_yaml(actris_metadata) -def resolve_project_path(): - try: - thisFilePath = os.path.abspath(__file__) - except NameError: - thisFilePath = os.getcwd() - return os.path.normpath(os.path.join(thisFilePath, "..", "..", "..")) - def fill_placeholders(template, data): def replacer(match): key = match.group(1)