diff --git a/cara/data.py b/cara/data.py index d9a555ce..7b9f8d4b 100644 --- a/cara/data.py +++ b/cara/data.py @@ -18,7 +18,7 @@ def location_to_weather_stn(location_loc): long = [] station_array = [] fixed_delimits = [0, 12, 13, 44, 51, 60, 69, 90, 91] - station_file = Path(__file__).parent / 'hadisd_station_fullinfo_v311_202001p.txt' + station_file = Path(__file__).parent / 'data' / 'hadisd_station_fullinfo_v311_202001p.txt' for line in station_file.open('rt'): start_end_positions = zip(fixed_delimits[:-1], fixed_delimits[1:]) @@ -39,7 +39,7 @@ def location_celcius_per_hour(location: object) -> typing.Dict[str, typing.List[ # expects a tuple (lat, long) # returns a json format set of weather data w_station = location_to_weather_stn(location) - with open(Path(__file__).parent / 'global_weather_set.json', "r") as json_file: + with open(Path(__file__).parent / 'data' / 'global_weather_set.json', "r") as json_file: weather_dict = json.load(json_file) Location_hourly_temperatures_celsius_per_hour = weather_dict[w_station[0]] if weather_debug: diff --git a/cara/global_weather_set.json b/cara/data/global_weather_set.json similarity index 100% rename from cara/global_weather_set.json rename to cara/data/global_weather_set.json diff --git a/cara/hadisd_station_fullinfo_v311_202001p.txt b/cara/data/hadisd_station_fullinfo_v311_202001p.txt similarity index 100% rename from cara/hadisd_station_fullinfo_v311_202001p.txt rename to cara/data/hadisd_station_fullinfo_v311_202001p.txt diff --git a/setup.py b/setup.py index a70d5237..a8d49b6b 100644 --- a/setup.py +++ b/setup.py @@ -84,5 +84,7 @@ setup( 'apps/*/*/*', 'apps/*/*/*/*', 'apps/*/*/*/*/*', + 'data/*.json', + 'data/*.txt', ]}, )