NREL / OpenStudio

OpenStudio is a cross-platform collection of software tools to support whole building energy modeling using EnergyPlus and advanced daylight analysis using Radiance.
https://www.openstudio.net/
Other
501 stars 191 forks source link

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

Closed jmarrec closed 10 months ago

jmarrec commented 11 months ago

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

Labels:

Review Checklist

This will not be exhaustively relevant to every PR.

ci-commercialbuildings commented 11 months ago

CI Results for 9d6c1940194df8b63441fe386b025323206b7097:

kbenne commented 11 months ago

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

shorowit commented 11 months ago

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

jmarrec commented 11 months ago

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