Skip to content

Commit 6b45e0e

Browse files
authored
release(v0.5.0)
release(v0.5.0)
2 parents 24a3223 + 31394a8 commit 6b45e0e

16 files changed

+905
-281
lines changed

docs/CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,21 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [0.5.0] - 2025-02-11
8+
9+
### Added
10+
11+
- `zonal_stats` now preserves GeoDataFrame columns (`preserve_columns=True`).
12+
13+
### Changed
14+
15+
- `label` arg has been deprecated from `zonal_stats`.
16+
- `zonal_stats` has same output between `xvec` and `numpy` method.
17+
- `smart_load` is becoming `lazy_load` (`smart_load=True` is `lazy_load=False`)
18+
- Required `pystac-client>=0.7`.
19+
- `groupby_date` engine is fixed to `numpy`. Change is available via
20+
`earthdaily.option.set_option('groupby_date_engine','numba')` for example.
21+
722
## [0.4.2] - 2025-02-05
823

924
### Fixed

earthdaily/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
from pathlib import Path
33
from . import earthdatastore, datasets
44
from .accessor import __EarthDailyAccessorDataArray, __EarthDailyAccessorDataset
5+
from earthdaily.core import options
56

7+
__all__ = ["options"]
68
# import warnings
79
# to hide warnings from rioxarray or nano seconds conversion
810
# warnings.filterwarnings("ignore")
911

10-
__version__ = "0.4.2"
12+
__version__ = "0.5.0"
1113

1214

1315
def EarthDataStore(

earthdaily/accessor/__init__.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def zonal_stats(
133133
self,
134134
geometry,
135135
reducers: list = ["mean"],
136-
label: str = None,
136+
preserve_columns: bool = True,
137137
lazy_load=True,
138138
**kwargs,
139139
):
@@ -146,6 +146,8 @@ def zonal_stats(
146146
A geometry (wkt, geopandas...)
147147
stats : list, optional
148148
The default is ["mean"].
149+
preserve_columns : bool, optional
150+
The default is True.
149151
raise_missing_geometry : bool, optional
150152
DESCRIPTION. The default is False.
151153
**kwargs : dict
@@ -164,8 +166,8 @@ def zonal_stats(
164166
self._obj,
165167
geometry,
166168
reducers=reducers,
167-
smart_load=not lazy_load,
168-
label=label,
169+
lazy_load=lazy_load,
170+
preserve_columns=preserve_columns,
169171
**kwargs,
170172
)
171173

@@ -200,7 +202,7 @@ def drop_unfrozen_coords(self, keep_spatial_ref=True):
200202
]
201203
if keep_spatial_ref and "spatial_ref" in unfrozen_coords:
202204
unfrozen_coords.pop(
203-
np.argwhere(np.in1d(unfrozen_coords, "spatial_ref"))[0][0]
205+
np.argwhere(np.isin(unfrozen_coords, "spatial_ref"))[0][0]
204206
)
205207
return self._obj.drop(unfrozen_coords)
206208

earthdaily/accessor/whittaker/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def whittaker(dataset, beta=10000.0, weights=None, time="time"):
3434
"""
3535

3636
resampled = dataset.resample({time: "1D"}).interpolate("linear")
37-
weights_binary = np.in1d(resampled[time].dt.date, dataset[time].dt.date)
37+
weights_binary = np.isin(resampled[time].dt.date, dataset[time].dt.date)
3838
if weights is not None:
3939
weights_advanced = np.copy(weights_binary.astype(float))
4040
weights_advanced[weights_advanced == 1.0] = weights

earthdaily/core/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from .options import options
2+
3+
__all__ = ["options"]

0 commit comments

Comments
 (0)