python-entsoe 0.6.2__py3-none-any.whl → 0.6.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- entsoe/cli/_resolve.py +3 -3
- entsoe/namespaces/_base.py +8 -11
- {python_entsoe-0.6.2.dist-info → python_entsoe-0.6.3.dist-info}/METADATA +1 -1
- {python_entsoe-0.6.2.dist-info → python_entsoe-0.6.3.dist-info}/RECORD +6 -6
- {python_entsoe-0.6.2.dist-info → python_entsoe-0.6.3.dist-info}/WHEEL +0 -0
- {python_entsoe-0.6.2.dist-info → python_entsoe-0.6.3.dist-info}/entry_points.txt +0 -0
entsoe/cli/_resolve.py
CHANGED
|
@@ -100,11 +100,11 @@ def _expand_period(period: str, today: date) -> tuple[date, date]:
|
|
|
100
100
|
|
|
101
101
|
p = period.lower().strip()
|
|
102
102
|
|
|
103
|
+
# The library's end is exclusive, so a single day ends on the next one.
|
|
103
104
|
if p == "today":
|
|
104
|
-
return today, today
|
|
105
|
+
return today, today + timedelta(days=1)
|
|
105
106
|
if p == "yesterday":
|
|
106
|
-
|
|
107
|
-
return yesterday, yesterday
|
|
107
|
+
return today - timedelta(days=1), today
|
|
108
108
|
if p == "week":
|
|
109
109
|
monday = today - timedelta(days=today.weekday())
|
|
110
110
|
return monday, today
|
entsoe/namespaces/_base.py
CHANGED
|
@@ -7,7 +7,7 @@ from typing import TYPE_CHECKING, Callable, Optional, Union
|
|
|
7
7
|
|
|
8
8
|
import pandas as pd
|
|
9
9
|
|
|
10
|
-
from ..exceptions import InvalidParameterError
|
|
10
|
+
from ..exceptions import InvalidParameterError
|
|
11
11
|
from .._mappings import country_name, lookup_area
|
|
12
12
|
|
|
13
13
|
if TYPE_CHECKING:
|
|
@@ -232,17 +232,14 @@ class BaseNamespace:
|
|
|
232
232
|
)
|
|
233
233
|
new_wide_frames = []
|
|
234
234
|
gap_meta: dict = {}
|
|
235
|
+
# A failed request propagates: returning the cache without the gap
|
|
236
|
+
# would silently hand back partial or empty data.
|
|
235
237
|
for gap in valid_gaps:
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
gap_meta.update(meta)
|
|
242
|
-
except (InvalidParameterError, NoDataError):
|
|
243
|
-
raise
|
|
244
|
-
except Exception as exc:
|
|
245
|
-
logger.warning("Failed to fetch gap %s→%s: %s", gap.start, gap.end, exc)
|
|
238
|
+
raw_df = self._query(params, gap.start, gap.end, ts_filter=ts_filter)
|
|
239
|
+
wide, meta = self._to_wide(raw_df, pivot_col, value_col)
|
|
240
|
+
new_wide_frames.append(wide)
|
|
241
|
+
if meta:
|
|
242
|
+
gap_meta.update(meta)
|
|
246
243
|
|
|
247
244
|
# 4. Merge new data with cache and persist
|
|
248
245
|
if new_wide_frames:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: python-entsoe
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.3
|
|
4
4
|
Summary: Python client for the ENTSO-E Transparency Platform API
|
|
5
5
|
Project-URL: Homepage, https://gitlab.com/datons.com/libraries/python-entsoe
|
|
6
6
|
Project-URL: Repository, https://gitlab.com/datons.com/libraries/python-entsoe
|
|
@@ -10,7 +10,7 @@ entsoe/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
10
10
|
entsoe/.agents/skills/entsoe/SKILL.md,sha256=JsFECSkfnxyR6iFx55WBBcMJjAOaMu84vhcsPsTVWC0,6452
|
|
11
11
|
entsoe/cli/__init__.py,sha256=qUGXx4zdi8dCQkq3PPPa1sgD3Q6KIhJwWeBfTub4suM,139
|
|
12
12
|
entsoe/cli/_output.py,sha256=aV_3CLmOHSxTAVuYdccTWYahqTNPunCbSeoq3YZL-4A,2943
|
|
13
|
-
entsoe/cli/_resolve.py,sha256=
|
|
13
|
+
entsoe/cli/_resolve.py,sha256=oIUgZ2BF-p3AD2wQQBhkVCBHg8fbhIVFdrvll2sesD8,4799
|
|
14
14
|
entsoe/cli/app.py,sha256=_dQsejLncSFJTgOy-26Bvl7pIMXve_YD3gxP-gRVsG4,2069
|
|
15
15
|
entsoe/cli/balancing.py,sha256=ZXcjTEdbx00MUL4L6116G7MwBfpffB02DgazYexq-dc,2752
|
|
16
16
|
entsoe/cli/cache_cmd.py,sha256=ozbQ5apxeLBIjbPsH-Cs5rDOVBVfrzJfDPKv1anLFgY,2255
|
|
@@ -23,13 +23,13 @@ entsoe/cli/load.py,sha256=wC8ZYGi8ce_b5OBBC7fdUPLCgUN_ssC79A0eZJuXGSQ,2685
|
|
|
23
23
|
entsoe/cli/prices.py,sha256=Gj_Irw4i5KJ7lUUUChkm9FqBDCHorP9tN4fFMnc5v0c,1729
|
|
24
24
|
entsoe/cli/transmission.py,sha256=nQMQwxNcvxHEdlldHnVY02oL2aUKONKRpz2M3bFKM1U,5592
|
|
25
25
|
entsoe/namespaces/__init__.py,sha256=ZVd80s5OVxegLo3A6nI64tHlBA1Iwe2ejqQilGNod5E,399
|
|
26
|
-
entsoe/namespaces/_base.py,sha256=
|
|
26
|
+
entsoe/namespaces/_base.py,sha256=Mxsdix1FiYXilVoI1tapoIkgMmXY9XPCQ6NKFUy5xkI,14918
|
|
27
27
|
entsoe/namespaces/balancing.py,sha256=210Ft6dE7WXEuxtTJqyEvCIL960n-sDHT7tsqpSbXIw,2143
|
|
28
28
|
entsoe/namespaces/generation.py,sha256=V4DkvV5ai7aWYYSdZKwWyxTEv1ed4nCCq7DYyVwvc6M,6729
|
|
29
29
|
entsoe/namespaces/load.py,sha256=fbkwKWZifb8DOf5Rc_7c4_eFAXiqT_562r9WTMQwsuo,2160
|
|
30
30
|
entsoe/namespaces/prices.py,sha256=Dr1y5Y9wVdTOzTTWXlx11eiQLQc75chua3UoRpBYfxw,2311
|
|
31
31
|
entsoe/namespaces/transmission.py,sha256=V8zrs2CQXf1WPjJRqz7wc-ztnkfriIKXPLfYHBDJD9M,8067
|
|
32
|
-
python_entsoe-0.6.
|
|
33
|
-
python_entsoe-0.6.
|
|
34
|
-
python_entsoe-0.6.
|
|
35
|
-
python_entsoe-0.6.
|
|
32
|
+
python_entsoe-0.6.3.dist-info/METADATA,sha256=ydDvnqNB_ohS3tLgq9_Gbk3wzfVe42uIPcO695UVTWc,8863
|
|
33
|
+
python_entsoe-0.6.3.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
|
|
34
|
+
python_entsoe-0.6.3.dist-info/entry_points.txt,sha256=tYyCheggCsGRKOq2vIjpAxBksEM7K_iGI6vHkkQLmYg,42
|
|
35
|
+
python_entsoe-0.6.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|