-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Geosphere Observation parsing of dates in values -> thanks to @mh…
…uber89 who discovered the bug and delivered a fix
- Loading branch information
Showing
5 changed files
with
22 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from datetime import datetime | ||
|
||
import pytest | ||
|
||
from wetterdienst import Parameter | ||
from wetterdienst.provider.geosphere.observation import GeosphereObservationRequest, GeosphereObservationResolution | ||
|
||
|
||
@pytest.mark.remote | ||
def test_geopshere_observation_api(): | ||
"""Test the correct parsing of data, especially the dates -> thanks @mhuber89 for the discovery and fix""" | ||
stations_at = GeosphereObservationRequest( | ||
parameter=[Parameter.WIND_SPEED], | ||
resolution=GeosphereObservationResolution.HOURLY, | ||
start_date=datetime(2022, 6, 1), | ||
end_date=datetime(2022, 6, 2), | ||
) | ||
station_at = stations_at.filter_by_station_id("4821") | ||
df = station_at.values.all().df | ||
assert df.get_column("value").is_not_null().sum() == 25 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters