From 2f62c7d0687b63d8da3c5aeedb0d0eb2c0c09fee Mon Sep 17 00:00:00 2001 From: Aimee Barciauskas Date: Wed, 8 Nov 2023 15:35:46 -0800 Subject: [PATCH] Linting --- infrastructure/aws/lambda/handler.py | 4 ---- titiler/xarray/factory.py | 1 - titiler/xarray/reader.py | 7 ++++--- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/infrastructure/aws/lambda/handler.py b/infrastructure/aws/lambda/handler.py index 39344d4..a3ad561 100644 --- a/infrastructure/aws/lambda/handler.py +++ b/infrastructure/aws/lambda/handler.py @@ -4,10 +4,6 @@ from mangum import Mangum -import os -directory = '/mnt/efs/libraries' -contents = os.listdir(directory) -print(contents) from titiler.xarray.main import app logging.getLogger("mangum.lifespan").setLevel(logging.ERROR) diff --git a/titiler/xarray/factory.py b/titiler/xarray/factory.py index d82800e..92f75dd 100644 --- a/titiler/xarray/factory.py +++ b/titiler/xarray/factory.py @@ -255,7 +255,6 @@ def tiles_endpoint( # type: ignore x, y, z, tilesize=scale * 256, nodata=src_dst.input.rio.nodata ) - if post_process: image = post_process(image) diff --git a/titiler/xarray/reader.py b/titiler/xarray/reader.py index a79b23e..3a01bfb 100644 --- a/titiler/xarray/reader.py +++ b/titiler/xarray/reader.py @@ -75,7 +75,7 @@ def get_filesystem( else s3fs.S3FileSystem() ) return ( - s3_filesystem.open(src_path, mode='rb') + s3_filesystem.open(src_path, mode="rb") if xr_engine == "h5netcdf" else s3fs.S3Map(root=src_path, s3=s3_filesystem) ) @@ -132,7 +132,7 @@ def xarray_open_dataset( "decode_coords": "all", "decode_times": decode_times, "engine": xr_engine, - "cache": False + "cache": False, } # Argument if we're opening a datatree @@ -253,7 +253,8 @@ class ZarrReader(XarrayReader): def __attrs_post_init__(self): """Set bounds and CRS.""" self.ds = self._ctx_stack.enter_context( - xarray_open_dataset(self.src_path, + xarray_open_dataset( + self.src_path, group=self.group, reference=self.reference, consolidated=self.consolidated,