Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions wxee/collection.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import tempfile
import warnings
from typing import List, Optional

import ee # type: ignore
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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(
Expand Down
10 changes: 1 addition & 9 deletions wxee/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion wxee/interpolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down