<commit_before>from models.weatherCache import *
from models.weatherConfig import *
from models.weatherRequest import *

# Testing Controller
try:
    print('Starting ... ')
    
    # Config
    weather_config = WeatherConfig()
    print('WeatherConfig: Instantiated')
    
    weather_config.set_config()
    print('WeatherConfig: Config Set')
    
    wconfig = weather_config.get_config_all()
    print('WeatherConfig: Got Config')

    if wconfig == None:
        raise Exception('No config can be found.')

    location = wconfig['location']
    
    # Caching
    weather_cache = WeatherCache()
    weather_cache.clean_cache()
    print('WeatherCache: Cache cleaned')
    
    weather = weather_cache.check_cache(location)

    if weather == None:
        weather_request = WeatherRequest()
        weather_request.set_params(wconfig)
        weather = weather_request.get_weather()
        print('Request Weather')        
        weather_cache.set_cache(weather, location)

    print(weather)
    
except Exception as e:
    print(str(e))
<commit_msg>Added some output to controller processes.<commit_after>from models.weatherCache import *
from models.weatherConfig import *
from models.weatherRequest import *

# Testing Controller
try:
    print('Starting ... ')
    
    # Config
    weather_config = WeatherConfig()
    print('WeatherConfig: Instantiated')
    
    weather_config.set_config()
    print('WeatherConfig: Config Set')
    
    wconfig = weather_config.get_config_all()
    print('WeatherConfig: Got Config')

    if wconfig == None:
        raise Exception('No config can be found.')

    location = wconfig['location']
    
    # Caching
    weather_cache = WeatherCache()
    weather_cache.clean_cache()
    print('WeatherCache: Cache cleaned')

    #Get Weather
    weather = weather_cache.check_cache(location)

    if weather == None:
        weather_request = WeatherRequest()
        weather_request.set_params(wconfig)
        weather = weather_request.get_weather()
        print('WeatherRequest" Request Weather')
        
        weather_cache.set_cache(weather, location)
        print('WeatherCache" Cached Weather')

    print(weather)
    
except Exception as e:
    print(str(e))

{'fraction_non_alphanumeric': 0.09438202247191012, 'fraction_numerical': 0.0, 'mean_word_length': 3.1222222222222222, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3977971', 'n_tokens_mistral': 645, 'n_tokens_neox': 607, 'n_words': 141}