diff --git a/wxee/collection.py b/wxee/collection.py index 04144e7..4569220 100644 --- a/wxee/collection.py +++ b/wxee/collection.py @@ -1,5 +1,4 @@ import tempfile -import warnings from typing import List, Optional import ee # type: ignore @@ -59,7 +58,7 @@ def last(self) -> ee.Image: def to_xarray( self, - path: Optional[str] = None, + *, region: Optional[ee.Geometry] = None, scale: Optional[int] = None, crs: str = "EPSG:4326", @@ -129,14 +128,6 @@ def to_xarray( ds = _dataset_from_files(files, masked, nodata) - if path: - msg = ( - "The path argument is deprecated and will be removed in a future " - "release. Use the `xarray.Dataset.to_netcdf` method instead." - ) - warnings.warn(category=DeprecationWarning, message=msg) - ds.to_netcdf(path, mode="w") - return ds def to_tif( diff --git a/wxee/image.py b/wxee/image.py index 98cdabf..5f5ceb3 100644 --- a/wxee/image.py +++ b/wxee/image.py @@ -27,7 +27,7 @@ def __init__(self, obj: ee.image.Image): def to_xarray( self, - path: Optional[str] = None, + *, region: Optional[ee.Geometry] = None, scale: Optional[int] = None, crs: str = "EPSG:4326", @@ -89,14 +89,6 @@ def to_xarray( ds = _dataset_from_files(files, masked, nodata) - if path: - msg = ( - "The path argument is deprecated and will be removed in a future " - "release. Use the `xarray.Dataset.to_netcdf` method instead." - ) - warnings.warn(category=DeprecationWarning, message=msg) - ds.to_netcdf(path, mode="w") - return ds def to_tif( diff --git a/wxee/interpolation.py b/wxee/interpolation.py index e484149..86151e4 100644 --- a/wxee/interpolation.py +++ b/wxee/interpolation.py @@ -34,7 +34,7 @@ def cubic( # This is a trick to maintain backward compatibility for Python version <3.11 # https://stackoverflow.com/questions/40338652/how-to-define-enum-values-that-are-functions -callable_member = partial if sys.version_info < (3, 11) else enum.member # type: ignore +callable_member = partial if sys.version_info < (3, 11) else enum.member # noqa class InterpolationMethodEnum(ParamEnum):