From 45a20eb7fe375b4bcbc5898c4f3847dc6409f913 Mon Sep 17 00:00:00 2001 From: Sunishchal Date: Sat, 26 Sep 2020 01:21:23 -0700 Subject: [PATCH] Modifying structure to support multiple clusters --- solution/health_and_education/clusters/__init__.py | 8 ++++++++ .../{ => clusters}/electricity_cluster.py | 2 +- solution/health_and_education/tests/test_electricity.py | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 solution/health_and_education/clusters/__init__.py rename solution/health_and_education/{ => clusters}/electricity_cluster.py (99%) diff --git a/solution/health_and_education/clusters/__init__.py b/solution/health_and_education/clusters/__init__.py new file mode 100644 index 000000000..e542aa01c --- /dev/null +++ b/solution/health_and_education/clusters/__init__.py @@ -0,0 +1,8 @@ +"""Health & Education solution model for Electricity Cluster + Excel filename: CORE_PopulationChange_29Jan2020 (version 1.4).xlsx + Excel sheet name: Electricity_cluster +""" +import pathlib + +import numpy as np +import pandas as pd \ No newline at end of file diff --git a/solution/health_and_education/electricity_cluster.py b/solution/health_and_education/clusters/electricity_cluster.py similarity index 99% rename from solution/health_and_education/electricity_cluster.py rename to solution/health_and_education/clusters/electricity_cluster.py index 6f556f522..c284eef22 100644 --- a/solution/health_and_education/electricity_cluster.py +++ b/solution/health_and_education/clusters/electricity_cluster.py @@ -12,7 +12,7 @@ # import solarpvutil -DATADIR = pathlib.Path(__file__).parents[0].joinpath('data') +DATADIR = pathlib.Path(__file__).parents[1].joinpath('data') THISDIR = pathlib.Path(__file__).parents[0] name = 'Health and Education - Electricity Cluster' diff --git a/solution/health_and_education/tests/test_electricity.py b/solution/health_and_education/tests/test_electricity.py index a92be8fc2..c35aa235b 100644 --- a/solution/health_and_education/tests/test_electricity.py +++ b/solution/health_and_education/tests/test_electricity.py @@ -4,7 +4,7 @@ import pandas as pd import numpy as np -import electricity_cluster +import clusters.electricity_cluster as electricity_cluster test_elec = electricity_cluster.Scenario() exp_elec = pd.read_csv('expected_elec_cluster.csv', header=None)