Skip to content

Commit

Permalink
quick fix for bug in PR 202
Browse files Browse the repository at this point in the history
  • Loading branch information
fboerman committed Aug 13, 2022
1 parent 5e7d87a commit 2b8b39d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 0 additions & 4 deletions deploy_to_pypi.sh

This file was deleted.

6 changes: 5 additions & 1 deletion entsoe/entsoe.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
warnings.filterwarnings('ignore', category=XMLParsedAsHTMLWarning)

__title__ = "entsoe-py"
__version__ = "0.5.5"
__version__ = "0.5.6"
__author__ = "EnergieID.be, Frank Boerman"
__license__ = "MIT"

Expand Down Expand Up @@ -1063,6 +1063,7 @@ def query_day_ahead_prices(
pd.Series
"""
area = lookup_area(country_code)
# we do here extra days at start and end to fix issue 187
text = super(EntsoePandasClient, self).query_day_ahead_prices(
country_code=area,
start=start-pd.Timedelta(days=1),
Expand All @@ -1071,6 +1072,9 @@ def query_day_ahead_prices(
series = parse_prices(text)
series = series.tz_convert(area.tz)
series = series.truncate(before=start, after=end)
# because of the above fix we need to check again if any valid data exists after truncating
if len(series) == 0:
raise NoMatchingDataError
return series

@year_limited
Expand Down

0 comments on commit 2b8b39d

Please sign in to comment.