all tests corrected and adjusted

This commit is contained in:
Luis Aleixo 2021-08-20 09:17:00 +02:00
parent 95af32a6d8
commit c4ae6ef9b4
2 changed files with 4 additions and 3 deletions

View file

@ -270,7 +270,8 @@ class FormData:
# set location
self.weather_station_location = data.location_to_weather_stn(self.location_coordinates)[1]
data.local_temperatures = data.location_celcius_per_hour(self.location_coordinates)
data.local_tempatures = data.location_celcius_per_hour(self.location_coordinates)
print(data.local_tempatures)
inside_temp = models.PiecewiseConstant((0, 24), (293,))
outside_temp = data.Temperatures[str(month)]

View file

@ -5,7 +5,7 @@ import urllib.request
from pathlib import Path
from scipy.spatial import cKDTree
import os
import typing
weather_debug = False
@ -45,7 +45,7 @@ def location_to_weather_stn(location_loc):
return (station_array[ii[0]][0], station_array[ii[0]][1], station_array[ii[0]][2], station_array[ii[0]][3])
def location_celcius_per_hour(location: object) -> object:
def location_celcius_per_hour(location: object) -> typing.Dict[str, typing.List[float]]:
# expects a tuple (lat, long)
# returns a json format set of weather data
w_station = location_to_weather_stn(location)