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

Fix #5045 - Fix typo in OSArgument::toJSON + improve reporting when README ERB generation fails #5046

Merged
merged 4 commits into from
Dec 11, 2023

Conversation

jmarrec
Copy link
Collaborator

@jmarrec jmarrec commented Nov 17, 2023

Pull request overview

After this PR, in case the README.md.erb fails to ERB render

Failed to Render ERB file: NoMethodError: undefined method `join' for nil:NilClass
Traceback:
(erb):25:in `block in get_binding'
(erb):13:in `each'
(erb):13:in `get_binding'
:/ruby/2.7.0/erb.rb:905:in `eval'
:/ruby/2.7.0/erb.rb:905:in `result'
eval:210:in `renderFile'
Failed to generate the README.md via ERB

I also added a warning in case the ReportingMeasure arguments takes no argument

Reporting Measure at '<path/to/measure.rb>' is using the old format where the 'arguments' method does not take model.  Please consider updating this to `def arguments(model)`.

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

…fails

SWIG director method error. NameError: undefined local variable or method `e' for #<OpenStudio::Measure::RubyMeasureInfoBinding:0x00007fffdd27ccb8>
@jmarrec jmarrec added component - Measure Manager Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge. labs labels Nov 17, 2023
@jmarrec jmarrec changed the title 5045 measure update Fix #5045 - Fix typo in OSArgument::toJSON + improve reporting when README ERB generation fails Nov 17, 2023
@kbenne
Copy link
Contributor

kbenne commented Nov 17, 2023

@shorowit is it ok if this comes in after release?

@shorowit
Copy link
Contributor

We can continue to use the classic version to update measures if need be.

@jmarrec
Copy link
Collaborator Author

jmarrec commented Nov 17, 2023

It works on the reporting utility bills measure with this fix
I just added reporting in case it doesn't.

@jmarrec jmarrec merged commit 8772707 into develop Dec 11, 2023
5 of 6 checks passed
@jmarrec jmarrec deleted the 5045-measure-update branch December 11, 2023 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component - Measure Manager labs 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.

C++ CLI: unable to update ReportingMeasure with 3.7.0-rc3
4 participants