Skip to content

Commit

Permalink
fix test errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrakenhoff committed Aug 15, 2024
1 parent dac5d86 commit a5b70f7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pastastore/extensions/hpd.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def add_obscollection(
data_column: Optional[str] = None,
unit_multiplier: float = 1.0,
update: bool = False,
normalize_datetime_index: bool = True,
normalize_datetime_index: bool = False,
):
"""Add an ObsCollection to the PastaStore.
Expand All @@ -72,6 +72,9 @@ def add_obscollection(
multiply unit by this value before saving it in the store
update : bool, optional
if True, update currently stored time series with new data
normalize_datetime_index : bool, optional
if True, normalize the datetime so stress value at midnight represents
the daily total, by default True.
"""
for name, row in oc.iterrows():
obs = row["obs"]
Expand Down Expand Up @@ -391,7 +394,7 @@ def update_knmi_meteo(
tmintmax = self._store.get_tmin_tmax("stresses", names=names)

if tmax is not None:
if tmintmax["tmax"].min() > tmax:
if tmintmax["tmax"].min() > Timestamp(tmax):
logger.info(f"All KNMI stresses are up to date to {tmax}.")
return

Expand Down

0 comments on commit a5b70f7

Please sign in to comment.