From 0f1c407d3cb47661b8bdb3e99a6c2b1574507cbb Mon Sep 17 00:00:00 2001 From: Ludwig Lierhammer Date: Mon, 24 Jun 2024 15:54:53 +0200 Subject: [PATCH 01/24] set integers to string --- glamod_marine_processing/obs_suite/scripts/level1e.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/glamod_marine_processing/obs_suite/scripts/level1e.py b/glamod_marine_processing/obs_suite/scripts/level1e.py index 8e7126a2..08c92901 100755 --- a/glamod_marine_processing/obs_suite/scripts/level1e.py +++ b/glamod_marine_processing/obs_suite/scripts/level1e.py @@ -211,9 +211,9 @@ def add_report_quality(qc_df_full): def compare_quality_checks(df): """Compare entries with location_quality and report_time_quality.""" - df = df.mask(location_quality == 2, 1) - df = df.mask(report_time_quality == 4, 1) - df = df.mask(report_time_quality == 5, 1) + df = df.mask(location_quality == "2", "1") + df = df.mask(report_time_quality == "4", "1") + df = df.mask(report_time_quality == "5", "1") return df From 0ac0011c24faab568f3b458998bbcce308d7283a Mon Sep 17 00:00:00 2001 From: Ludwig Lierhammer Date: Mon, 24 Jun 2024 15:55:18 +0200 Subject: [PATCH 02/24] make copies --- glamod_marine_processing/obs_suite/scripts/level1e.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glamod_marine_processing/obs_suite/scripts/level1e.py b/glamod_marine_processing/obs_suite/scripts/level1e.py index 08c92901..eac989fa 100755 --- a/glamod_marine_processing/obs_suite/scripts/level1e.py +++ b/glamod_marine_processing/obs_suite/scripts/level1e.py @@ -523,8 +523,8 @@ def clean_level(file_id): # header.location_quality = default not-checked ('3') to not-checked('3') # First header, then rest. -location_quality = header_df["location_quality"] -report_time_quality = header_df["report_time_quality"] +location_quality = header_df["location_quality"].copy() +report_time_quality = header_df["report_time_quality"].copy() flag = True if qc_avail else False process_table(header_df, "header") From 8cc3f73369f90232ca20816f83f692aa18cd1fc4 Mon Sep 17 00:00:00 2001 From: Ludwig Lierhammer Date: Mon, 24 Jun 2024 15:55:50 +0200 Subject: [PATCH 03/24] remove TEST code snippet --- glamod_marine_processing/obs_suite/scripts/level1e.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/glamod_marine_processing/obs_suite/scripts/level1e.py b/glamod_marine_processing/obs_suite/scripts/level1e.py index eac989fa..a1d2c55e 100755 --- a/glamod_marine_processing/obs_suite/scripts/level1e.py +++ b/glamod_marine_processing/obs_suite/scripts/level1e.py @@ -283,13 +283,6 @@ def process_table(table_df, table_name): table_df["quality_flag"] = compare_quality_checks(table_df["quality_flag"]) if table_name == "header": - # set report quality to 2 for ids with partial match to TEST - if params.year >= "2015": - loc = (table_df.primary_station_id.str.contains("TEST")) & ( - table_df.duplicate_status == "4" - ) - table_df.report_quality.loc[loc] = "2" - table_df["report_quality"] = compare_quality_checks(table_df["report_quality"]) cdm_columns = cdm_tables.get(table_name).keys() From d877f92086f04ff8f80604252bd891721c3feee8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 13:57:23 +0000 Subject: [PATCH 04/24] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- CHANGES.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index ee8b9c74..5dbd1750 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -13,7 +13,7 @@ Breaking changes Bug fixes ^^^^^^^^^ -* fixing observation suite level1e tests (:pull:`17`) +* fixing observation suite level1e tests (:pull:`17`) v7.0.0 (2024-06-13) ------------------- From 167bf96a1350761c471c5f2cd6ee3684028d9b6c Mon Sep 17 00:00:00 2001 From: Ludwig Lierhammer Date: Mon, 24 Jun 2024 16:12:59 +0200 Subject: [PATCH 05/24] return cache_dir --- tests/_load_data.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/_load_data.py b/tests/_load_data.py index b1449844..020e4190 100755 --- a/tests/_load_data.py +++ b/tests/_load_data.py @@ -55,26 +55,28 @@ def load_input(level): """Load level input data data from cdm-testdata.""" p_level = prev_level[level] leveli = level_input[level] + cache_dir = f"./T{level}/{leveli}/ICOADS_R3.0.2T/{p_level}/114-992" if level == "level1a": - load_imma(level, leveli, p_level) + load_imma(cache_dir) else: - load_cdms(level, leveli, p_level) + load_cdms(cache_dir) + return cache_dir -def load_cdms(level, leveli, p_level): +def load_cdms(cache_dir): """Load level CDM input data from cdm-testdata.""" for table_name in table_names: load_file( f"imma1_992/cdm_tables/{table_name}-114-992_2022-01-01_subset.psv", - cache_dir=f"./T{level}/{leveli}/ICOADS_R3.0.2T/{p_level}/114-992", + cache_dir=cache_dir, within_drs=False, ) -def load_imma(level, leveli, p_level): +def load_imma(cache_dir): """Load level IMMA input data from cdm-testdata.""" load_file( "imma1_992/input/114-992_2022-01-01_subset.imma", - cache_dir=f"./T{level}/{leveli}/ICOADS_R3.0.2T/{p_level}/114-992", + cache_dir=cache_dir, within_drs=False, ) From bcc64fe65dd447c07e73a63966394a4e9e19aeb7 Mon Sep 17 00:00:00 2001 From: Ludwig Lierhammer Date: Mon, 24 Jun 2024 16:13:37 +0200 Subject: [PATCH 06/24] manipulating input data skeleton --- tests/_testing_suite.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/_testing_suite.py b/tests/_testing_suite.py index acdbebc9..b9d79f6a 100755 --- a/tests/_testing_suite.py +++ b/tests/_testing_suite.py @@ -5,7 +5,7 @@ import _load_data import _settings import pandas as pd -from cdm_reader_mapper.cdm_mapper import read_tables +from cdm_reader_mapper.cdm_mapper import read_tables, cdm_to_ascii from cdm_reader_mapper.common.getting_files import load_file add_data = { @@ -18,6 +18,10 @@ } +def manipulate_inputs(inputs, level): + """Manipulate input data.""" + return inputs + def manipulate_expected(expected, level): """Manipulate expected result data.""" for index, values in _settings.manipulation[level].items(): @@ -33,7 +37,15 @@ def _obs_testing(level, capsys): cache_dir=f"./T{level}/release_7.0", ) - _load_data.load_input(level) + cache_dir = _load_data.load_input(level) + + inputs = read_tables( + cache_dir, cdm_subset=tables + ) + + inputs = manipulate_inputs(inputs, level) + + cdm_to_ascii(inputs, out_dir=cache_dir) s = ( "obs_suite " From 5255b272df3e6446ff96432c29e29b454b17cf05 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 14:15:16 +0000 Subject: [PATCH 07/24] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/_testing_suite.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/_testing_suite.py b/tests/_testing_suite.py index b9d79f6a..70e5d497 100755 --- a/tests/_testing_suite.py +++ b/tests/_testing_suite.py @@ -5,7 +5,7 @@ import _load_data import _settings import pandas as pd -from cdm_reader_mapper.cdm_mapper import read_tables, cdm_to_ascii +from cdm_reader_mapper.cdm_mapper import cdm_to_ascii, read_tables from cdm_reader_mapper.common.getting_files import load_file add_data = { @@ -22,6 +22,7 @@ def manipulate_inputs(inputs, level): """Manipulate input data.""" return inputs + def manipulate_expected(expected, level): """Manipulate expected result data.""" for index, values in _settings.manipulation[level].items(): @@ -38,13 +39,11 @@ def _obs_testing(level, capsys): ) cache_dir = _load_data.load_input(level) - - inputs = read_tables( - cache_dir, cdm_subset=tables - ) - + + inputs = read_tables(cache_dir, cdm_subset=tables) + inputs = manipulate_inputs(inputs, level) - + cdm_to_ascii(inputs, out_dir=cache_dir) s = ( From f907cb57364ce209a48502475fe21b9115860613 Mon Sep 17 00:00:00 2001 From: Ludwig Lierhammer Date: Tue, 25 Jun 2024 08:55:22 +0200 Subject: [PATCH 08/24] undo manipulating input data --- tests/_testing_suite.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/tests/_testing_suite.py b/tests/_testing_suite.py index 70e5d497..be3c6d14 100755 --- a/tests/_testing_suite.py +++ b/tests/_testing_suite.py @@ -18,11 +18,6 @@ } -def manipulate_inputs(inputs, level): - """Manipulate input data.""" - return inputs - - def manipulate_expected(expected, level): """Manipulate expected result data.""" for index, values in _settings.manipulation[level].items(): @@ -40,12 +35,6 @@ def _obs_testing(level, capsys): cache_dir = _load_data.load_input(level) - inputs = read_tables(cache_dir, cdm_subset=tables) - - inputs = manipulate_inputs(inputs, level) - - cdm_to_ascii(inputs, out_dir=cache_dir) - s = ( "obs_suite " f"-l {level} " From 5f81941db8f8702f628e0b2d97eb196c2c7460a7 Mon Sep 17 00:00:00 2001 From: Ludwig Lierhammer Date: Tue, 25 Jun 2024 09:05:11 +0200 Subject: [PATCH 09/24] delete unused import --- tests/_testing_suite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/_testing_suite.py b/tests/_testing_suite.py index be3c6d14..68f2a2ae 100755 --- a/tests/_testing_suite.py +++ b/tests/_testing_suite.py @@ -5,7 +5,7 @@ import _load_data import _settings import pandas as pd -from cdm_reader_mapper.cdm_mapper import cdm_to_ascii, read_tables +from cdm_reader_mapper.cdm_mapper import read_tables from cdm_reader_mapper.common.getting_files import load_file add_data = { From b9a0c64ff79f47a1fb5867955c82ed4ce546514c Mon Sep 17 00:00:00 2001 From: Ludwig Lierhammer Date: Tue, 25 Jun 2024 09:20:30 +0200 Subject: [PATCH 10/24] load data from cdm-testdata.level_manipulating --- tests/_load_data.py | 1 + tests/_settings.py | 7 ++++--- tests/_testing_suite.py | 7 +++++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/_load_data.py b/tests/_load_data.py index 020e4190..4b8c2828 100755 --- a/tests/_load_data.py +++ b/tests/_load_data.py @@ -70,6 +70,7 @@ def load_cdms(cache_dir): f"imma1_992/cdm_tables/{table_name}-114-992_2022-01-01_subset.psv", cache_dir=cache_dir, within_drs=False, + branch="level_manipulating", ) diff --git a/tests/_settings.py b/tests/_settings.py index af49e446..855f3a3a 100755 --- a/tests/_settings.py +++ b/tests/_settings.py @@ -60,8 +60,6 @@ } manipulation = { - "level1a": {}, - "level1b": {}, "level1c": {}, "level1d": { ("header", "station_name"): [ @@ -132,5 +130,8 @@ ("observations-wd", "quality_flag"): ["0", "0", np.nan, "0", np.nan], ("observations-ws", "quality_flag"): ["0", "0", np.nan, "0", np.nan], }, - "level2": {}, } + +drops = { + "level1c": [0,3] +} \ No newline at end of file diff --git a/tests/_testing_suite.py b/tests/_testing_suite.py index 68f2a2ae..2c1f25a7 100755 --- a/tests/_testing_suite.py +++ b/tests/_testing_suite.py @@ -20,8 +20,11 @@ def manipulate_expected(expected, level): """Manipulate expected result data.""" - for index, values in _settings.manipulation[level].items(): - expected[index] = values + if level in _settings.manipulation.keys() + for index, values in _settings.manipulation[level].items(): + expected[index] = values + if level in _settings.drops.keys(): + expected.drop(_settings.drops[level]) return expected From fb1f25ccc914bf1b7d8cb5e0e648eb306554ffd8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 25 Jun 2024 07:21:14 +0000 Subject: [PATCH 11/24] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/_settings.py | 4 +--- tests/_testing_suite.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/_settings.py b/tests/_settings.py index 855f3a3a..f3d4541f 100755 --- a/tests/_settings.py +++ b/tests/_settings.py @@ -132,6 +132,4 @@ }, } -drops = { - "level1c": [0,3] -} \ No newline at end of file +drops = {"level1c": [0, 3]} diff --git a/tests/_testing_suite.py b/tests/_testing_suite.py index 2c1f25a7..f2c95595 100755 --- a/tests/_testing_suite.py +++ b/tests/_testing_suite.py @@ -24,7 +24,7 @@ def manipulate_expected(expected, level): for index, values in _settings.manipulation[level].items(): expected[index] = values if level in _settings.drops.keys(): - expected.drop(_settings.drops[level]) + expected.drop(_settings.drops[level]) return expected From 53f860b713d9d73eee5bc48062af4f29b3a13189 Mon Sep 17 00:00:00 2001 From: Ludwig Lierhammer Date: Tue, 25 Jun 2024 09:26:54 +0200 Subject: [PATCH 12/24] fixing if statement --- tests/_testing_suite.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/_testing_suite.py b/tests/_testing_suite.py index f2c95595..d95b8387 100755 --- a/tests/_testing_suite.py +++ b/tests/_testing_suite.py @@ -20,11 +20,11 @@ def manipulate_expected(expected, level): """Manipulate expected result data.""" - if level in _settings.manipulation.keys() - for index, values in _settings.manipulation[level].items(): - expected[index] = values + if level in _settings.manipulation.keys(): + for index, values in _settings.manipulation[level].items(): + expected[index] = values if level in _settings.drops.keys(): - expected.drop(_settings.drops[level]) + expected.drop(_settings.drops[level]) return expected From ecfacdbc4812e7ace2ec37bd39488cec0a87a6f7 Mon Sep 17 00:00:00 2001 From: Ludwig Lierhammer Date: Tue, 25 Jun 2024 09:35:56 +0200 Subject: [PATCH 13/24] use cdm-testdata.level_manipulating for expected data too --- tests/_testing_suite.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/_testing_suite.py b/tests/_testing_suite.py index d95b8387..b464dd8c 100755 --- a/tests/_testing_suite.py +++ b/tests/_testing_suite.py @@ -60,6 +60,7 @@ def _obs_testing(level, capsys): f"imma1_992/cdm_tables/{table_name}-114-992_2022-01-01_subset.psv", cache_dir=f"./E{level}/ICOADS_R3.0.2T/{level}/114-992", within_drs=False, + branch="level_manipulating", ) expected = read_tables( f"./E{level}/ICOADS_R3.0.2T/{level}/114-992", cdm_subset=tables From 324f2a8a39638bbc7ff3314de6c7323733c23fe4 Mon Sep 17 00:00:00 2001 From: Ludwig Lierhammer Date: Tue, 25 Jun 2024 09:46:23 +0200 Subject: [PATCH 14/24] drop rows --- tests/_testing_suite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/_testing_suite.py b/tests/_testing_suite.py index b464dd8c..81b8749f 100755 --- a/tests/_testing_suite.py +++ b/tests/_testing_suite.py @@ -24,7 +24,7 @@ def manipulate_expected(expected, level): for index, values in _settings.manipulation[level].items(): expected[index] = values if level in _settings.drops.keys(): - expected.drop(_settings.drops[level]) + expected = expected.drop(_settings.drops[level]) return expected From b20a615a00bb8050a11f2053bf1fa12a1d0cfcd1 Mon Sep 17 00:00:00 2001 From: Ludwig Lierhammer Date: Tue, 25 Jun 2024 09:46:38 +0200 Subject: [PATCH 15/24] set station name to null --- tests/_settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/_settings.py b/tests/_settings.py index f3d4541f..883d1959 100755 --- a/tests/_settings.py +++ b/tests/_settings.py @@ -66,7 +66,7 @@ "null", "FF HELMER HANSEN", "WAVERIDER TFSTD", - "NORNE", + "null", "WAVERIDER TFDRN", ], ("header", "platform_sub_type"): ["null", "RV", "OT", "MI", "OT"], From d7b30fd9d74b697a87c6f36ffa6bc1bb95d82e50 Mon Sep 17 00:00:00 2001 From: Ludwig Lierhammer Date: Tue, 25 Jun 2024 09:56:39 +0200 Subject: [PATCH 16/24] set platfrom subtype to null --- tests/_settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/_settings.py b/tests/_settings.py index 883d1959..7f4edf00 100755 --- a/tests/_settings.py +++ b/tests/_settings.py @@ -69,7 +69,7 @@ "null", "WAVERIDER TFDRN", ], - ("header", "platform_sub_type"): ["null", "RV", "OT", "MI", "OT"], + ("header", "platform_sub_type"): ["null", "RV", "OT", "null", "OT"], ("header", "station_record_number"): ["1", "1", "0", "13", "0"], ("header", "report_duration"): ["11", "HLY", "11", "HLY", "11"], ("observations-at", "sensor_id"): ["null", "AT", np.nan, "null", np.nan], From 8d0c57f622f342c830b1602691e1d9eb1137ca28 Mon Sep 17 00:00:00 2001 From: Ludwig Lierhammer Date: Tue, 25 Jun 2024 11:38:59 +0200 Subject: [PATCH 17/24] set station record number --- tests/_settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/_settings.py b/tests/_settings.py index 7f4edf00..854a62db 100755 --- a/tests/_settings.py +++ b/tests/_settings.py @@ -70,7 +70,7 @@ "WAVERIDER TFDRN", ], ("header", "platform_sub_type"): ["null", "RV", "OT", "null", "OT"], - ("header", "station_record_number"): ["1", "1", "0", "13", "0"], + ("header", "station_record_number"): ["1", "1", "0", "1", "0"], ("header", "report_duration"): ["11", "HLY", "11", "HLY", "11"], ("observations-at", "sensor_id"): ["null", "AT", np.nan, "null", np.nan], ("observations-dpt", "sensor_id"): [np.nan, "HUM", np.nan, "null", np.nan], From 9500c3b389af91b0d621baec1aec5106d53ede68 Mon Sep 17 00:00:00 2001 From: Ludwig Lierhammer Date: Tue, 25 Jun 2024 11:39:08 +0200 Subject: [PATCH 18/24] reset index --- tests/_testing_suite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/_testing_suite.py b/tests/_testing_suite.py index 81b8749f..abec84ef 100755 --- a/tests/_testing_suite.py +++ b/tests/_testing_suite.py @@ -24,7 +24,7 @@ def manipulate_expected(expected, level): for index, values in _settings.manipulation[level].items(): expected[index] = values if level in _settings.drops.keys(): - expected = expected.drop(_settings.drops[level]) + expected = expected.drop(_settings.drops[level]).reset_index() return expected From 84c3c9d8b734ae5b3f74ce78244c7c1fe0c2423f Mon Sep 17 00:00:00 2001 From: Ludwig Lierhammer Date: Tue, 25 Jun 2024 11:43:36 +0200 Subject: [PATCH 19/24] report duration to 11 --- tests/_settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/_settings.py b/tests/_settings.py index 854a62db..96b2c952 100755 --- a/tests/_settings.py +++ b/tests/_settings.py @@ -71,7 +71,7 @@ ], ("header", "platform_sub_type"): ["null", "RV", "OT", "null", "OT"], ("header", "station_record_number"): ["1", "1", "0", "1", "0"], - ("header", "report_duration"): ["11", "HLY", "11", "HLY", "11"], + ("header", "report_duration"): ["11", "HLY", "11", "11", "11"], ("observations-at", "sensor_id"): ["null", "AT", np.nan, "null", np.nan], ("observations-dpt", "sensor_id"): [np.nan, "HUM", np.nan, "null", np.nan], ("observations-slp", "sensor_id"): ["null", "SLP", np.nan, "null", np.nan], From c301613acfa7c09a5a6382fe6e23b174bfdf8c3a Mon Sep 17 00:00:00 2001 From: Ludwig Lierhammer Date: Tue, 25 Jun 2024 11:48:21 +0200 Subject: [PATCH 20/24] load imma data from cdm-testdata.level_manipulating --- tests/_load_data.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/_load_data.py b/tests/_load_data.py index 4b8c2828..50890388 100755 --- a/tests/_load_data.py +++ b/tests/_load_data.py @@ -80,4 +80,5 @@ def load_imma(cache_dir): "imma1_992/input/114-992_2022-01-01_subset.imma", cache_dir=cache_dir, within_drs=False, + branch="level_manipulating", ) From 4e61c4a0819cfc0e7f74cd44b3cfb718329c922a Mon Sep 17 00:00:00 2001 From: Ludwig Lierhammer Date: Tue, 25 Jun 2024 14:03:11 +0200 Subject: [PATCH 21/24] level1a: drop row with invalid date --- tests/_settings.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/_settings.py b/tests/_settings.py index 96b2c952..8c658890 100755 --- a/tests/_settings.py +++ b/tests/_settings.py @@ -132,4 +132,7 @@ }, } -drops = {"level1c": [0, 3]} +drops = { + "level1a": [0], + "level1c": [0, 3], +} From 74068f318bc355071e3a3095ad6cdbe5be6c5c33 Mon Sep 17 00:00:00 2001 From: Ludwig Lierhammer Date: Tue, 25 Jun 2024 14:03:32 +0200 Subject: [PATCH 22/24] reset_index with drop is True --- tests/_testing_suite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/_testing_suite.py b/tests/_testing_suite.py index abec84ef..7816ad50 100755 --- a/tests/_testing_suite.py +++ b/tests/_testing_suite.py @@ -24,7 +24,7 @@ def manipulate_expected(expected, level): for index, values in _settings.manipulation[level].items(): expected[index] = values if level in _settings.drops.keys(): - expected = expected.drop(_settings.drops[level]).reset_index() + expected = expected.drop(_settings.drops[level]).reset_index(drop=True) return expected From c3361eb9bb79ee8d6117446bbd03769af76ec8bc Mon Sep 17 00:00:00 2001 From: Ludwig Lierhammer Date: Tue, 25 Jun 2024 14:26:09 +0200 Subject: [PATCH 23/24] load data from cdm-testdata.main --- tests/_load_data.py | 2 -- tests/_testing_suite.py | 1 - 2 files changed, 3 deletions(-) diff --git a/tests/_load_data.py b/tests/_load_data.py index 50890388..020e4190 100755 --- a/tests/_load_data.py +++ b/tests/_load_data.py @@ -70,7 +70,6 @@ def load_cdms(cache_dir): f"imma1_992/cdm_tables/{table_name}-114-992_2022-01-01_subset.psv", cache_dir=cache_dir, within_drs=False, - branch="level_manipulating", ) @@ -80,5 +79,4 @@ def load_imma(cache_dir): "imma1_992/input/114-992_2022-01-01_subset.imma", cache_dir=cache_dir, within_drs=False, - branch="level_manipulating", ) diff --git a/tests/_testing_suite.py b/tests/_testing_suite.py index 7816ad50..99eb2b15 100755 --- a/tests/_testing_suite.py +++ b/tests/_testing_suite.py @@ -60,7 +60,6 @@ def _obs_testing(level, capsys): f"imma1_992/cdm_tables/{table_name}-114-992_2022-01-01_subset.psv", cache_dir=f"./E{level}/ICOADS_R3.0.2T/{level}/114-992", within_drs=False, - branch="level_manipulating", ) expected = read_tables( f"./E{level}/ICOADS_R3.0.2T/{level}/114-992", cdm_subset=tables From 084d6588f0a0e17e80896fcc2ccbd6bfa7c32b9a Mon Sep 17 00:00:00 2001 From: Ludwig Lierhammer Date: Tue, 25 Jun 2024 14:33:05 +0200 Subject: [PATCH 24/24] add changes to CHANGES --- CHANGES.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 5dbd1750..50397579 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -14,6 +14,7 @@ Breaking changes Bug fixes ^^^^^^^^^ * fixing observation suite level1e tests (:pull:`17`) +* level1e: change QC mapping from ``v7.0.0`` is now running by setting values of ``location_quality`` and ``report_time_quality`` to ``str`` (:pull:`18`) v7.0.0 (2024-06-13) ------------------- @@ -36,7 +37,7 @@ Breaking changes * change QC mapping in obs_suite level1e (:issue:`7`, :pull:`8`): * if ``location_quality`` is equal ``2`` set both ``report_quality`` and ``quality_flag`` to ``1`` - * if ```report_time_quality`` is equal ``4`` or ``5`` set both ``report_quality`` and ``quality_flag`` to ``1`` + * if ``report_time_quality`` is equal ``4`` or ``5`` set both ``report_quality`` and ``quality_flag`` to ``1`` New features and enhancements ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^