hub/factories/usage/usage_feeders/de_usage_parameters.py
pilar 94c593b651 created weather_factory but not completed
re-structured weather.py file accordingly (now in weather_factory.helpers
2020-10-28 13:14:05 -04:00

26 lines
729 B
Python

"""
DeUsageParameters model the usage properties for a German building
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
"""
from pathlib import Path
import xmltodict
from factories.usage.usage_feeders.helpers.us_function_to_usage import UsFunctionToUsage
class DeUsageParameters:
"""
DeUsageParameters
"""
def __init__(self, city_objects):
self._city_objects = city_objects
# load De Library
path = str(Path.cwd() / 'data/usage/de_library.xml')
with open(path) as xml:
self._library = xmltodict.parse(xml.read())
for city_object in city_objects:
UsFunctionToUsage.usage(city_object.function)