From 57ddb54808386c2befdd0a63673fef4f027e8ced Mon Sep 17 00:00:00 2001 From: Daniel Wolfensberger Date: Thu, 29 Aug 2024 09:41:59 +0200 Subject: [PATCH] FIX: adjust doc parse fcts in ci to new black formatting --- ci/parse_pyrad_name_mappings.py | 4 ++-- ci/parse_pyrad_products.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/parse_pyrad_name_mappings.py b/ci/parse_pyrad_name_mappings.py index 5418a3f4f..cda4092a3 100644 --- a/ci/parse_pyrad_name_mappings.py +++ b/ci/parse_pyrad_name_mappings.py @@ -8,7 +8,7 @@ FUNCTIONS_TO_PARSE = ['get_fieldname_pyart', 'get_datatype_odim', 'get_datatype_metranet', - 'get_fieldname_cosmo'] + 'get_fieldname_icon'] mainpath = Path(__file__).resolve().parent.parent OUT_DIRECTORY = str(Path(mainpath, 'doc', 'source', 'overview', 'mappings')) @@ -24,7 +24,7 @@ for line in srccode: if ('datatype' in line or 'field_name' in line) and '==' in line: pyrad_dtypes.append(line.split('==')[1].split(':')[ - 0].strip().replace("'", "")) + 0].strip().replace('"', '').replace("'","")) if 'return' in line: returnline = line.replace('return', '').strip() diff --git a/ci/parse_pyrad_products.py b/ci/parse_pyrad_products.py index 6f9a0cbcd..23e9bcf9e 100644 --- a/ci/parse_pyrad_products.py +++ b/ci/parse_pyrad_products.py @@ -109,7 +109,7 @@ def process_file(filepath): if reading_params and product: all_products[function][product]['parameters'] += " " + \ " ".join(line.replace('\n', ' ').split()) - if "prdcfg['type']" in line and '==' in line: + if ('prdcfg["type"]' in line or "prdcfg['type']" in line) and '==' in line: for product in all_products[function].keys(): if product in line: all_products[function][product]['link'] = (funcpath_to_docpath(filepath) +