Skip to content

Conversation

@jmarrec
Copy link
Collaborator

@jmarrec jmarrec commented Jul 10, 2025

Pull request overview

I have tested that there are no changes in output (actually: just a tiny bit) in 3.10.0 versus this branch.

3.10.0 versus this branch, still using "require 'openstudio/measure/ShowRunnerOutput.rb' and calling show_output: only diff is the placement of the second "undefined stepResult"

--- ../../RubyModelMeasure/tests/ori.log	2025-07-10 13:00:04.357705477 +0200
+++ ../../RubyModelMeasure/tests/new_back.log	2025-07-10 13:00:04.378705844 +0200
@@ -1,8 +1,9 @@
+[ShowRunnerOutput.rb] <0> Deprecated at 3.11.0, use WorkflowStepResult::showOutput() instead
 [openstudio.measure.OSRunner] <1> Cannot find current Workflow Step
 [openstudio.WorkflowStepResult] <0> WorkflowStepResult value called with undefined stepResult, returning 'Success'
-[openstudio.WorkflowStepResult] <0> WorkflowStepResult value called with undefined stepResult, returning 'Success'
 
 **MEASURE APPLICABILITY**
+[openstudio.WorkflowStepResult] <0> WorkflowStepResult value called with undefined stepResult, returning 'Success'
 0 = Success
 **INITIAL CONDITION**
 The building started with 4 spaces

Running with result.showOutput() instead, the only difference is that the Deprecation warning is gone. And Python and Ruby both produce exactly the same output.

[openstudio.measure.OSRunner] <1> Cannot find current Workflow Step
[openstudio.WorkflowStepResult] <0> WorkflowStepResult value called with undefined stepResult, returning 'Success'

**MEASURE APPLICABILITY**
[openstudio.WorkflowStepResult] <0> WorkflowStepResult value called with undefined stepResult, returning 'Success'
0 = Success
**INITIAL CONDITION**
The building started with 4 spaces.
**FINAL CONDITION**
The building finished with 5 spaces.
**INFO MESSAGES**
Space New Space was added.
**WARNING MESSAGES**
**ERROR MESSAGES**
***Machine-Readable Attributes**
[
{
   "name" : "space_name",
   "value" : "New Space"
},{
   "display_name" : "New Space Name",
   "name" : "new_space_name",
   "value" : "New Space"
}
]
***Files Generated**

I don't really like the ***Machine-Readable Attributes** formatting.

Pull Request Author

  • Model API Changes / Additions
  • Any new or modified fields have been implemented in the EnergyPlus ForwardTranslator (and ReverseTranslator as appropriate)
  • Model API methods are tested (in src/model/test)
  • EnergyPlus ForwardTranslator Tests (in src/energyplus/Test)
  • If a new object or method, added a test in NREL/OpenStudio-resources: Add Link
  • If needed, added VersionTranslation rules for the objects (src/osversion/VersionTranslator.cpp)
  • Verified that C# bindings built fine on Windows, partial classes used as needed, etc.
  • All new and existing tests passes
  • If methods have been deprecated, update rest of code to use the new methods

Labels:

  • If change to an IDD file, add the label IDDChange
  • If breaking existing API, add the label APIChange
  • If deemed ready, add label Pull Request - Ready for CI so that CI builds your PR

Review Checklist

This will not be exhaustively relevant to every PR.

  • Perform a Code Review on GitHub
  • Code Style, strip trailing whitespace, etc.
  • All related changes have been implemented: model changes, model tests, FT changes, FT tests, VersionTranslation, OS App
  • Labeling is ok
  • If defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
  • If feature, test running new feature, try creative ways to break it
  • CI status: all green or justified

@jmarrec jmarrec requested a review from DavidGoldwasser July 10, 2025 11:02
@jmarrec jmarrec self-assigned this Jul 10, 2025
@jmarrec jmarrec added Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge. component - Ruby bindings component - Python bindings Enhancement Request labels Jul 10, 2025
@jmarrec
Copy link
Collaborator Author

jmarrec commented Jul 10, 2025

d0cea24 is an optional commit, like I said I disliked the formatting for the Machine readable attributes. Diff without/with it

Screenshot from 2025-07-10 14-06-15

