Add debug mode and update folder structure

This commit is contained in:
Koa Wells 2023-04-21 14:59:04 -04:00
parent 3f1bab01c8
commit 9992f3681c
4 changed files with 37 additions and 21 deletions

View File

@ -6,6 +6,7 @@ import pandas as pd
import platform
import os
import xlsxwriter
from subprocess import SubprocessError, TimeoutExpired, CalledProcessError
from hub.imports.geometry_factory import GeometryFactory
from hub.imports.weather_factory import WeatherFactory
@ -21,7 +22,9 @@ from meb import Meb
from meb_results import Results as MEBResults
class EnergyValidation:
def __init__(self):
def __init__(self, debug=False):
self.debug = debug
self.weather_file = Path('./data/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw').resolve()
self.climate_file_name = 'Montreal'
self.tmp_folder = Path('./tmp').resolve()
@ -297,7 +300,11 @@ class EnergyValidation:
print(f"{building_id} meb time: {meb_end}")
print(f"{building_id} ep time: {ep_end}")
except:
except (SubprocessError, TimeoutExpired, CalledProcessError) as error:
if self.debug is True:
raise Exception(error)
else:
print(building_id, " failed SRA, MEB, or EP")
building_with_error = pd.DataFrame([
building_id,
'NA',

5
results/.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
/*
/*/
!.gitignore
!/meb/
!/ep/

2
results/ep/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore

2
results/meb/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore