From 528e66b9fc7dee230f04d39d9df1302001e2a4f1 Mon Sep 17 00:00:00 2001
From: Bichen Li <libichen94@gmail.com>
Date: Fri, 11 May 2018 21:23:01 +0200
Subject: [PATCH] Fix the bugs on path of the Result files

---
 Assert_Results.py                 | 2 +-
 dataprocessing/Validationtools.py | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Assert_Results.py b/Assert_Results.py
index c5382f9..9b80a23 100644
--- a/Assert_Results.py
+++ b/Assert_Results.py
@@ -7,7 +7,7 @@ from dataprocessing.readtools import *
 print("Test Start")
 # We need to extract all the result files from git now
 for files in os.listdir(
-        os.path.abspath(os.path.abspath(os.path.join(os.getcwd(), "..")) + "/reference-results/Neplan/BasicGrids")):
+        os.path.abspath("reference-results/Neplan/BasicGrids")):
     print(files)
     assert_modelia_neplan_results(os.path.splitext(files)[0]) #  Assert the result, model result path read from cmd line
 print("Test End")
diff --git a/dataprocessing/Validationtools.py b/dataprocessing/Validationtools.py
index 43874b2..6affb3e 100644
--- a/dataprocessing/Validationtools.py
+++ b/dataprocessing/Validationtools.py
@@ -8,9 +8,9 @@ from dataprocessing.readtools import *
 
 def compare_modelica_neplan(Net_Name):  # compare the result file from NEPLAN and Modelica
     # Read in original nepaln result file
-    file_Neplan = os.path.abspath(os.path.abspath(os.path.join(os.getcwd(), ".."))+"/reference-results/Neplan/BasicGrids/" + Net_Name + ".rlf")
+    file_Neplan = os.path.abspath("reference-results/Neplan/BasicGrids/" + Net_Name + ".rlf")
     # Read in original Modelica result file
-    file_Modelica = os.path.abspath(os.path.abspath(os.path.join(os.getcwd(), "..")) + "/reference-results/Modelica/BasicGrids/" + Net_Name + ".mat")
+    file_Modelica = os.path.abspath("reference-results/Modelica/BasicGrids/" + Net_Name + ".mat")
     result_neplan = read_timeseries_NEPLAN_loadflow(file_Neplan)
     result_modelica = read_timeseries_Modelica(file_Modelica)
 
-- 
GitLab