python-entsoe 0.6.2__tar.gz → 0.6.3__tar.gz
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.
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/CHANGELOG.md +8 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/PKG-INFO +1 -1
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/pyproject.toml +1 -1
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/src/entsoe/cli/_resolve.py +3 -3
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/src/entsoe/namespaces/_base.py +8 -11
- python_entsoe-0.6.3/tests/test_cli_periods.py +15 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/tests/test_xml_day_ahead.py +14 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/uv.lock +1 -1
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/.github/workflows/publish.yml +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/.gitignore +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/.gitlab-ci.yml +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/.python-version +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/CLAUDE.md +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/README.md +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/docs/data-availability.md +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/examples/balancing.ipynb +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/examples/generation.ipynb +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/examples/generation_per_plant.ipynb +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/examples/load.ipynb +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/examples/prices.ipynb +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/examples/transmission.ipynb +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/scripts/generate_notebooks.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/src/entsoe/.agents/skills/entsoe/SKILL.md +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/src/entsoe/__init__.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/src/entsoe/_http.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/src/entsoe/_mappings.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/src/entsoe/_xml.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/src/entsoe/cache.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/src/entsoe/catalog.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/src/entsoe/cli/__init__.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/src/entsoe/cli/_output.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/src/entsoe/cli/app.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/src/entsoe/cli/balancing.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/src/entsoe/cli/cache_cmd.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/src/entsoe/cli/catalog_cmd.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/src/entsoe/cli/config.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/src/entsoe/cli/config_cmd.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/src/entsoe/cli/exec_cmd.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/src/entsoe/cli/generation.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/src/entsoe/cli/load.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/src/entsoe/cli/prices.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/src/entsoe/cli/transmission.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/src/entsoe/client.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/src/entsoe/exceptions.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/src/entsoe/namespaces/__init__.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/src/entsoe/namespaces/balancing.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/src/entsoe/namespaces/generation.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/src/entsoe/namespaces/load.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/src/entsoe/namespaces/prices.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/src/entsoe/namespaces/transmission.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/src/entsoe/py.typed +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/tests/__init__.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/tests/conftest.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/tests/test_balancing.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/tests/test_cache_layout.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/tests/test_generation.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/tests/test_load.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/tests/test_multi.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/tests/test_prices.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/tests/test_transmission.py +0 -0
- {python_entsoe-0.6.2 → python_entsoe-0.6.3}/tests/test_validation.py +0 -0
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.6.3](https://gitlab.com/datons.com/libraries/python-entsoe/-/tags/v0.6.3) (2026-10-15)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **cli:** `--period today` and `--period yesterday` produced an empty range and always failed with "start must be before end"; each now covers the full day.
|
|
9
|
+
* **cache:** a failed download (timeout, HTTP error) no longer returns an empty or partial DataFrame with only a warning in the log; the error is raised.
|
|
10
|
+
|
|
3
11
|
## [0.6.2](https://gitlab.com/datons.com/libraries/python-entsoe/-/tags/v0.6.2) (2026-10-15)
|
|
4
12
|
|
|
5
13
|
|
|
@@ -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
|
|
@@ -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
|
|
@@ -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:
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"""Offline tests for CLI period shorthands."""
|
|
2
|
+
|
|
3
|
+
from datetime import date
|
|
4
|
+
|
|
5
|
+
from entsoe.cli._resolve import _expand_period
|
|
6
|
+
|
|
7
|
+
TODAY = date(2026, 10, 15)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def test_today_is_one_full_day():
|
|
11
|
+
assert _expand_period("today", TODAY) == (date(2026, 10, 15), date(2026, 10, 16))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def test_yesterday_is_one_full_day():
|
|
15
|
+
assert _expand_period("yesterday", TODAY) == (date(2026, 10, 14), date(2026, 10, 15))
|
|
@@ -97,3 +97,17 @@ def test_unknown_sequence_raises_no_data():
|
|
|
97
97
|
|
|
98
98
|
with pytest.raises(NoDataError):
|
|
99
99
|
_day_ahead(ES, sequence=2)
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
def test_cached_query_raises_on_network_error(tmp_path):
|
|
103
|
+
import requests
|
|
104
|
+
|
|
105
|
+
from entsoe.cache import CacheConfig, CacheStore
|
|
106
|
+
|
|
107
|
+
class _DownHttp:
|
|
108
|
+
def query(self, params, start, end):
|
|
109
|
+
raise requests.exceptions.ConnectTimeout("down")
|
|
110
|
+
|
|
111
|
+
ns = PricesNamespace(_DownHttp(), cache=CacheStore(CacheConfig(cache_dir=tmp_path)))
|
|
112
|
+
with pytest.raises(requests.exceptions.ConnectTimeout):
|
|
113
|
+
ns.day_ahead("2026-10-13", "2026-10-14", country="DE_LU")
|
|
@@ -1705,7 +1705,7 @@ wheels = [
|
|
|
1705
1705
|
|
|
1706
1706
|
[[package]]
|
|
1707
1707
|
name = "python-entsoe"
|
|
1708
|
-
version = "0.6.
|
|
1708
|
+
version = "0.6.3"
|
|
1709
1709
|
source = { editable = "." }
|
|
1710
1710
|
dependencies = [
|
|
1711
1711
|
{ name = "pandas", version = "2.3.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|