From 288f38575a87e133738b2533da2aef33e2d7b092 Mon Sep 17 00:00:00 2001 From: Michael Hemming Date: Tue, 9 Sep 2025 11:52:04 +1000 Subject: [PATCH 1/7] add 'flag_values' to variable attributes to convert to datatype --- aodntools/ncwriter/template.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aodntools/ncwriter/template.py b/aodntools/ncwriter/template.py index 62c6c45..6742e0a 100644 --- a/aodntools/ncwriter/template.py +++ b/aodntools/ncwriter/template.py @@ -298,7 +298,7 @@ def create_variables(self, **kwargs): # variable attributes to convert to the same type as the variable # datatype - varattrs_to_convert_to_datatype = ['valid_min', 'valid_max', 'valid_range'] + varattrs_to_convert_to_datatype = ['valid_min', 'valid_max', 'valid_range', 'flag_values'] for varname, varattr in self.variables.items(): if not varattr['_dimensions']: # no kwargs in createVariable From 3ba3a0699fdd2a75b34858d91e938b3262f29dcb Mon Sep 17 00:00:00 2001 From: Michael Hemming Date: Tue, 9 Sep 2025 13:20:05 +1000 Subject: [PATCH 2/7] testing xarray version cause of failing pytest --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 5ff7f23..cc71749 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ 'numpy>=2.2.4', 'netCDF4>=1.7.2', 'pandas>=2.2.3', - 'xarray>=2023.1.0' + 'xarray>=2023.1.0,<=2025.3.1' ] TESTS_REQUIRE = [ From 2a476790c547966b1e03fd95fc56632a1081007a Mon Sep 17 00:00:00 2001 From: Michael Hemming Date: Tue, 9 Sep 2025 13:22:02 +1000 Subject: [PATCH 3/7] kickstart GH actions --- test_aodntools/timeseries_products/test_hourly_timeseries.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test_aodntools/timeseries_products/test_hourly_timeseries.py b/test_aodntools/timeseries_products/test_hourly_timeseries.py index 9e6a7d4..a878f6f 100644 --- a/test_aodntools/timeseries_products/test_hourly_timeseries.py +++ b/test_aodntools/timeseries_products/test_hourly_timeseries.py @@ -94,6 +94,7 @@ def test_hourly_aggregator(self): self.compare_variables(dataset) + def test_hourly_aggregator_with_nonqc(self): output_file, bad_files = hourly_aggregator(files_to_aggregate=INPUT_FILES, site_code='NRSROT', From 632976beaf1dcd500a7b9bb14f89d53a9a12764c Mon Sep 17 00:00:00 2001 From: Michael Hemming Date: Tue, 9 Sep 2025 13:24:10 +1000 Subject: [PATCH 4/7] testing --- aodntools/ncwriter/template.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aodntools/ncwriter/template.py b/aodntools/ncwriter/template.py index 6742e0a..62c6c45 100644 --- a/aodntools/ncwriter/template.py +++ b/aodntools/ncwriter/template.py @@ -298,7 +298,7 @@ def create_variables(self, **kwargs): # variable attributes to convert to the same type as the variable # datatype - varattrs_to_convert_to_datatype = ['valid_min', 'valid_max', 'valid_range', 'flag_values'] + varattrs_to_convert_to_datatype = ['valid_min', 'valid_max', 'valid_range'] for varname, varattr in self.variables.items(): if not varattr['_dimensions']: # no kwargs in createVariable From 0b6a8a04272001b53a128d3a2eb18af915a2d9ce Mon Sep 17 00:00:00 2001 From: Michael Hemming Date: Tue, 9 Sep 2025 13:24:55 +1000 Subject: [PATCH 5/7] testing --- aodntools/ncwriter/template.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aodntools/ncwriter/template.py b/aodntools/ncwriter/template.py index 62c6c45..6742e0a 100644 --- a/aodntools/ncwriter/template.py +++ b/aodntools/ncwriter/template.py @@ -298,7 +298,7 @@ def create_variables(self, **kwargs): # variable attributes to convert to the same type as the variable # datatype - varattrs_to_convert_to_datatype = ['valid_min', 'valid_max', 'valid_range'] + varattrs_to_convert_to_datatype = ['valid_min', 'valid_max', 'valid_range', 'flag_values'] for varname, varattr in self.variables.items(): if not varattr['_dimensions']: # no kwargs in createVariable From 36938d0846799e80f10b2dcb5d73040b328b4cb5 Mon Sep 17 00:00:00 2001 From: Michael Hemming Date: Tue, 9 Sep 2025 13:42:33 +1000 Subject: [PATCH 6/7] revert change --- test_aodntools/timeseries_products/test_hourly_timeseries.py | 1 - 1 file changed, 1 deletion(-) diff --git a/test_aodntools/timeseries_products/test_hourly_timeseries.py b/test_aodntools/timeseries_products/test_hourly_timeseries.py index a878f6f..9e6a7d4 100644 --- a/test_aodntools/timeseries_products/test_hourly_timeseries.py +++ b/test_aodntools/timeseries_products/test_hourly_timeseries.py @@ -94,7 +94,6 @@ def test_hourly_aggregator(self): self.compare_variables(dataset) - def test_hourly_aggregator_with_nonqc(self): output_file, bad_files = hourly_aggregator(files_to_aggregate=INPUT_FILES, site_code='NRSROT', From 1487da7146f5c180d21a78c515947e565c705ad5 Mon Sep 17 00:00:00 2001 From: Michael Hemming Date: Tue, 9 Sep 2025 16:02:30 +1000 Subject: [PATCH 7/7] include the v2 branch --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1ba9a5f..5ac7bdd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,9 +2,9 @@ name: python-aodntools on: push: - branches: [ master ] + branches: [ master, v2 ] pull_request: - branches: [ master ] + branches: [ master, v2 ] jobs: build: