Skip to content

Commit

Permalink
Release 0.12.5 (bug fix) (#246)
Browse files Browse the repository at this point in the history
* allow get_stations with meteo_var == slice(None)

* only filter stations if start/end is provided

* ensure current station is in dataframe so nearest station can be determined

* fix for knmi precipitation data station attribute is sometimes a series with duplicate entries #241 (#242)

* reshuffle a bit

* ruff

* up version for minor release

* version bump

* fix bug in fill_missing_obs

* version bump

* ruff

* ruff

---------

Co-authored-by: Davíd Brakenhoff <[email protected]>
  • Loading branch information
OnnoEbbens and dbrakenhoff authored Oct 9, 2024
1 parent 034b1b5 commit 7762f0f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions hydropandas/io/knmi.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,10 @@ def _get_default_settings(settings=None) -> Dict[str, Any]:

if "fill_missing_obs" in settings.keys():
if "raise_exceptions" in settings.keys():
logger.debug("set raise_exceptions=False because fill_missing_obs is True")
if settings["fill_missing_obs"] and settings["raise_exceptions"]:
logger.debug(
"set raise_exceptions=False because fill_missing_obs is True"
)
settings["raise_exceptions"] = False
else:
settings["raise_exceptions"] = False
Expand Down Expand Up @@ -611,6 +613,7 @@ def fill_missing_measurements(
meteo_var=meteo_var,
start=start,
end=end,
stations=stations,
ignore=ignore,
)

Expand Down Expand Up @@ -1457,7 +1460,7 @@ def get_nearest_station_df(
if stations is None:
stations = get_stations(meteo_var=meteo_var, start=start, end=end)
if ignore is not None:
stations.drop(ignore, inplace=True)
stations = stations.drop(ignore)
if stations.empty:
return None

Expand Down
2 changes: 1 addition & 1 deletion hydropandas/version.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from importlib import metadata
from sys import version as os_version

__version__ = "0.12.4"
__version__ = "0.12.5"


def show_versions():
Expand Down

0 comments on commit 7762f0f

Please sign in to comment.