Skip to content

Commit

Permalink
Merge pull request #6991 from NREL/FinalUpdateToWorkflows
Browse files Browse the repository at this point in the history
Minor updates to EPLaunch Workflows
  • Loading branch information
Myoldmopar authored Sep 27, 2018
2 parents b2d26be + 366ff65 commit 012cbfd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions workflows/calc_soil_surface_temp.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def main(self, run_directory, file_name, args):

csst_out = os.path.join(run_directory, 'CalcSoilSurfTemp.out')
if os.path.exists(csst_out):
self.callback("Removing previous output file")
os.remove(csst_out)

if os.path.exists(out_file_path):
Expand All @@ -76,8 +77,10 @@ def main(self, run_directory, file_name, args):
)

# run E+ and gather (for now fake) data
self.callback("Running CalcSoilSurfTemp!")
p1 = Popen([calc_soil_surf_temp_binary, file_name], stdout=PIPE, stdin=PIPE, cwd=run_directory)
p1.communicate(input=b'1\n1\n')
self.callback("CalcSoilSurfTemp Completed!")

if not os.path.exists(csst_out):
return EPLaunchWorkflowResponse1(
Expand All @@ -97,6 +100,7 @@ def main(self, run_directory, file_name, args):
os.remove(csst_out)

try:
self.callback("Processing output file...")
with open(out_file_path, 'r') as f:
lines = f.readlines()
avg_temp = float(lines[1][40:-1])
Expand All @@ -107,12 +111,14 @@ def main(self, run_directory, file_name, args):
ColumnNames.AmplitudeSurfTemp: amp_temp,
ColumnNames.PhaseConstant: phase_constant
}
self.callback(" ...DONE!")
return EPLaunchWorkflowResponse1(
success=True,
message="Ran EnergyPlus OK for file: %s!" % file_name,
column_data=column_data
)
except Exception: # noqa -- there could be lots of issues here, file existence, file contents, float conversion
self.callback(" ...FAILED!")
return EPLaunchWorkflowResponse1(
success=False,
message="CalcSoilSurfTemp seemed to run, but post processing failed for file: %s!" % full_file_path,
Expand Down
6 changes: 6 additions & 0 deletions workflows/energyplus.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,9 @@ def context(self):
def description(self):
return "Run EnergyPlus with SI unit system"

def uses_weather(self):
return True

def get_file_types(self):
return ["*.idf", "*.imf", "*.epJSON"]

Expand Down Expand Up @@ -434,6 +437,9 @@ def context(self):
def description(self):
return "Run EnergyPlus with IP unit system"

def uses_weather(self):
return True

def get_file_types(self):
return ["*.idf", "*.imf", "*.epJSON"]

Expand Down

8 comments on commit 012cbfd

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (Myoldmopar) - x86_64-Linux-Ubuntu-14.04-gcc-4.8: OK (2426 of 2426 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (Myoldmopar) - x86_64-Linux-Ubuntu-14.04-cppcheck-1.61: OK (0 of 0 tests passed, 0 test warnings)

Build Badge

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (Myoldmopar) - x86_64-MacOS-10.9-clang: OK (2406 of 2406 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (Myoldmopar) - x86_64-Linux-Ubuntu-14.04-gcc-4.8-UnitTestsCoverage-Debug: OK (1773 of 1773 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (Myoldmopar) - i386-Windows-7-VisualStudio-14: OK (2406 of 2406 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (Myoldmopar) - x86_64-Linux-Ubuntu-14.04-gcc-4.8-IntegrationCoverage-Debug: OK (2409 of 2409 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (Myoldmopar) - x86_64-Linux-Ubuntu-14.04-custom_check: OK (0 of 0 tests passed, 0 test warnings)

Build Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (Myoldmopar) - Win64-Windows-7-VisualStudio-14: OK (2406 of 2406 tests passed, 0 test warnings)

Build Badge Test Badge

Please sign in to comment.