From 22eb2d1ed080c0eb7bca72a201421f74a74732f7 Mon Sep 17 00:00:00 2001 From: Wei Ji Date: Mon, 21 Dec 2020 00:08:36 +1300 Subject: [PATCH] :white_check_mark: Let unit tests use deepicedrain v0.4.0 data Update unit tests that were hardcoded to v0.3.1 data to use the newer deepicedrain v0.4.0 data (ATL11 data processed up to 20200930). Probably shouldn't be hardcoded in the first place, but there's a chicken and egg problem, so kick the can down the road then. --- deepicedrain/atlas_catalog.yaml | 2 +- deepicedrain/features/subglacial_lakes.feature | 4 ++-- deepicedrain/tests/conftest.py | 2 +- deepicedrain/tests/test_subglacial_lake_animation.py | 5 ----- deepicedrain/tests/test_subglacial_lake_finder.py | 2 +- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/deepicedrain/atlas_catalog.yaml b/deepicedrain/atlas_catalog.yaml index 276afdb..840e315 100644 --- a/deepicedrain/atlas_catalog.yaml +++ b/deepicedrain/atlas_catalog.yaml @@ -125,7 +125,7 @@ sources: description: ICESat-2 Cycle number type: int default: 7 - allowed: [1, 2, 3, 4, 5, 6, 7] + allowed: [1, 2, 3, 4, 5, 6, 7, 8, 9] driver: intake_parquet.source.ParquetSource metadata: fields: diff --git a/deepicedrain/features/subglacial_lakes.feature b/deepicedrain/features/subglacial_lakes.feature index c87e4a8..ed69d26 100644 --- a/deepicedrain/features/subglacial_lakes.feature +++ b/deepicedrain/features/subglacial_lakes.feature @@ -11,7 +11,7 @@ Feature: Mapping Antarctic subglacial lakes Examples: | location | this_many | - | whillans_downstream | 7 | + | slessor_downstream | 15 | Scenario Outline: Subglacial Lake Animation @@ -24,7 +24,7 @@ Feature: Mapping Antarctic subglacial lakes | lake_name | location | cycles | azimuth | elevation | # | Mercer XV | whillans_downstream | 3-8 | 157.5 | 45 | # | Whillans 7 | whillans_upstream | 3-8 | 157.5 | 45 | - # | Whillans 6 | whillans_upstream | 3-8 | 157.5 | 45 | + | Whillans 6 | whillans_upstream | 3-8 | 157.5 | 45 | # | Whillans X | whillans_upstream | 3-8 | 157.5 | 45 | # | Whillans XI | whillans_upstream | 3-8 | 157.5 | 45 | # | Whillans IX | whillans_upstream | 3-8 | 157.5 | 45 | diff --git a/deepicedrain/tests/conftest.py b/deepicedrain/tests/conftest.py index 6ff62d6..e2b2041 100644 --- a/deepicedrain/tests/conftest.py +++ b/deepicedrain/tests/conftest.py @@ -51,7 +51,7 @@ def lake_altimetry_data(lake_name: str, location: str, context) -> pd.DataFrame: context.lake_name: str = lake_name # TODO use intake_parquet after https://github.com/intake/intake-parquet/issues/18 with fsspec.open( - f"simplecache::https://github.com/weiji14/deepicedrain/releases/download/v0.3.1/df_dhdt_{location}.parquet", + f"simplecache::https://github.com/weiji14/deepicedrain/releases/download/v0.4.0/df_dhdt_{location}.parquet", simplecache=dict(cache_storage="ATLXI", same_names=True), ) as openfile: dataframe: pd.DataFrame = pd.read_parquet(openfile) diff --git a/deepicedrain/tests/test_subglacial_lake_animation.py b/deepicedrain/tests/test_subglacial_lake_animation.py index 4cce144..42d8fae 100644 --- a/deepicedrain/tests/test_subglacial_lake_animation.py +++ b/deepicedrain/tests/test_subglacial_lake_animation.py @@ -12,7 +12,6 @@ import pytest import tqdm import xarray as xr -from packaging.version import Version from pytest_bdd import scenario, then, when import deepicedrain @@ -32,10 +31,6 @@ def test_subglacial_lake_animation(): pass -@pytest.mark.skipif( - Version(deepicedrain.__version__) < Version("0.4.0"), - reason="Requires newer df_dhdt_*.parquet file", -) @scenario( feature_name="features/subglacial_lakes.feature", scenario_name="Subglacial Lake Mega-Cluster Animation", diff --git a/deepicedrain/tests/test_subglacial_lake_finder.py b/deepicedrain/tests/test_subglacial_lake_finder.py index 9f8d0ae..118eee4 100644 --- a/deepicedrain/tests/test_subglacial_lake_finder.py +++ b/deepicedrain/tests/test_subglacial_lake_finder.py @@ -28,7 +28,7 @@ def basin_altimetry_data(location): """ # TODO use intake_parquet after https://github.com/intake/intake-parquet/issues/18 with fsspec.open( - f"simplecache::https://github.com/weiji14/deepicedrain/releases/download/v0.3.1/df_dhdt_{location}.parquet", + f"simplecache::https://github.com/weiji14/deepicedrain/releases/download/v0.4.0/df_dhdt_{location}.parquet", simplecache=dict(cache_storage="ATLXI", same_names=True), ) as openfile: _dataframe: xpd.DataFrame = xpd.read_parquet(