openstudio-extension 0.3.1 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +5 -0
  3. data/.rubocop.yml +2 -1
  4. data/CHANGELOG.md +38 -0
  5. data/Gemfile +4 -0
  6. data/LICENSE.md +1 -1
  7. data/Rakefile +4 -4
  8. data/doc_templates/LICENSE.md +1 -1
  9. data/doc_templates/copyright_erb.txt +1 -1
  10. data/doc_templates/copyright_js.txt +1 -1
  11. data/doc_templates/copyright_ruby.txt +1 -1
  12. data/init_templates/gemspec.txt +7 -5
  13. data/init_templates/openstudio_module.rb +1 -1
  14. data/init_templates/spec.rb +1 -1
  15. data/init_templates/spec_helper.rb +1 -1
  16. data/init_templates/template_gemfile.txt +1 -4
  17. data/init_templates/version.rb +1 -1
  18. data/lib/change_log.rb +2 -2
  19. data/lib/measures/openstudio_extension_test_measure/LICENSE.md +1 -1
  20. data/lib/measures/openstudio_extension_test_measure/measure.rb +1 -1
  21. data/lib/measures/openstudio_extension_test_measure/measure.xml +12 -12
  22. data/lib/measures/openstudio_extension_test_measure/resources/os_lib_helper_methods.rb +15 -2
  23. data/lib/openstudio-extension.rb +1 -1
  24. data/lib/openstudio/extension.rb +6 -10
  25. data/lib/openstudio/extension/core/CreateResults.rb +1 -1
  26. data/lib/openstudio/extension/core/check_air_sys_temps.rb +1 -1
  27. data/lib/openstudio/extension/core/check_calibration.rb +1 -1
  28. data/lib/openstudio/extension/core/check_cond_zns.rb +1 -1
  29. data/lib/openstudio/extension/core/check_domestic_hot_water.rb +1 -1
  30. data/lib/openstudio/extension/core/check_envelope_conductance.rb +1 -1
  31. data/lib/openstudio/extension/core/check_eui_by_end_use.rb +1 -1
  32. data/lib/openstudio/extension/core/check_eui_reasonableness.rb +1 -1
  33. data/lib/openstudio/extension/core/check_fan_pwr.rb +1 -1
  34. data/lib/openstudio/extension/core/check_internal_loads.rb +1 -1
  35. data/lib/openstudio/extension/core/check_mech_sys_capacity.rb +1 -1
  36. data/lib/openstudio/extension/core/check_mech_sys_efficiency.rb +1 -1
  37. data/lib/openstudio/extension/core/check_mech_sys_part_load_eff.rb +1 -1
  38. data/lib/openstudio/extension/core/check_mech_sys_type.rb +1 -1
  39. data/lib/openstudio/extension/core/check_part_loads.rb +1 -1
  40. data/lib/openstudio/extension/core/check_placeholder.rb +1 -1
  41. data/lib/openstudio/extension/core/check_plant_cap.rb +1 -1
  42. data/lib/openstudio/extension/core/check_plant_temps.rb +1 -1
  43. data/lib/openstudio/extension/core/check_plenum_loads.rb +1 -1
  44. data/lib/openstudio/extension/core/check_pump_pwr.rb +1 -1
  45. data/lib/openstudio/extension/core/check_sch_coord.rb +1 -1
  46. data/lib/openstudio/extension/core/check_schedules.rb +1 -1
  47. data/lib/openstudio/extension/core/check_simultaneous_heating_and_cooling.rb +1 -1
  48. data/lib/openstudio/extension/core/check_supply_air_and_thermostat_temp_difference.rb +1 -1
  49. data/lib/openstudio/extension/core/check_weather_files.rb +1 -1
  50. data/lib/openstudio/extension/core/deer_vintages.rb +1 -1
  51. data/lib/openstudio/extension/core/os_lib_aedg_measures.rb +5 -5
  52. data/lib/openstudio/extension/core/os_lib_constructions.rb +1 -1
  53. data/lib/openstudio/extension/core/os_lib_geometry.rb +1 -1
  54. data/lib/openstudio/extension/core/os_lib_helper_methods.rb +17 -3
  55. data/lib/openstudio/extension/core/os_lib_hvac.rb +1 -1
  56. data/lib/openstudio/extension/core/os_lib_lighting_and_equipment.rb +1 -1
  57. data/lib/openstudio/extension/core/os_lib_model_generation.rb +364 -207
  58. data/lib/openstudio/extension/core/os_lib_model_simplification.rb +1 -1
  59. data/lib/openstudio/extension/core/os_lib_outdoorair_and_infiltration.rb +1 -1
  60. data/lib/openstudio/extension/core/os_lib_reporting_qaqc.rb +1 -1
  61. data/lib/openstudio/extension/core/os_lib_schedules.rb +1 -1
  62. data/lib/openstudio/extension/rake_task.rb +17 -14
  63. data/lib/openstudio/extension/runner.rb +47 -35
  64. data/lib/openstudio/extension/runner_config.rb +1 -1
  65. data/lib/openstudio/extension/version.rb +2 -2
  66. data/openstudio-extension.gemspec +9 -8
  67. metadata +34 -19
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5236e369124bbe20e9e3ac29a5256aa253c952a9476834fcffd16abcdec7759a
4
- data.tar.gz: 50ca0367d6b629d120bb5a267ff41c639e25a7efbfd488e9da532b3bb7820dce
3
+ metadata.gz: 567f2008ed2e8d3fab092b962d34f0d2a59881d8617839ba8ed977dc2cfddc4b
4
+ data.tar.gz: d575f3db0ff84c9a2d8af9030976b6fad068903b63c9ab5daa6717cc5902a96d
5
5
  SHA512:
