From fb81c8e5a12befe93df43181306eb2d40b98f132 Mon Sep 17 00:00:00 2001
From: Mark Driver <mdd31@alumni.cam.ac.uk>
Date: Sun, 5 Apr 2020 12:10:06 +0100
Subject: [PATCH] update to fix bugs in VLE output bool reading and create
 output dir for VLE runner.

---
 phasecalculator/classes/outputinformation.py     | 3 ++-
 phasecalculator/runners/phasecalculatorrunner.py | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/phasecalculator/classes/outputinformation.py b/phasecalculator/classes/outputinformation.py
index 0c6ac23..92888b1 100755
--- a/phasecalculator/classes/outputinformation.py
+++ b/phasecalculator/classes/outputinformation.py
@@ -179,10 +179,11 @@ class OutputInformation(object):
             VLE output option.
 
         """
-        xpath_expression = "phasecalc:FGIPOutput/text()"
+        xpath_expression = "phasecalc:VLEOutput/text()"
         vle_output = output_xml.xpath(
             xpath_expression, namespaces=PHASE_CALC_NAMESPACE_DICT
         )[0]
+        LOGGER.debug("VLE output: %s", vle_output)
         return True if vle_output == "true" else False
 
     def write_to_xml(self):
diff --git a/phasecalculator/runners/phasecalculatorrunner.py b/phasecalculator/runners/phasecalculatorrunner.py
index 356260f..1fd76f4 100755
--- a/phasecalculator/runners/phasecalculatorrunner.py
+++ b/phasecalculator/runners/phasecalculatorrunner.py
@@ -191,6 +191,7 @@ def run_vle_analysis(system_info, phase_filename, **kwargs):
     phase_output_filename = create_phase_output_filename(phase_filename)
     csv_filename = create_phase_summary_filename(system_info.runtime_information.output_dir,
                                                  phase_filename)
+    create_output_dir(system_info)
     vlerun.calculate_and_process_vle_data(
         jar_path, phase_filename, phase_output_filename,
         csv_filename, **kwargs
-- 
GitLab