Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates #23

Merged
merged 14 commits into from
Mar 29, 2023
Merged

Updates #23

merged 14 commits into from
Mar 29, 2023

Conversation

Myoldmopar
Copy link
Owner

Fixes #17 and fixes #19.

@Myoldmopar Myoldmopar self-assigned this Oct 8, 2021
Copy link
Owner Author

@Myoldmopar Myoldmopar left a comment

Choose a reason for hiding this comment

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

I think this is nearly ready, but a little cleanup and getting it to run successfully need to be done first.

@@ -3,7 +3,7 @@
import os
import requests
import shutil
from subprocess import check_call, CalledProcessError
from subprocess import check_call, CalledProcessError, STDOUT
Copy link
Owner Author

Choose a reason for hiding this comment

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

Allow reporting issues from the extract process to STDOUT for debugging.


from ep_testing.config import TestConfiguration, OS
from ep_testing.tests.api import TestPythonAPIAccess, TestCAPIAccess, TestCppAPIDelayedAccess
from ep_testing.tests.energyplus import TestPlainDDRunEPlusFile
from ep_testing.tests.expand_objects import TestExpandObjectsAndRun
from ep_testing.tests.hvacdiagram import HVACDiagram
Copy link
Owner Author

Choose a reason for hiding this comment

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

Import the new HVACDiagram tester

@@ -32,6 +29,9 @@ def run(self):
TransitionOldFile().run(
self.install_path, self.verbose, {'last_version': self.config.tag_last_version}
)
HVACDiagram().run(
self.install_path, self.verbose, {}
)
Copy link
Owner Author

Choose a reason for hiding this comment

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

Run the new HVACDiagram tester.

@@ -75,7 +75,8 @@ def run(self, install_root: str, verbose: bool, kwargs: dict):
my_env = os.environ.copy()
if self.os == OS.Windows: # my local comp didn't have cmake in path except in interact shells
my_env["PATH"] = install_root + ";" + my_env["PATH"]
my_check_call(self.verbose, [py, python_file_path], env=my_env)
idf_to_run = os.path.join(install_root, 'ExampleFiles', 'PythonPluginCustomOutputVariable.idf')
my_check_call(self.verbose, [py, python_file_path, '-D', idf_to_run], env=my_env)
Copy link
Owner Author

Choose a reason for hiding this comment

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

Modify the API to run a PythonPlugin file to test that combination out.

@@ -8,3 +8,6 @@
for t in [5.0, 15.0, 25.0]:
cp = glycol.specific_heat(state, t)
rho = glycol.density(state, t)
state2 = api.state_manager.new_state()
api.runtime.set_console_output_status(state2, False)
sys.exit(api.runtime.run_energyplus(state2, sys.argv[1:]))
Copy link
Owner Author

Choose a reason for hiding this comment

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

Add running EnergyPlus (silently) to exercise some more of the API.

class BaseTest:

def __init__(self):
self.verbose = False
temp_dir = mkdtemp()
print('{Sandbox Dir: \"' + temp_dir + '\"} ', end='')
chdir(temp_dir)
Copy link
Owner Author

Choose a reason for hiding this comment

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

Have the base test create a sandbox directory...I think I need to clean this prior to merge.

@Myoldmopar Myoldmopar merged commit 482d832 into master Mar 29, 2023
@Myoldmopar Myoldmopar deleted the Updates branch March 29, 2023 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Mixed Plugin/API Test Add test for Fortran utilities like HVACDiagram
2 participants