NREL / openstudio-model-articulation-gem

Other
7 stars 10 forks source link

040 upgrade #61

Closed DavidGoldwasser closed 3 years ago

DavidGoldwasser commented 3 years ago

Upgrade newer 0.4.0 ext gem and Ruby 2.7

DavidGoldwasser commented 3 years ago

3 measures are failing

2 of the three commonly used create_bar measures. The DEER one is probably just not failing do to limited testing. The Unit tests for this method pass in th ext gem spec. Tests that are failing are test_bad_fraction, test_bad_non_neg, test_bad_non_neg. More details are below.

Failure: test_bad_fraction(Minitest::Result) [/srv/jenkins/git/openstudio-model-articulation-gem/PR-61/1/.bundle/install/ruby/2.7.0/gems/openstudio-extension-0.4.0/lib/openstudio/extension/core/os_lib_model_generation.rb:1733]: NoMethodError: undefined method[]' for false:FalseClass /srv/jenkins/git/openstudio-model-articulation-gem/PR-61/1/.bundle/install/ruby/2.7.0/gems/openstudio-extension-0.4.0/lib/openstudio/extension/core/os_lib_model_generation.rb:1733:in bar_from_building_type_ratios' /srv/jenkins/git/openstudio-model-articulation-gem/PR-61/1/lib/measures/create_bar_from_building_type_ratios/measure.rb:373:inrun' /srv/jenkins/git/openstudio-model-articulation-gem/PR-61/1/lib/measures/create_bar_from_building_type_ratios/tests/create_bar_from_building_type_ratios_test.rb:77:in apply_measure_to_model' /srv/jenkins/git/openstudio-model-articulation-gem/PR-61/1/lib/measures/create_bar_from_building_type_ratios/tests/create_bar_from_building_type_ratios_test.rb:131:intest_bad_fraction' `

RadiantSlabWithDoas is failing with error for NoMethodError: undefined methodto_CoilCoolingLowTempRadiantVarFlow' for #`. More detail is below.

Failure: test_multi_zone_office_3C_ceiling(Minitest::Result) [/srv/jenkins/git/openstudio-model-articulation-gem/PR-61/1/.bundle/install/ruby/2.7.0/gems/openstudio-standards-0.2.12/lib/openstudio-standards/prototypes/common/objects/Prototype.radiant_system_controls.rb:28]: NoMethodError: undefined methodto_CoilCoolingLowTempRadiantVarFlow' for # /srv/jenkins/git/openstudio-model-articulation-gem/PR-61/1/.bundle/install/ruby/2.7.0/gems/openstudio-standards-0.2.12/lib/openstudio-standards/prototypes/common/objects/Prototype.radiant_system_controls.rb:28:in model_add_radiant_proportional_controls' /srv/jenkins/git/openstudio-model-articulation-gem/PR-61/1/.bundle/install/ruby/2.7.0/gems/openstudio-standards-0.2.12/lib/openstudio-standards/prototypes/common/objects/Prototype.hvac_systems.rb:4719:inblock in model_add_low_temp_radiant' /srv/jenkins/git/openstudio-model-articulation-gem/PR-61/1/.bundle/install/ruby/2.7.0/gems/openstudio-standards-0.2.12/lib/openstudio-standards/prototypes/common/objects/Prototype.hvac_systems.rb:4638:in each' /srv/jenkins/git/openstudio-model-articulation-gem/PR-61/1/.bundle/install/ruby/2.7.0/gems/openstudio-standards-0.2.12/lib/openstudio-standards/prototypes/common/objects/Prototype.hvac_systems.rb:4638:inmodel_add_low_temp_radiant' /srv/jenkins/git/openstudio-model-articulation-gem/PR-61/1/lib/measures/radiant_slab_with_doas/measure.rb:312:in run' /srv/jenkins/git/openstudio-model-articulation-gem/PR-61/1/lib/measures/radiant_slab_with_doas/tests/radiant_slab_with_doas_test.rb:109:inapply_measure_and_run' /srv/jenkins/git/openstudio-model-articulation-gem/PR-61/1/lib/measures/radiant_slab_with_doas/tests/radiant_slab_with_doas_test.rb:296:in test_multi_zone_office_3C_ceiling'

DavidGoldwasser commented 3 years ago

@mdahlhausen I'll look at the first one which is related to ext gem. Do you want to look at the second one (RadiantSlabWithDoas) which is related to standards gem. Not sure if the measure needs to be updated or change in standards gem.

mdahlhausen commented 3 years ago

looks like and SDK change going from HVACComponent to OptionalHVACComponent.

mdahlhausen commented 3 years ago

yep: https://github.com/NREL/OpenStudio/commit/0e6252d9a3f17c2c40400b15c1c276c247e899ee And... I was the one who initially asked for this apparently. https://github.com/NREL/OpenStudio/issues/3532

I added a version check for this in the next version of openstudio-standards: https://github.com/NREL/openstudio-standards/pull/1031

DavidGoldwasser commented 3 years ago

I just made a PR to extension gem that should fix the failure with invalid user argument. I added a test in extension gem for this. It broke when I refactored create bar methods and put double arg checks in dedicated method, and forgot to pass the return false back up to parent method. https://github.com/NREL/openstudio-extension-gem/pull/114

DavidGoldwasser commented 3 years ago

@mdahlhausen I updated this PR to use master branch of standards, I see it is picking up your code and but because our version is still 3.1.1. and not 3.2 for now its going on the wrong side of the if statement. @tijcolem will next OS installer be a pre 3.2 or will it still be 3.1.1.

For reference it is failing on line 30 now. This is impacting PR on a least one other measure repo preventing upgrade to Ruby 2.7 https://github.com/NREL/openstudio-standards/commit/585adf71d284522684f25df289e6c88e9d74f61e

DavidGoldwasser commented 3 years ago

@mdahlhausen thanks for the update to standards, CI passed.