simple-dwd-weatherforecast 2.0.33__tar.gz → 2.0.34__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.
- {simple_dwd_weatherforecast-2.0.33/simple_dwd_weatherforecast.egg-info → simple_dwd_weatherforecast-2.0.34}/PKG-INFO +1 -1
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/setup.py +1 -1
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/simple_dwd_weatherforecast/dwdforecast.py +9 -4
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34/simple_dwd_weatherforecast.egg-info}/PKG-INFO +1 -1
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_get_daily_condition.py +8 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/LICENCE +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/README.md +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/setup.cfg +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/simple_dwd_weatherforecast/__init__.py +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/simple_dwd_weatherforecast/dwdmap.py +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/simple_dwd_weatherforecast/stations.json +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/simple_dwd_weatherforecast/uv_stations.json +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/simple_dwd_weatherforecast.egg-info/SOURCES.txt +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/simple_dwd_weatherforecast.egg-info/dependency_links.txt +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/simple_dwd_weatherforecast.egg-info/requires.txt +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/simple_dwd_weatherforecast.egg-info/top_level.txt +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/__init__.py +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/dummy_data.py +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/dummy_data_full.py +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/dummy_uv.py +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_get_daily_avg.py +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_get_daily_max.py +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_get_daily_min.py +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_get_daily_sum.py +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_get_day_values.py +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_get_forecast_condition.py +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_get_forecast_data.py +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_get_station_name.py +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_get_timeframe_avg.py +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_get_timeframe_condition.py +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_get_timeframe_max.py +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_get_timeframe_min.py +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_get_timeframe_sum.py +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_get_timeframe_values.py +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_is_in_timerange.py +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_is_valid_timeframe.py +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_location_tools.py +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_map.py +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_parsekml.py +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_region.py +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_reported_weather.py +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_station.py +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_stationsfile.py +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_update.py +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_update_hourly.py +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_uv_index.py +0 -0
- {simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_weather.py +0 -0
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
|
|
5
5
|
|
6
6
|
setuptools.setup(
|
7
7
|
name="simple_dwd_weatherforecast",
|
8
|
-
version="2.0.
|
8
|
+
version="2.0.34",
|
9
9
|
author="Max Fermor",
|
10
10
|
description="A simple tool to retrieve a weather forecast from DWD OpenData",
|
11
11
|
long_description=long_description,
|
@@ -298,13 +298,15 @@ class Weather:
|
|
298
298
|
return (
|
299
299
|
self.strip_to_day(
|
300
300
|
arrow.get(
|
301
|
-
list(self.forecast_data.keys())[0],
|
301
|
+
list(self.forecast_data.keys())[0], # type: ignore
|
302
|
+
"YYYY-MM-DDTHH:mm:ss.SSSZ", # type: ignore
|
302
303
|
).datetime
|
303
304
|
)
|
304
305
|
<= self.strip_to_day(timestamp)
|
305
306
|
<= self.strip_to_day(
|
306
307
|
arrow.get(
|
307
|
-
list(self.forecast_data.keys())[-1],
|
308
|
+
list(self.forecast_data.keys())[-1], # type: ignore
|
309
|
+
"YYYY-MM-DDTHH:mm:ss.SSSZ", # type: ignore
|
308
310
|
).datetime
|
309
311
|
)
|
310
312
|
)
|
@@ -356,9 +358,11 @@ class Weather:
|
|
356
358
|
return None
|
357
359
|
|
358
360
|
def get_daily_condition(self, timestamp: datetime, shouldUpdate=True):
|
361
|
+
print("testieng")
|
359
362
|
if shouldUpdate:
|
360
363
|
self.update()
|
361
|
-
if self.
|
364
|
+
if self.is_in_timerange_day(timestamp):
|
365
|
+
print("working")
|
362
366
|
return self.get_condition(self.get_day_values(timestamp))
|
363
367
|
return None
|
364
368
|
|
@@ -609,7 +613,8 @@ class Weather:
|
|
609
613
|
"timestamp has to be checked prior to be in timerange"
|
610
614
|
result = []
|
611
615
|
first_entry_date = arrow.get(
|
612
|
-
next(iter(self.forecast_data)),
|
616
|
+
next(iter(self.forecast_data)), # type: ignore
|
617
|
+
"YYYY-MM-DDTHH:mm:ss.SSSZ", # type: ignore
|
613
618
|
).datetime # type: ignore
|
614
619
|
if timestamp.day != first_entry_date.day:
|
615
620
|
time_step = self.strip_to_day(timestamp)
|
@@ -49,3 +49,11 @@ class Weather_get_daily_condition(unittest.TestCase):
|
|
49
49
|
self.dwd_weather.get_daily_condition(test_time),
|
50
50
|
"cloudy",
|
51
51
|
)
|
52
|
+
|
53
|
+
@patch("simple_dwd_weatherforecast.dwdforecast.Weather.update", return_value=None)
|
54
|
+
def test_same_day(self, _):
|
55
|
+
test_time = datetime(2020, 11, 6, 0, 0)
|
56
|
+
self.assertEqual(
|
57
|
+
self.dwd_weather.get_daily_condition(test_time),
|
58
|
+
"sunny",
|
59
|
+
)
|
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
|
{simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/dummy_data_full.py
RENAMED
File without changes
|
File without changes
|
{simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_get_daily_avg.py
RENAMED
File without changes
|
{simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_get_daily_max.py
RENAMED
File without changes
|
{simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_get_daily_min.py
RENAMED
File without changes
|
{simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_get_daily_sum.py
RENAMED
File without changes
|
{simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_get_day_values.py
RENAMED
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
|
{simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_location_tools.py
RENAMED
File without changes
|
File without changes
|
{simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_parsekml.py
RENAMED
File without changes
|
{simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_region.py
RENAMED
File without changes
|
File without changes
|
{simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_station.py
RENAMED
File without changes
|
{simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_stationsfile.py
RENAMED
File without changes
|
{simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_update.py
RENAMED
File without changes
|
{simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_update_hourly.py
RENAMED
File without changes
|
{simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_uv_index.py
RENAMED
File without changes
|
{simple_dwd_weatherforecast-2.0.33 → simple_dwd_weatherforecast-2.0.34}/tests/test_weather.py
RENAMED
File without changes
|