6
- metadata.gz: 918c839e7b3540c30c08bdba2f132f5ce7f048f24bd8b8f2143741a38107c503c23e5ffbe977dcda8c5515fff2c12ead86308f9b5b5bb007d6107644b141baa6
7
- data.tar.gz: 33bc58b51565be29ad26dc0590838ee2ffddb51a83756fe1184acbbb9398fb57c9836866784eca8beb03f9dbc6207b74c5a80c835624481f50045ce990754f5e
6
+ metadata.gz: 194ecd22b5cbc12c75133487c21b0df4dd1ad746d270819a2558d9c8c1831b8558faa9e6a581ca1f7890894be4e5059fb9e730c7e714b8f912cbebaa0689934e
7
+ data.tar.gz: b2193e267204d75bbdda44eaee353727eb20b75cb9923d649ddb5e740e97de5926b8b5f1e47e58c78b123bed7c33f1602dcc1b0ce4583c68006efdfe5392f2b0
data/.gitignore CHANGED
@@ -1,6 +1,7 @@
1
1
  /.bundle/
2
2
  /.yardoc
3
3
  /.ruby-version
4
+ /.python-version
4
5
  /Gemfile.lock
5
6
  /gems
6
7
  /_yardoc/
@@ -9,6 +10,7 @@
9
10
  /pkg/
10
11
  /spec/reports/
11
12
  /spec/test/
13
+ /spec/openstudio/core/output/*
12
14
  /tmp/
13
15
  /test/
14
16
  /lib/measures/test_results
@@ -29,3 +31,6 @@ lib/measures/test_results/*
29
31
 
30
32
  # runner conf
31
33
  runner.conf
34
+
35
+ # Sizing run made as part of spec that tests typical_building_from_model method
36
+ SR1
data/.rubocop.yml CHANGED
@@ -5,6 +5,7 @@ AllCops:
5
5
  - lib/measures/**/resources/*
6
6
  - lib/openstudio/extension/core/**/*
7
7
 
8
+ require: rubocop-performance
8
9
  inherit_from:
9
- - http://s3.amazonaws.com/openstudio-resources/styles/rubocop_v3.yml
10
+ - http://s3.amazonaws.com/openstudio-resources/styles/rubocop_v4.yml
10
11
 
data/CHANGELOG.md CHANGED
@@ -1,6 +1,39 @@
1
1
  # OpenStudio Extension Gem
2
2
 
