Skip to content

Commit 8ae7ae9

Browse files
committed
black
1 parent f753a1c commit 8ae7ae9

3 files changed

Lines changed: 9 additions & 10 deletions

File tree

dem_handler/dem/rema.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -360,13 +360,15 @@ def read_rema_timeseries_vrt(
360360
bounds: BBox,
361361
save_path: str,
362362
resolution: int,
363-
aoi_name: str | None = "thwaites", # Reading data using indexing file doesn't need the aoi name.
363+
aoi_name: (
364+
str | None
365+
) = "thwaites", # Reading data using indexing file doesn't need the aoi name.
364366
endpoint: str = "umn1.osn.mghpcc.org",
365367
s3_bucket: str = "cse-pgc-test",
366-
remote_folder: str = "digital_earth_antarctica/v0.5", # or "digital_earth_antarctica/v0.4/mosaics" for version 0.4
368+
remote_folder: str = "digital_earth_antarctica/v0.4/mosaics", # or "digital_earth_antarctica/v0.5" for version 0.5
367369
indexing_file: (
368370
str | None
369-
) = "MultiTemporalREMAIndex.parquet", # or None for version 0.4 which does not have an indexing file
371+
) = None, # or "MultiTemporalREMAIndex.parquet" for version 0.5
370372
):
371373
"""Reads the REMA timeseries .vrt or a provided indexing file for a given year and bounds, merging the intersecting tiles into one raster.
372374
@@ -388,9 +390,9 @@ def read_rema_timeseries_vrt(
388390
s3_bucket : str, optional
389391
S3 bucket for the datastore, by default "cse-pgc-test"
390392
remote_folder : str, optional
391-
Remote folder in the s3 bucket where the data is stored, by default "digital_earth_antarctica/v0.5"
393+
Remote folder in the s3 bucket where the data is stored, by default "digital_earth_antarctica/v0.4/mosaics"
392394
indexing_file : str | None, optional
393-
Name of the indexing file in the remote datastore.
395+
Name of the indexing file in the remote datastore.
394396
If None, it will attempt to read directly from the vrt, which is the case for version 0.4 of the REMA timeseries product
395397
396398
Returns
@@ -435,9 +437,8 @@ def read_rema_timeseries_vrt(
435437
bounds_poly = box(*bounds)
436438
indexing_gdf = indexing_gdf[indexing_gdf.intersects(bounds_poly)]
437439
indexing_gdf = indexing_gdf[
438-
indexing_gdf.dem_url.apply(
439-
lambda x: os.path.basename(x).split("_")[2]
440-
) == str(resolution) + "m"
440+
indexing_gdf.dem_url.apply(lambda x: os.path.basename(x).split("_")[2])
441+
== str(resolution) + "m"
441442
]
442443
dem_urls = indexing_gdf.dem_url.to_list()
443444

tests/cop_glo30/test_dem_cop.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import pytest
88
import shutil
99

10-
1110
CURRENT_DIR = Path(__file__).parent.resolve()
1211
TEST_PATH = CURRENT_DIR.parent
1312
TEST_DATA_PATH = CURRENT_DIR / "data"

tests/rema/test_dem_rema.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from pathlib import Path
1111
from shapely import box
1212

13-
1413
CURRENT_DIR = Path(__file__).parent.resolve()
1514
TEST_DATA_PATH = CURRENT_DIR.parent
1615
GEOID_DATA_PATH = TEST_DATA_PATH / "data" / "geoid"

0 commit comments

Comments
 (0)