Merged
Conversation
19 tasks
jmarrec
reviewed
Dec 18, 2024
Contributor
There was a problem hiding this comment.
This is used in python_plugin.osm. Did you delete it by mistake?
Comment on lines
+126
to
+131
| # create the python plugin search paths object (this test should fail without it) | ||
| python_plugin_search_paths = model.getPythonPluginSearchPaths | ||
| python_plugin_search_paths.setAddCurrentWorkingDirectorytoSearchPath(true) | ||
| python_plugin_search_paths.setAddInputFileDirectorytoSearchPath(true) | ||
| python_plugin_search_paths.setAddepinEnvironmentVariabletoSearchPath(true) | ||
| python_plugin_search_paths.addSearchPath(File.dirname(__FILE__)) |
Contributor
There was a problem hiding this comment.
Can you confirm this fails without this object please?
| @@ -0,0 +1 @@ | |||
| print('hello world') No newline at end of file | |||
Contributor
There was a problem hiding this comment.
Suggested change
| print('hello world') | |
| # This file is used by python_plugin_search_paths | |
| print('hello world') |
…s based on the stem and prepare for the new OSM test
jmarrec
reviewed
Dec 19, 2024
| python_plugin_search_paths.setAddCurrentWorkingDirectorytoSearchPath(True) | ||
| python_plugin_search_paths.setAddInputFileDirectorytoSearchPath(True) | ||
| python_plugin_search_paths.setAddepinEnvironmentVariabletoSearchPath(True) | ||
| python_plugin_search_paths.addSearchPath(str(Path(__file__).parent)) |
Contributor
There was a problem hiding this comment.
I added a python version. Really the fact that this takes only a string bothers me.
test_helpers.rb
Outdated
Comment on lines
711
to
716
| when 'python_plugin.osm', 'python_plugin_search_paths' | ||
| # We need to manually copy the supporting schedule into | ||
| # the testruns folder for the simulation to be able to find it | ||
| program_file_name = "#{File.basename(filename, File.extname(filename))}_program.py" | ||
| plugin_ori_path = File.join(File.dirname(__FILE__), | ||
| 'model/simulationtests/python_plugin_program.py') | ||
| 'model/simulationtests', program_file_name) |
Contributor
There was a problem hiding this comment.
When running the OSM version, copy the program.py file, which is computed as "#{stem}_program.py
python_plugin.osm -> python_plugin_program.py
python_plugin_search_paths.osm -> python_plugin_search_paths_program.py
Comment on lines
+114
to
+115
| stem = File.basename(__FILE__, File.extname(__FILE__)) | ||
| pluginPath = File.join(Dir.tmpdir, "#{stem}_program.py") |
Contributor
There was a problem hiding this comment.
dynamic #{stem_program.py}
Contributor
|
I need to fix the high-level tests that is failing |
…io-resources into python-plugin-search-paths
jmarrec
reviewed
Jun 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request overview
Companion PR:
Link to relevant GitHub Issue(s) if appropriate:
Link to the Ubuntu 22.04 .deb installer to use for CI Testing. If not set, it will default to latest official release.
[OpenStudio Installer]: https://openstudio-ci-builds.s3-us-west-2.amazonaws.com/develop/OpenStudio-3.10.0-rc1%2B19dda3ef1b-Ubuntu-22.04-x86_64.deb
This Pull Request is concerning:
NewTest: a new test for a new model API class,TestFix: a fix for an existing test. The GitHub issue should be referenced in the PR descriptionNewTestForExisting: a new test for an already-existing model API classOther: Something else, like maintenance of the repo, or just committing test results with a new OpenStudio version.Depending on your answer, please fill out the required section below, and delete the three others.
Leave the review checklist in place.
Case 1: New test for a new model API class
Please include which class(es) you are adding a test to specifically test for.
Include a link to the OpenStudio Pull Request in which you are adding the new classes, or the class itself if already on develop.
Work Checklist
The following has been checked to ensure compliance with the guidelines:
Tests pass either:
with official OpenStudio release (include version):
AddedOSMhas been added to this PRout.oswhave been committedwith current develop (incude SHA):
PendingOSMhas been added to this PRmodel_tests.rbhas a TODO.out.oswhave been committed as they need to be run with an official OpenStudio versionRuby test is stable: when run multiple times on the same machine, it produces the same total site kBTU.
Please paste the heatmap png generated after running the following commands:
model.getThermalZones.sort_by{|z| z.name.to_s}.each do ...so I am sure I put the same ZoneHVAC systems to the same zones regardless of their order)process_results.py(seepython process_results.py --helpfor usage).Please paste the text output or heatmap png generated after running the following commands:
Object has been added to
autosize_hvac.rbto ensure the autosizedXXX values methods do workReview Checklist
# TODOadded tomodel_tests.rbout.oswhave been committedautosize_hvacas appropriateNewTest,TestFix,NewTestForExisting,OtherNewTest: addPendingOSMorAddedOSM