From 1a3260d2415ea3fc870fe8186037992fd184b2c1 Mon Sep 17 00:00:00 2001 From: Daniel Gangl Date: Mon, 20 Jul 2026 12:10:31 +0000 Subject: [PATCH 1/4] Add symbol readout --- src/zamg/zamg.py | 12 ++++++++++-- tests/test_zamg.py | 2 ++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/zamg/zamg.py b/src/zamg/zamg.py index f515964..8c308a7 100644 --- a/src/zamg/zamg.py +++ b/src/zamg/zamg.py @@ -77,7 +77,15 @@ def __init__( def get_forecast_current( self, forecast_data: dict | None = None, - parameters: tuple[str, ...] = ("t2m", "rh2m", "u10m", "v10m", "tcc", "rr_acc"), + parameters: tuple[str, ...] = ( + "t2m", + "rh2m", + "u10m", + "v10m", + "tcc", + "sy", + "rr_acc", + ), ) -> dict: """Return selected forecast parameters for the current/next timestamp. @@ -472,7 +480,7 @@ async def get_forecast( async with async_timeout.timeout(self.request_timeout): forecast_params = ( - self.forecast_parameters or "t2m,rr_acc,u10m,v10m,tcc,rh2m" + self.forecast_parameters or "t2m,rr_acc,u10m,v10m,tcc,sy,rh2m" ) if lat_lon is None: station_lat, station_lon = self.get_station_location diff --git a/tests/test_zamg.py b/tests/test_zamg.py index 20534f5..1b9c6ca 100644 --- a/tests/test_zamg.py +++ b/tests/test_zamg.py @@ -359,6 +359,7 @@ async def test_get_forecast_uses_station_location(aresponses) -> None: "u10m": {"data": [0.0]}, "v10m": {"data": [0.0]}, "tcc": {"data": [0.0]}, + "sy": {"data": [0.0]}, "rr_acc": {"data": [0.0]}, } } @@ -424,6 +425,7 @@ def test_get_forecast_current() -> None: "u10m": {"data": [1.0, 2.0, 3.0]}, "v10m": {"data": [4.0, 5.0, 6.0]}, "tcc": {"data": [0.1, 0.2, 0.3]}, + "sy": {"data": [1.0, 2.0, 3.0]}, "rr_acc": {"data": [0.5, 0.9, 1.4]}, } } From 01e0b4a64d81622efa18d22a05ea066e8812ee98 Mon Sep 17 00:00:00 2001 From: Daniel Gangl Date: Mon, 20 Jul 2026 12:46:16 +0000 Subject: [PATCH 2/4] Update version --- src/zamg/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zamg/__init__.py b/src/zamg/__init__.py index ef749de..d876238 100644 --- a/src/zamg/__init__.py +++ b/src/zamg/__init__.py @@ -1,6 +1,6 @@ """Asynchronous Python client for GeoSphere Austria weather data.""" -__version__ = "0.3.6" +__version__ = "0.4.1" from .exceptions import ( ZamgApiError, From 964573135a282b1b2791b04c8cb6ba30250b4435 Mon Sep 17 00:00:00 2001 From: Daniel Gangl Date: Mon, 20 Jul 2026 12:49:03 +0000 Subject: [PATCH 3/4] Update version --- package.json | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 3dcc9bc..75a16d1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "zamg", - "version": "0.4.0", + "version": "0.4.1", "private": true, "description": "Asynchronous Python client for GeoSphere Austria (ZAMG) weather data.", "scripts": { diff --git a/pyproject.toml b/pyproject.toml index bd77c8d..34e0ad9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "zamg" -version = "0.4.0" +version = "0.4.1" description = "Asynchronous Python client for GeoSphere Austria (ZAMG) weather data." authors = ["Daniel Gangl "] maintainers = ["Daniel Gangl "] From 971d2b87b55828039ec2d9db3f7f6ad33ea06d3c Mon Sep 17 00:00:00 2001 From: Daniel Gangl Date: Mon, 20 Jul 2026 12:58:28 +0000 Subject: [PATCH 4/4] Improved test cases --- tests/test_zamg.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/test_zamg.py b/tests/test_zamg.py index 1b9c6ca..3a1a2fa 100644 --- a/tests/test_zamg.py +++ b/tests/test_zamg.py @@ -441,6 +441,8 @@ def test_get_forecast_current() -> None: assert result["u10m"] == 2.0 assert result["v10m"] == 5.0 assert result["rain"] == 0.4 + assert result["tcc"] == 0.2 + assert result["sy"] == 2.0 @pytest.mark.asyncio @@ -469,6 +471,7 @@ async def test_get_forecast_trims_past_data() -> None: "u10m": {"data": [1.0, 2.0, 3.0]}, "v10m": {"data": [4.0, 5.0, 6.0]}, "tcc": {"data": [0.1, 0.2, 0.3]}, + "sy": {"data": [1.0, 2.0, 3.0]}, "rr_acc": {"data": [0.5, 0.9, 1.4]}, } } @@ -492,6 +495,11 @@ async def test_get_forecast_trims_past_data() -> None: 19.4, 24.1, ] + assert result["features"][0]["properties"]["parameters"]["tcc"]["data"] == [ + 0.2, + 0.3, + ] + assert result["features"][0]["properties"]["parameters"]["sy"]["data"] == [2.0, 3.0] @pytest.fixture