From f39728f03f477fb1fdd78ee059765f0fd0622769 Mon Sep 17 00:00:00 2001 From: lbdreyer Date: Fri, 6 Dec 2019 10:16:48 +0000 Subject: [PATCH 1/2] Fixes required due to the release of iris-grib v0.15.0 --- lib/iris/tests/__init__.py | 6 ---- lib/iris/tests/integration/test_grib2.py | 11 ++++--- lib/iris/tests/integration/test_grib_load.py | 1 - lib/iris/tests/results/grib_load/3_layer.cml | 9 ++++++ .../tests/results/grib_load/earth_shape_0.cml | 3 ++ .../tests/results/grib_load/earth_shape_1.cml | 3 ++ .../tests/results/grib_load/earth_shape_2.cml | 3 ++ .../tests/results/grib_load/earth_shape_3.cml | 3 ++ .../tests/results/grib_load/earth_shape_4.cml | 3 ++ .../tests/results/grib_load/earth_shape_5.cml | 3 ++ .../tests/results/grib_load/earth_shape_6.cml | 3 ++ .../tests/results/grib_load/earth_shape_7.cml | 3 ++ .../tests/results/grib_load/ineg_jneg.cml | 3 ++ .../tests/results/grib_load/ineg_jpos.cml | 3 ++ .../tests/results/grib_load/ipos_jneg.cml | 3 ++ .../tests/results/grib_load/ipos_jpos.cml | 3 ++ .../tests/results/grib_load/lambert_grib2.cml | 3 ++ .../grib_load/missing_values_grib2.cml | 3 ++ .../results/grib_load/reduced_gg_grib2.cml | 1 + .../results/grib_load/regular_gg_grib2.cml | 3 ++ .../results/grib_load/time_bound_grib2.cml | 3 ++ .../grid_complex_spatial_differencing.cml | 3 ++ .../integration/grib2/TestGDT30/lambert.cml | 3 ++ .../integration/grib2/TestGDT40/reduced.cml | 1 + .../integration/grib2/TestGDT40/regular.cml | 3 ++ .../integration/grib2/TestImport/gdt1.cml | 3 ++ .../grib2/TestImport/gdt90_with_bitmap.cml | 3 ++ .../NAMEII/0_TRACER_AIR_CONCENTRATION.cml | 3 ++ .../name_grib/NAMEII/1_TRACER_DOSAGE.cml | 3 ++ .../NAMEII/2_TRACER_WET_DEPOSITION.cml | 31 ------------------- .../NAMEII/3_TRACER_DRY_DEPOSITION.cml | 3 ++ .../NAMEII/4_TRACER_TOTAL_DEPOSITION.cml | 3 ++ .../NAMEIII/0_TRACER_AIR_CONCENTRATION.cml | 3 ++ .../NAMEIII/1_TRACER_AIR_CONCENTRATION.cml | 3 ++ .../NAMEIII/2_TRACER_DRY_DEPOSITION.cml | 3 ++ .../NAMEIII/3_TRACER_WET_DEPOSITION.cml | 3 ++ .../name_grib/NAMEIII/4_TRACER_DEPOSITION.cml | 3 ++ .../system/supported_filetype_.grib2.cml | 3 ++ .../results/uri_callback/grib_global.cml | 3 ++ 39 files changed, 114 insertions(+), 42 deletions(-) delete mode 100644 lib/iris/tests/results/integration/name_grib/NAMEII/2_TRACER_WET_DEPOSITION.cml diff --git a/lib/iris/tests/__init__.py b/lib/iris/tests/__init__.py index f260bd0d26..d689738008 100644 --- a/lib/iris/tests/__init__.py +++ b/lib/iris/tests/__init__.py @@ -1297,12 +1297,6 @@ class MyPlotTests(test.GraphicsTest): ) -# TODO: remove these skips when iris-grib is fixed -skip_grib_fail = unittest.skipIf( - True, "Test(s) are failing due to known problems " 'with "iris-grib".' -) - - skip_sample_data = unittest.skipIf( not SAMPLE_DATA_AVAILABLE, ('Test(s) require "iris-sample-data", ' "which is not available."), diff --git a/lib/iris/tests/integration/test_grib2.py b/lib/iris/tests/integration/test_grib2.py index 1c94d424b0..691c4469d3 100644 --- a/lib/iris/tests/integration/test_grib2.py +++ b/lib/iris/tests/integration/test_grib2.py @@ -24,6 +24,7 @@ if tests.GRIB_AVAILABLE: from iris_grib import load_pairs_from_fields from iris_grib.message import GribMessage + from iris_grib.grib_phenom_translation import GRIBCode @tests.skip_data @@ -36,7 +37,6 @@ def test_gdt1(self): cube = load_cube(path) self.assertCMLApproxData(cube) - @tests.skip_grib_fail def test_gdt90_with_bitmap(self): path = tests.get_data_path(("GRIB", "umukv", "ukv_chan9.grib2")) cube = load_cube(path) @@ -156,6 +156,7 @@ def test_save_load(self): cube.add_aux_coord(tcoord) cube.add_aux_coord(fpcoord) cube.attributes["WMO_constituent_type"] = 0 + cube.attributes["GRIB_PARAM"] = GRIBCode("GRIB2:d000c014n000") with self.temp_filename("test_grib_pdt40.grib2") as temp_file_path: save(cube, temp_file_path) @@ -232,9 +233,12 @@ def test_save_load(self): self.assertEqual(test_cube.shape, (744, 744)) self.assertEqual(test_cube.cell_methods, ()) - # Check no cube attributes on the re-loaded cube. + # Check only the GRIB_PARAM attribute exists on the re-loaded cube. # Note: this does *not* match the original, but is as expected. - self.assertEqual(cube_loaded_from_saved.attributes, {}) + self.assertEqual( + cube_loaded_from_saved.attributes, + {"GRIB_PARAM": GRIBCode("GRIB2:d000c003n001")}, + ) # Now remaining to check: coordinates + data... @@ -300,7 +304,6 @@ def test_regular(self): cube = load_cube(path) self.assertCMLApproxData(cube) - @tests.skip_grib_fail def test_reduced(self): path = tests.get_data_path(("GRIB", "reduced", "reduced_gg.grib2")) cube = load_cube(path) diff --git a/lib/iris/tests/integration/test_grib_load.py b/lib/iris/tests/integration/test_grib_load.py index 230c792756..0e7548ee34 100644 --- a/lib/iris/tests/integration/test_grib_load.py +++ b/lib/iris/tests/integration/test_grib_load.py @@ -136,7 +136,6 @@ def test_reduced_ll(self): ) self.assertCML(cube, ("grib_load", "reduced_ll_grib1.cml")) - @tests.skip_grib_fail def test_reduced_gg(self): cube = iris.load_cube( tests.get_data_path(("GRIB", "reduced", "reduced_gg.grib2")) diff --git a/lib/iris/tests/results/grib_load/3_layer.cml b/lib/iris/tests/results/grib_load/3_layer.cml index 24f24ed777..76cc41a04a 100644 --- a/lib/iris/tests/results/grib_load/3_layer.cml +++ b/lib/iris/tests/results/grib_load/3_layer.cml @@ -1,6 +1,9 @@ + + + @@ -31,6 +34,9 @@ + + + @@ -82,6 +88,9 @@ + + + diff --git a/lib/iris/tests/results/grib_load/earth_shape_0.cml b/lib/iris/tests/results/grib_load/earth_shape_0.cml index 1e1e491d58..bb51db3201 100644 --- a/lib/iris/tests/results/grib_load/earth_shape_0.cml +++ b/lib/iris/tests/results/grib_load/earth_shape_0.cml @@ -1,6 +1,9 @@ + + + diff --git a/lib/iris/tests/results/grib_load/earth_shape_1.cml b/lib/iris/tests/results/grib_load/earth_shape_1.cml index dd409ebb20..774e9921b5 100644 --- a/lib/iris/tests/results/grib_load/earth_shape_1.cml +++ b/lib/iris/tests/results/grib_load/earth_shape_1.cml @@ -1,6 +1,9 @@ + + + diff --git a/lib/iris/tests/results/grib_load/earth_shape_2.cml b/lib/iris/tests/results/grib_load/earth_shape_2.cml index 0e3a4a14ea..3ff9ccccb5 100644 --- a/lib/iris/tests/results/grib_load/earth_shape_2.cml +++ b/lib/iris/tests/results/grib_load/earth_shape_2.cml @@ -1,6 +1,9 @@ + + + diff --git a/lib/iris/tests/results/grib_load/earth_shape_3.cml b/lib/iris/tests/results/grib_load/earth_shape_3.cml index 0213c4a4a0..47d11467ee 100644 --- a/lib/iris/tests/results/grib_load/earth_shape_3.cml +++ b/lib/iris/tests/results/grib_load/earth_shape_3.cml @@ -1,6 +1,9 @@ + + + diff --git a/lib/iris/tests/results/grib_load/earth_shape_4.cml b/lib/iris/tests/results/grib_load/earth_shape_4.cml index 2573e867d1..e6aa14e45a 100644 --- a/lib/iris/tests/results/grib_load/earth_shape_4.cml +++ b/lib/iris/tests/results/grib_load/earth_shape_4.cml @@ -1,6 +1,9 @@ + + + diff --git a/lib/iris/tests/results/grib_load/earth_shape_5.cml b/lib/iris/tests/results/grib_load/earth_shape_5.cml index 56462c684b..1257c9c2ad 100644 --- a/lib/iris/tests/results/grib_load/earth_shape_5.cml +++ b/lib/iris/tests/results/grib_load/earth_shape_5.cml @@ -1,6 +1,9 @@ + + + diff --git a/lib/iris/tests/results/grib_load/earth_shape_6.cml b/lib/iris/tests/results/grib_load/earth_shape_6.cml index 1ad54d1f77..eb96657104 100644 --- a/lib/iris/tests/results/grib_load/earth_shape_6.cml +++ b/lib/iris/tests/results/grib_load/earth_shape_6.cml @@ -1,6 +1,9 @@ + + + diff --git a/lib/iris/tests/results/grib_load/earth_shape_7.cml b/lib/iris/tests/results/grib_load/earth_shape_7.cml index cea76b2739..d27ce04a4c 100644 --- a/lib/iris/tests/results/grib_load/earth_shape_7.cml +++ b/lib/iris/tests/results/grib_load/earth_shape_7.cml @@ -1,6 +1,9 @@ + + + diff --git a/lib/iris/tests/results/grib_load/ineg_jneg.cml b/lib/iris/tests/results/grib_load/ineg_jneg.cml index 344fbbacf2..a7d7741092 100644 --- a/lib/iris/tests/results/grib_load/ineg_jneg.cml +++ b/lib/iris/tests/results/grib_load/ineg_jneg.cml @@ -1,6 +1,9 @@ + + + diff --git a/lib/iris/tests/results/grib_load/ineg_jpos.cml b/lib/iris/tests/results/grib_load/ineg_jpos.cml index 14967e6a88..f578fceadb 100644 --- a/lib/iris/tests/results/grib_load/ineg_jpos.cml +++ b/lib/iris/tests/results/grib_load/ineg_jpos.cml @@ -1,6 +1,9 @@ + + + diff --git a/lib/iris/tests/results/grib_load/ipos_jneg.cml b/lib/iris/tests/results/grib_load/ipos_jneg.cml index 1e1e491d58..bb51db3201 100644 --- a/lib/iris/tests/results/grib_load/ipos_jneg.cml +++ b/lib/iris/tests/results/grib_load/ipos_jneg.cml @@ -1,6 +1,9 @@ + + + diff --git a/lib/iris/tests/results/grib_load/ipos_jpos.cml b/lib/iris/tests/results/grib_load/ipos_jpos.cml index 373d8fc475..4dc6d7f980 100644 --- a/lib/iris/tests/results/grib_load/ipos_jpos.cml +++ b/lib/iris/tests/results/grib_load/ipos_jpos.cml @@ -1,6 +1,9 @@ + + + diff --git a/lib/iris/tests/results/grib_load/lambert_grib2.cml b/lib/iris/tests/results/grib_load/lambert_grib2.cml index e8b3f1c4c6..dc938f0aca 100644 --- a/lib/iris/tests/results/grib_load/lambert_grib2.cml +++ b/lib/iris/tests/results/grib_load/lambert_grib2.cml @@ -1,6 +1,9 @@ + + + diff --git a/lib/iris/tests/results/grib_load/missing_values_grib2.cml b/lib/iris/tests/results/grib_load/missing_values_grib2.cml index b090d56a92..c4c0d81915 100644 --- a/lib/iris/tests/results/grib_load/missing_values_grib2.cml +++ b/lib/iris/tests/results/grib_load/missing_values_grib2.cml @@ -1,6 +1,9 @@ + + + diff --git a/lib/iris/tests/results/grib_load/reduced_gg_grib2.cml b/lib/iris/tests/results/grib_load/reduced_gg_grib2.cml index f34938ce3f..fa3ba45e3d 100644 --- a/lib/iris/tests/results/grib_load/reduced_gg_grib2.cml +++ b/lib/iris/tests/results/grib_load/reduced_gg_grib2.cml @@ -2,6 +2,7 @@ + diff --git a/lib/iris/tests/results/grib_load/regular_gg_grib2.cml b/lib/iris/tests/results/grib_load/regular_gg_grib2.cml index 20230aee0f..14213c1602 100644 --- a/lib/iris/tests/results/grib_load/regular_gg_grib2.cml +++ b/lib/iris/tests/results/grib_load/regular_gg_grib2.cml @@ -1,6 +1,9 @@ + + + diff --git a/lib/iris/tests/results/grib_load/time_bound_grib2.cml b/lib/iris/tests/results/grib_load/time_bound_grib2.cml index 1e1e491d58..bb51db3201 100644 --- a/lib/iris/tests/results/grib_load/time_bound_grib2.cml +++ b/lib/iris/tests/results/grib_load/time_bound_grib2.cml @@ -1,6 +1,9 @@ + + + diff --git a/lib/iris/tests/results/integration/grib2/TestDRT3/grid_complex_spatial_differencing.cml b/lib/iris/tests/results/integration/grib2/TestDRT3/grid_complex_spatial_differencing.cml index b15c6a4308..2cfe06f8f6 100644 --- a/lib/iris/tests/results/integration/grib2/TestDRT3/grid_complex_spatial_differencing.cml +++ b/lib/iris/tests/results/integration/grib2/TestDRT3/grid_complex_spatial_differencing.cml @@ -1,6 +1,9 @@ + + + diff --git a/lib/iris/tests/results/integration/grib2/TestGDT30/lambert.cml b/lib/iris/tests/results/integration/grib2/TestGDT30/lambert.cml index a33d0b04ba..215a0de88d 100644 --- a/lib/iris/tests/results/integration/grib2/TestGDT30/lambert.cml +++ b/lib/iris/tests/results/integration/grib2/TestGDT30/lambert.cml @@ -1,6 +1,9 @@ + + + diff --git a/lib/iris/tests/results/integration/grib2/TestGDT40/reduced.cml b/lib/iris/tests/results/integration/grib2/TestGDT40/reduced.cml index f2ca666998..3a963b3203 100644 --- a/lib/iris/tests/results/integration/grib2/TestGDT40/reduced.cml +++ b/lib/iris/tests/results/integration/grib2/TestGDT40/reduced.cml @@ -2,6 +2,7 @@ + diff --git a/lib/iris/tests/results/integration/grib2/TestGDT40/regular.cml b/lib/iris/tests/results/integration/grib2/TestGDT40/regular.cml index fb6445b8b1..e5eea0fc7c 100644 --- a/lib/iris/tests/results/integration/grib2/TestGDT40/regular.cml +++ b/lib/iris/tests/results/integration/grib2/TestGDT40/regular.cml @@ -1,6 +1,9 @@ + + + diff --git a/lib/iris/tests/results/integration/grib2/TestImport/gdt1.cml b/lib/iris/tests/results/integration/grib2/TestImport/gdt1.cml index d3cc6b4732..d304d8a843 100644 --- a/lib/iris/tests/results/integration/grib2/TestImport/gdt1.cml +++ b/lib/iris/tests/results/integration/grib2/TestImport/gdt1.cml @@ -1,6 +1,9 @@ + + + diff --git a/lib/iris/tests/results/integration/grib2/TestImport/gdt90_with_bitmap.cml b/lib/iris/tests/results/integration/grib2/TestImport/gdt90_with_bitmap.cml index 9f950b5e1f..3118f86823 100644 --- a/lib/iris/tests/results/integration/grib2/TestImport/gdt90_with_bitmap.cml +++ b/lib/iris/tests/results/integration/grib2/TestImport/gdt90_with_bitmap.cml @@ -1,6 +1,9 @@ + + + diff --git a/lib/iris/tests/results/integration/name_grib/NAMEII/0_TRACER_AIR_CONCENTRATION.cml b/lib/iris/tests/results/integration/name_grib/NAMEII/0_TRACER_AIR_CONCENTRATION.cml index 4d0fddbba5..b0daf50907 100644 --- a/lib/iris/tests/results/integration/name_grib/NAMEII/0_TRACER_AIR_CONCENTRATION.cml +++ b/lib/iris/tests/results/integration/name_grib/NAMEII/0_TRACER_AIR_CONCENTRATION.cml @@ -1,6 +1,9 @@ + + + diff --git a/lib/iris/tests/results/integration/name_grib/NAMEII/1_TRACER_DOSAGE.cml b/lib/iris/tests/results/integration/name_grib/NAMEII/1_TRACER_DOSAGE.cml index fd61a67eb6..aef4988ce6 100644 --- a/lib/iris/tests/results/integration/name_grib/NAMEII/1_TRACER_DOSAGE.cml +++ b/lib/iris/tests/results/integration/name_grib/NAMEII/1_TRACER_DOSAGE.cml @@ -1,6 +1,9 @@ + + + diff --git a/lib/iris/tests/results/integration/name_grib/NAMEII/2_TRACER_WET_DEPOSITION.cml b/lib/iris/tests/results/integration/name_grib/NAMEII/2_TRACER_WET_DEPOSITION.cml deleted file mode 100644 index 029aa022ea..0000000000 --- a/lib/iris/tests/results/integration/name_grib/NAMEII/2_TRACER_WET_DEPOSITION.cml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/iris/tests/results/integration/name_grib/NAMEII/3_TRACER_DRY_DEPOSITION.cml b/lib/iris/tests/results/integration/name_grib/NAMEII/3_TRACER_DRY_DEPOSITION.cml index 429d9db2ff..5787c19643 100644 --- a/lib/iris/tests/results/integration/name_grib/NAMEII/3_TRACER_DRY_DEPOSITION.cml +++ b/lib/iris/tests/results/integration/name_grib/NAMEII/3_TRACER_DRY_DEPOSITION.cml @@ -1,6 +1,9 @@ + + + diff --git a/lib/iris/tests/results/integration/name_grib/NAMEII/4_TRACER_TOTAL_DEPOSITION.cml b/lib/iris/tests/results/integration/name_grib/NAMEII/4_TRACER_TOTAL_DEPOSITION.cml index 429d9db2ff..5787c19643 100644 --- a/lib/iris/tests/results/integration/name_grib/NAMEII/4_TRACER_TOTAL_DEPOSITION.cml +++ b/lib/iris/tests/results/integration/name_grib/NAMEII/4_TRACER_TOTAL_DEPOSITION.cml @@ -1,6 +1,9 @@ + + + diff --git a/lib/iris/tests/results/integration/name_grib/NAMEIII/0_TRACER_AIR_CONCENTRATION.cml b/lib/iris/tests/results/integration/name_grib/NAMEIII/0_TRACER_AIR_CONCENTRATION.cml index 8412a4f814..1a31427de0 100644 --- a/lib/iris/tests/results/integration/name_grib/NAMEIII/0_TRACER_AIR_CONCENTRATION.cml +++ b/lib/iris/tests/results/integration/name_grib/NAMEIII/0_TRACER_AIR_CONCENTRATION.cml @@ -1,6 +1,9 @@ + + + diff --git a/lib/iris/tests/results/integration/name_grib/NAMEIII/1_TRACER_AIR_CONCENTRATION.cml b/lib/iris/tests/results/integration/name_grib/NAMEIII/1_TRACER_AIR_CONCENTRATION.cml index 590e8ef463..7007836e62 100644 --- a/lib/iris/tests/results/integration/name_grib/NAMEIII/1_TRACER_AIR_CONCENTRATION.cml +++ b/lib/iris/tests/results/integration/name_grib/NAMEIII/1_TRACER_AIR_CONCENTRATION.cml @@ -1,6 +1,9 @@ + + + diff --git a/lib/iris/tests/results/integration/name_grib/NAMEIII/2_TRACER_DRY_DEPOSITION.cml b/lib/iris/tests/results/integration/name_grib/NAMEIII/2_TRACER_DRY_DEPOSITION.cml index d3edb03a56..850ef89ed2 100644 --- a/lib/iris/tests/results/integration/name_grib/NAMEIII/2_TRACER_DRY_DEPOSITION.cml +++ b/lib/iris/tests/results/integration/name_grib/NAMEIII/2_TRACER_DRY_DEPOSITION.cml @@ -1,6 +1,9 @@ + + + diff --git a/lib/iris/tests/results/integration/name_grib/NAMEIII/3_TRACER_WET_DEPOSITION.cml b/lib/iris/tests/results/integration/name_grib/NAMEIII/3_TRACER_WET_DEPOSITION.cml index 3e8d62ef3d..ade4cea92d 100644 --- a/lib/iris/tests/results/integration/name_grib/NAMEIII/3_TRACER_WET_DEPOSITION.cml +++ b/lib/iris/tests/results/integration/name_grib/NAMEIII/3_TRACER_WET_DEPOSITION.cml @@ -1,6 +1,9 @@ + + + diff --git a/lib/iris/tests/results/integration/name_grib/NAMEIII/4_TRACER_DEPOSITION.cml b/lib/iris/tests/results/integration/name_grib/NAMEIII/4_TRACER_DEPOSITION.cml index 586aaa6b56..088b622c46 100644 --- a/lib/iris/tests/results/integration/name_grib/NAMEIII/4_TRACER_DEPOSITION.cml +++ b/lib/iris/tests/results/integration/name_grib/NAMEIII/4_TRACER_DEPOSITION.cml @@ -1,6 +1,9 @@ + + + diff --git a/lib/iris/tests/results/system/supported_filetype_.grib2.cml b/lib/iris/tests/results/system/supported_filetype_.grib2.cml index c230684fbd..f334b13863 100644 --- a/lib/iris/tests/results/system/supported_filetype_.grib2.cml +++ b/lib/iris/tests/results/system/supported_filetype_.grib2.cml @@ -1,6 +1,9 @@ + + + diff --git a/lib/iris/tests/results/uri_callback/grib_global.cml b/lib/iris/tests/results/uri_callback/grib_global.cml index a7a23e7235..aef0310a96 100644 --- a/lib/iris/tests/results/uri_callback/grib_global.cml +++ b/lib/iris/tests/results/uri_callback/grib_global.cml @@ -1,6 +1,9 @@ + + + From c44c55cfe5e18fbc98c70e21b5d79f5c4b9e5b4c Mon Sep 17 00:00:00 2001 From: lbdreyer Date: Fri, 6 Dec 2019 13:36:30 +0000 Subject: [PATCH 2/2] Update python-eccodes pin --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 792f6a6195..983248b853 100644 --- a/.travis.yml +++ b/.travis.yml @@ -105,7 +105,7 @@ install: # Conda-forge versioning is out of order (0.9.* is later than 2.12.*). - > if [[ "${TEST_MINIMAL}" != true ]]; then - conda install --quiet -n ${ENV_NAME} python-eccodes=0.9.3; + conda install --quiet -n ${ENV_NAME} python-eccodes>=0.9.1,<2; conda install --quiet -n ${ENV_NAME} --no-deps iris-grib; fi