@github-actions
Copy link

🧪 Test Results Dashboard

Summary

Metric Value
Total Tests 4088
Passed 4076
Failed 12
Errors 0
Skipped 0
Success Rate 99.7%
Generated 2025-07-10 12:16:44 UTC

⚠️ Minor Issues Detected

🔍 Failed Tests (12 failures)

Linux-c++ (12 failures)

OpenStudioCLI.test_measure_manager.OpenStudioCLI.test_measure_manager (run1)

Error Message:

Failed

Full Details:

No details available
OpenStudioCLI.Classic.test_measure_manager.OpenStudioCLI.Classic.test_measure_manager (run1)

Error Message:

Failed

Full Details:

No details available
CLITest-test_bundle-bundle.CLITest-test_bundle-bundle (run1)

Error Message:

Failed

Full Details:

No details available
CLITest-test_bundle-bundle_git.CLITest-test_bundle-bundle_git (run1)

Error Message:

Failed

Full Details:

No details available
CLITest-test_bundle-bundle_native_embedded.CLITest-test_bundle-bundle_native_embedded (run1)

Error Message:

Failed

Full Details:

No details available
OpenStudioCLI.Classic.test_measure_manager.OpenStudioCLI.Classic.test_measure_manager (run2)

Error Message:

Failed

Full Details:

No details available
CLITest-test_bundle-bundle.CLITest-test_bundle-bundle (run2)

Error Message:

Failed

Full Details:

No details available
CLITest-test_bundle-bundle_git.CLITest-test_bundle-bundle_git (run2)

Error Message:

Failed

Full Details:

No details available
CLITest-test_bundle-bundle_native_embedded.CLITest-test_bundle-bundle_native_embedded (run2)

Error Message:

Failed

Full Details:

No details available
CLITest-test_bundle-bundle.CLITest-test_bundle-bundle (run3)

Error Message:

Failed

Full Details:

No details available
CLITest-test_bundle-bundle_git.CLITest-test_bundle-bundle_git (run3)

Error Message:

Failed

Full Details:

No details available
CLITest-test_bundle-bundle_native_embedded.CLITest-test_bundle-bundle_native_embedded (run3)

Error Message:

Failed

Full Details:

No details available

📊 Test Run Information

Run XML File Status
run1 results.xml ✅ Found
run2 results.xml ✅ Found
run3 results.xml ✅ Found

@jmarrec jmarrec force-pushed the 5452-Cpp-ShowRunnerOutput branch from d0cea24 to 99f11c9 Compare August 12, 2025 15:54
@ci-commercialbuildings
Copy link
Collaborator

ci-commercialbuildings commented Aug 12, 2025

CI Results for 99f11c9:

Copy link
Collaborator

@joseph-robertson joseph-robertson left a comment

Choose a reason for hiding this comment

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

So the summary here is that we'll need to replace show_output(runner.result) with runner.result.showOutput if we want to avoid the deprecation warning? And, only minimal differences in output.

@jmarrec
Copy link
Collaborator Author

jmarrec commented Sep 11, 2025

So the summary here is that we'll need to replace show_output(runner.result) with runner.result.showOutput if we want to avoid the deprecation warning? And, only minimal differences in output.

Correct.

Is the deprecation warning a problem? I could understand that the deprecation warning would be annoying for someone in charge of maintaining a large collection of measures (I know you do), but the deprecation is so that we can actually remove it at that some point. Open to discussion on this.

@joseph-robertson
Copy link
Collaborator

So the summary here is that we'll need to replace show_output(runner.result) with runner.result.showOutput if we want to avoid the deprecation warning? And, only minimal differences in output.

Correct.

Is the deprecation warning a problem? I could understand that the deprecation warning would be annoying for someone in charge of maintaining a large collection of measures (I know you do), but the deprecation is so that we can actually remove it at that some point. Open to discussion on this.

Seems pretty reasonable to me.

@joseph-robertson joseph-robertson self-requested a review September 11, 2025 16:18
@jmarrec jmarrec merged commit 3878a1b into develop Oct 20, 2025
2 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component - Python bindings component - Ruby bindings Enhancement Request Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move ShowRunnerOutput's show_output function to C++ so both Ruby and Python can use it

4 participants