From 4dff9d3ba5a1d5842148b9e603438b438fec614e Mon Sep 17 00:00:00 2001 From: Pilar Date: Mon, 29 Jun 2020 16:52:05 -0700 Subject: [PATCH] moved data folder --- physics/physics_factory.py | 2 +- usage/usage_feeders/us_base_usage_parameters.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/physics_factory.py b/physics/physics_factory.py index eb311fc2..f2d983d1 100644 --- a/physics/physics_factory.py +++ b/physics/physics_factory.py @@ -12,7 +12,7 @@ class PhysicsFactory: """ PhysicsFactor class """ - def __init__(self, handler, city, base_path=Path(Path.cwd().parent / 'libs/data/physics')): + def __init__(self, handler, city, base_path=Path(Path(__file__).parent.parent / 'data/physics')): self._handler = '_' + handler.lower().replace(' ', '_') self._city = city self._base_path = base_path diff --git a/usage/usage_feeders/us_base_usage_parameters.py b/usage/usage_feeders/us_base_usage_parameters.py index f214bfd8..847dc74b 100644 --- a/usage/usage_feeders/us_base_usage_parameters.py +++ b/usage/usage_feeders/us_base_usage_parameters.py @@ -19,7 +19,7 @@ class UsBaseUsageParameters: self._city = city # todo: control not archetype found # ToDo: this is using the german library as a temporary approach, need to use/define a library for US - path = str(Path.cwd() / 'data/usage/de_library.xml') + path = str(Path(__file__).parent.parent.parent / 'data/usage/de_library.xml') print('usage:', path) with open(path) as xml: self._library = xmltodict.parse(xml.read(), force_list='zoneUsageVariant')