3
+ ## Version 0.4.3
4
+
5
+ * Update measure tester gem which upgrades Rubocop to 1.15
6
+ * Update styles to v4 based on new version of Rubocop
7
+
8
+ ## Version 0.4.2
9
+
10
+ * Fixes [#113](https://github.com/NREL/openstudio-extension-gem/issues/113) Fix bad args behavior on bar_from_building_type_ratios
11
+ * Fixes [#103](https://github.com/NREL/openstudio-extension-gem/issues/103) make check_upstream_measure_for_arg more robust for non string arguments
12
+ * Updatd version of openstudio-standards for development to openstudio-standards 0.2.13
13
+ * Added ASHRAE 90.1 2016 and 2019 to get_doe_templates method in os_lib_model_generation.rb file. This method is used by a number of measures to generate allowable argument values
14
+
15
+ ## Version 0.4.1
16
+
17
+ * Fixed [#95]( https://github.com/NREL/openstudio-extension-gem/issues/95 ), Extend exceptions on standards error messages for curves used on multiple objects
18
+ * Fixed [#113]( https://github.com/NREL/openstudio-extension-gem/issues/113 ), Fix bad args behavior on bar_from_building_type_ratios
19
+ * Fixed [#111]( https://github.com/NREL/openstudio-extension-gem/pull/111 ), night cycling change - for 0.4.x
20
+ * Updated version of openstudio-standards for development to openstudio-standards 0.2.13.rc3
21
+
22
+ ## Version 0.4.0
23
+
24
+ * Fix merging of options on initialization. Options hash will overwrite the default config AND the runner.conf files.
25
+ * Includes patch of 0.2.6 (failed.job and finished.job)
26
+ * Support Ruby 2.7.0, Bundler > 2.2
27
+ * Update copyrights
28
+
29
+ ## Version 0.3.2
30
+
31
+ * Update Extension Gem Template
32
+ * Add gemfile path instead of just dirname to the initialization
33
+ * Update to latest workflow gem to support URBANopt Workflow
34
+
3
35
  ## Version 0.3.1
36
+
4
37
  * This change first zeroes-out latent (for good measure) and radiant fractions before setting lost fraction to 1.0 to avoid this error.
5
38
 
6
39
  ## Version 0.3.0
@@ -9,6 +42,11 @@
9
42
  * Upgrade dependency to openstudio-workflow gem to `~> 2.1.0`
10
43
  * This version works only with EnergyPlus 9.4 since it depends on OpenStudio workflow `~> 2.1.0`
11
44
 
45
+ ## Version 0.2.6
46
+
47
+ - Check that `failed.job` doesn't exist and `finished.job` does exist.
48
+ - Fixed [#98](https://github.com/NREL/openstudio-extension-gem/issues/98)
49
+
12
50
  ## Version 0.2.5
13
51
 
14
52
  * Support runner options for bundle_install_path and gemfile_path
data/Gemfile CHANGED
@@ -1,4 +1,8 @@
1
1
  source 'http://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in openstudio-extension.gemspec
4
+
5
+ # line below used for testing when need to test against branch instead of release of standards. Should be commented out prior to merge to develop
6
+ # gem 'openstudio-standards', github: 'NREL/openstudio-standards', branch: 'fix/901_2016_2019_properties' # for os_lib unit tests
7
+
4
8
  gemspec
data/LICENSE.md CHANGED
@@ -1,4 +1,4 @@
1
- OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC. All rights reserved.
1
+ OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. All rights reserved.
2
2
 
3
3
  Redistribution and use in source and binary forms, with or without modification, are permitted
4
4
  provided that the following conditions are met:
data/Rakefile CHANGED
@@ -1,5 +1,5 @@
1
1
  ########################################################################################################################
2
- # openstudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC. All rights reserved.
2
+ # openstudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. All rights reserved.
3
3
  #
4
4
  # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
5
5
  # following conditions are met:
@@ -45,10 +45,10 @@ desc 'Initialize a new gem'
45
45
  task :init_new_gem do
46
46
  puts 'Initializing a new extension gem'
47
47
  print "\n Enter the name of the new gem directory (ex: openstudio-something-gem. Should end with '-gem'): "
48
- gem_name = STDIN.gets.chomp
48
+ gem_name = $stdin.gets.chomp
49
49
 
50
50
  print "\n Enter the path (full or relative to this repo) where you want the new gem directory to be created: "
51
- dir_path = STDIN.gets.chomp
51
+ dir_path = $stdin.gets.chomp
52
52
 
53
53
  # check if directory already exists at path, if so error
54
54
  full_dir_name = dir_path + gem_name
@@ -61,7 +61,7 @@ task :init_new_gem do
61
61
  end
62
62
 
63
63
  # copy file structure
64
- FileUtils.cp('.gitignore', full_dir_name + '/.gitignore')
64
+ FileUtils.cp('.gitignore', "#{full_dir_name}/.gitignore")
65
65
  FileUtils.cp_r(File.join(File.dirname(__FILE__), 'init_templates/template_gemfile.txt'), File.join(full_dir_name, 'Gemfile'))
66
66
  FileUtils.cp_r(File.join(File.dirname(__FILE__), 'doc_templates'), full_dir_name)
67
67
 
@@ -1,4 +1,4 @@
1
- OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC. All rights reserved.
1
+ OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. All rights reserved.
2
2
 
3
3
  Redistribution and use in source and binary forms, with or without modification, are permitted
4
4
  provided that the following conditions are met:
@@ -1,6 +1,6 @@
1
1
  <%
2
2
  # *******************************************************************************
3
- # OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
3
+ # OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC.
4
4
  # All rights reserved.
5
5
  # Redistribution and use in source and binary forms, with or without
6
6
  # modification, are permitted provided that the following conditions are met:
@@ -1,4 +1,4 @@
1
1
  /* @preserve
2
- * OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC. All rights reserved.
2
+ * OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. All rights reserved.
3
3
  * Use of this source code is governed by a BSD-style license that can be found at openstudio.net/license.
4
4
  */
@@ -1,5 +1,5 @@
1
1
  # *******************************************************************************
2
- # OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
2
+ # OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC.
3
3
  # All rights reserved.
4
4
  # Redistribution and use in source and binary forms, with or without
5
5
  # modification, are permitted provided that the following conditions are met:
@@ -22,11 +22,13 @@ Gem::Specification.new do |spec|
22
22
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
23
  spec.require_paths = ['lib']
24
24
 
25
- spec.add_development_dependency 'bundler', '~> 1.14'
26
- spec.add_development_dependency 'rake', '12.3.1'
27
- spec.add_development_dependency 'rspec', '3.7.0'
25
+ spec.required_ruby_version = '~> 2.5.0'
26
+
27
+ spec.add_development_dependency 'bundler', '~> 2.1'
28
+ spec.add_development_dependency 'rake', '~> 13.0'
29
+ spec.add_development_dependency 'rspec', '~> 3.9'
28
30
  spec.add_development_dependency 'rubocop', '~> 0.54.0'
29
31
 
30
- spec.add_dependency 'openstudio-extension', '~> 0.1.0'
31
- spec.add_dependency 'openstudio-standards', '~> 0.2.7'
32
+ spec.add_dependency 'openstudio-extension', '~> 0.3.1'
33
+ spec.add_dependency 'openstudio-standards', '~> 0.2.12'
32
34
  end
@@ -1,5 +1,5 @@
1
1
  # *******************************************************************************
2
- # OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
2
+ # OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC.
3
3
  # All rights reserved.
4
4
  # Redistribution and use in source and binary forms, with or without
5
5
  # modification, are permitted provided that the following conditions are met:
@@ -1,5 +1,5 @@
1
1
  # *******************************************************************************
2
- # OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
2
+ # OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC.
3
3
  # All rights reserved.
4
4
  # Redistribution and use in source and binary forms, with or without
5
5
  # modification, are permitted provided that the following conditions are met:
@@ -1,5 +1,5 @@
1
1
  # *******************************************************************************
2
- # OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
2
+ # OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC.
3
3
  # All rights reserved.
4
4
  # Redistribution and use in source and binary forms, with or without
5
5
  # modification, are permitted provided that the following conditions are met:
@@ -16,7 +16,4 @@ elsif allow_local
16
16
  gem 'openstudio-extension', github: 'NREL/OpenStudio-extension-gem', branch: 'develop'
17
17
  end
18
18
 
19
- gem 'openstudio_measure_tester', '= 0.1.7' # This includes the dependencies for running unit tests, coverage, and rubocop
20
-
21
- # simplecov has an unnecessary dependency on native json gem, use fork that does not require this
22
- gem 'simplecov', github: 'NREL/simplecov'
19
+ gem 'openstudio_measure_tester', '~> 0.2.3' # This includes the dependencies for running unit tests, coverage, and rubocop
@@ -1,5 +1,5 @@
1
1
  # *******************************************************************************
2
- # OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
2
+ # OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC.
3
3
  # All rights reserved.
4
4
  # Redistribution and use in source and binary forms, with or without
5
5
  # modification, are permitted provided that the following conditions are met:
data/lib/change_log.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # *******************************************************************************
2
- # OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
2
+ # OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC.
3
3
  # All rights reserved.
4
4
  # Redistribution and use in source and binary forms, with or without
5
5
  # modification, are permitted provided that the following conditions are met:
@@ -144,7 +144,7 @@ class ChangeLog
144
144
  puts "Total Open Issues: #{@total_open_issues.length}"
145
145
  puts "Total Open Pull Requests: #{@total_open_pull_requests.length}"
146
146
  puts "\nDate Range: #{@start_date.strftime('%m/%d/%y')} - #{@end_date.strftime('%m/%d/%y')}:"
147
- puts "\nNew Issues: #{@new_issues.length} (" + @new_issues.map(&:number).join(', ') + ')'
147
+ puts "\nNew Issues: #{@new_issues.length} (#{@new_issues.map(&:number).join(', ')})"
148
148
 
149
149
  puts "\nClosed Issues: #{@closed_issues.length}"
150
150
  @closed_issues.each { |issue| puts print_issue(issue) }
@@ -1,4 +1,4 @@
1
- OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC. All rights reserved.
1
+ OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. All rights reserved.
2
2
 
3
3
  Redistribution and use in source and binary forms, with or without modification, are permitted
4
4
  provided that the following conditions are met:
@@ -1,5 +1,5 @@
1
1
  # *******************************************************************************
2
- # OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
2
+ # OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC.
3
3
  # All rights reserved.
4
4
  # Redistribution and use in source and binary forms, with or without
5
5
  # modification, are permitted provided that the following conditions are met:
@@ -3,8 +3,8 @@
3
3
  <schema_version>3.0</schema_version>
4
4
  <name>openstudio_extension_test_measure</name>
5
5
  <uid>36b99a29-41e1-4d85-9272-85d43b966e5a</uid>
6
- <version_id>edf7f103-9f51-4944-a5af-1d8fa2b0c9b7</version_id>
7
- <version_modified>20200427T230714Z</version_modified>
6
+ <version_id>da192150-29b5-4c56-b5d5-9a2e1d2f154a</version_id>
7
+ <version_modified>20210215T205438Z</version_modified>
8
8
  <xml_checksum>49BEF039</xml_checksum>
9
9
  <class_name>OpenStudioExtensionTestMeasure</class_name>
10
10
  <display_name>OpenStudio Extension Test Measure</display_name>
@@ -45,17 +45,23 @@
45
45
  <usage_type>readmeerb</usage_type>
46
46
  <checksum>703C9964</checksum>
47
47
  </file>
48
+ <file>
49
+ <filename>README.md</filename>
50
+ <filetype>md</filetype>
51
+ <usage_type>readme</usage_type>
52
+ <checksum>7258830F</checksum>
53
+ </file>
48
54
  <file>
49
55
  <filename>LICENSE.md</filename>
50
56
  <filetype>md</filetype>
51
57
  <usage_type>license</usage_type>
52
- <checksum>E0468DD6</checksum>
58
+ <checksum>A21A3ED2</checksum>
53
59
  </file>
54
60
  <file>
55
61
  <filename>OpenStudioExtensionTestMeasure_Test.rb</filename>
56
62
  <filetype>rb</filetype>
57
63
  <usage_type>test</usage_type>
58
- <checksum>66A00EA8</checksum>
64
+ <checksum>5F2C8B43</checksum>
59
65
  </file>
60
66
  <file>
61
67
  <version>
@@ -66,19 +72,13 @@
66
72
  <filename>measure.rb</filename>
67
73
  <filetype>rb</filetype>
68
74
  <usage_type>script</usage_type>
69
- <checksum>51BB85EF</checksum>
75
+ <checksum>D6EA3941</checksum>
70
76
  </file>
71
77
  <file>
72
78
  <filename>os_lib_helper_methods.rb</filename>
73
79
  <filetype>rb</filetype>
74
80
  <usage_type>resource</usage_type>
75
- <checksum>07B01D67</checksum>
76
- </file>
77
- <file>
78
- <filename>README.md</filename>
79
- <filetype>md</filetype>
80
- <usage_type>readme</usage_type>
81
- <checksum>7258830F</checksum>
81
+ <checksum>B535B169</checksum>
82
82
  </file>
83
83
  </files>
84
84
  </measure>
@@ -1,5 +1,5 @@
1
1
  # *******************************************************************************
2
- # OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
2
+ # OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC.
3
3
  # All rights reserved.
4
4
  # Redistribution and use in source and binary forms, with or without
5
5
  # modification, are permitted provided that the following conditions are met:
@@ -265,7 +265,20 @@ module OsLib_HelperMethods
265
265
  result = measure_step.result.get
266
266
  result.stepValues.each do |arg|
267
267
  name = arg.name
268
- value = arg.valueAsVariant.to_s
268
+ # check if value, double, int, or bool
269
+ value_type = arg.variantType.valueDescription
270
+ if value_type == "Double"
271
+ value = arg.valueAsDouble
272
+ elsif value_type == "Integer"
273
+ value = arg.valueAsInteger
274
+ elsif value_type == "Boolean"
275
+ value = arg.valueAsBoolean
276
+ elsif value_type == "String"
277
+ value = arg.valueAsString
278
+ else
279
+ # catchall for unexpected value types
280
+ value = arg.valueAsVariant.to_s
281
+ end
269
282
  if name == arg_name
270
283
  arg_name_value[:value] = value
271
284
  arg_name_value[:measure_name] = measure_name
@@ -1,5 +1,5 @@
1
1
  # *******************************************************************************
2
- # OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
2
+ # OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC.
3
3
  # All rights reserved.
4
4
  # Redistribution and use in source and binary forms, with or without
5
5
  # modification, are permitted provided that the following conditions are met:
@@ -1,5 +1,5 @@
1
1
  # *******************************************************************************
2
- # OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
2
+ # OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC.
3
3
  # All rights reserved.
4
4
  # Redistribution and use in source and binary forms, with or without
5
5
  # modification, are permitted provided that the following conditions are met:
@@ -209,11 +209,9 @@ module OpenStudio
209
209
  def self.set_measure_argument(osw, measure_dir_name, argument_name, argument_value, step_name = nil)
210
210
  result = false
211
211
  osw[:steps].each do |step|
212
- if step[:measure_dir_name] == measure_dir_name
213
- if step_name.nil? || step[:name] == step_name
214
- step[:arguments][argument_name.to_sym] = argument_value
215
- result = true
216
- end
212
+ if step[:measure_dir_name] == measure_dir_name && (step_name.nil? || step[:name] == step_name)
213
+ step[:arguments][argument_name.to_sym] = argument_value
214
+ result = true
217
215
  end
218
216
  end
219
217
 
@@ -239,10 +237,8 @@ module OpenStudio
239
237
  def self.measure_in_osw(osw, measure_dir_name, step_name = nil)
240
238
  result = false
241
239
  osw[:steps].each do |step|
242
- if step[:measure_dir_name] == measure_dir_name
243
- if step_name.nil? || step[:name] == step_name
244
- result = true
245
- end
240
+ if step[:measure_dir_name] == measure_dir_name && (step_name.nil? || step[:name] == step_name)
241
+ result = true
246
242
  end
247
243
  end
248
244
 
@@ -1,5 +1,5 @@
1
1
  # *******************************************************************************
2
- # OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
2
+ # OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC.
3
3
  # All rights reserved.
4
4
  # Redistribution and use in source and binary forms, with or without
5
5
  # modification, are permitted provided that the following conditions are met:
@@ -1,5 +1,5 @@
1
1
  # *******************************************************************************
2
- # OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
2
+ # OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC.
3
3
  # All rights reserved.
4
4
  # Redistribution and use in source and binary forms, with or without
5
5
  # modification, are permitted provided that the following conditions are met:
@@ -1,5 +1,5 @@
1
1
  # *******************************************************************************
2
- # OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
2
+ # OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC.
3
3
  # All rights reserved.
4
4
  # Redistribution and use in source and binary forms, with or without
5
5
  # modification, are permitted provided that the following conditions are met:
@@ -1,5 +1,5 @@
1
1
  # *******************************************************************************
2
- # OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
2
+ # OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC.
3
3
  # All rights reserved.
4
4
  # Redistribution and use in source and binary forms, with or without
5
5
  # modification, are permitted provided that the following conditions are met:
@@ -1,5 +1,5 @@
1
1
  # *******************************************************************************
2
- # OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
2
+ # OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC.
3
3
  # All rights reserved.
4
4
  # Redistribution and use in source and binary forms, with or without
5
5
  # modification, are permitted provided that the following conditions are met:
@@ -1,5 +1,5 @@
1
1
  # *******************************************************************************
2
- # OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
2
+ # OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC.
3
3
  # All rights reserved.
4
4
  # Redistribution and use in source and binary forms, with or without
5
5
  # modification, are permitted provided that the following conditions are met: