Skip to content

Commit

Permalink
✅ Let unit tests use deepicedrain v0.4.0 data
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
weiji14 committed Dec 20, 2020
1 parent 7ee3e04 commit 22eb2d1
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion deepicedrain/atlas_catalog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions deepicedrain/features/subglacial_lakes.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Feature: Mapping Antarctic subglacial lakes

Examples:
| location | this_many |
| whillans_downstream | 7 |
| slessor_downstream | 15 |


Scenario Outline: Subglacial Lake Animation
Expand All @@ -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 |
Expand Down
2 changes: 1 addition & 1 deletion deepicedrain/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 0 additions & 5 deletions deepicedrain/tests/test_subglacial_lake_animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion deepicedrain/tests/test_subglacial_lake_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 22eb2d1

Please sign in to comment.