openstudio-extension 0.7.1 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/CHANGELOG.md +14 -0
  4. data/LICENSE.md +1 -1
  5. data/README.md +2 -0
  6. data/lib/openstudio/extension/runner.rb +12 -8
  7. data/lib/openstudio/extension/runner_config.rb +33 -6
  8. data/lib/openstudio/extension/version.rb +1 -1
  9. data/openstudio-extension.gemspec +6 -6
  10. metadata +15 -66
  11. data/lib/openstudio/extension/core/CreateResults.rb +0 -1033
  12. data/lib/openstudio/extension/core/check_air_sys_temps.rb +0 -160
  13. data/lib/openstudio/extension/core/check_calibration.rb +0 -125
  14. data/lib/openstudio/extension/core/check_cond_zns.rb +0 -54
  15. data/lib/openstudio/extension/core/check_domestic_hot_water.rb +0 -304
  16. data/lib/openstudio/extension/core/check_envelope_conductance.rb +0 -423
  17. data/lib/openstudio/extension/core/check_eui_by_end_use.rb +0 -132
  18. data/lib/openstudio/extension/core/check_eui_reasonableness.rb +0 -105
  19. data/lib/openstudio/extension/core/check_fan_pwr.rb +0 -68
  20. data/lib/openstudio/extension/core/check_internal_loads.rb +0 -363
  21. data/lib/openstudio/extension/core/check_mech_sys_capacity.rb +0 -196
  22. data/lib/openstudio/extension/core/check_mech_sys_efficiency.rb +0 -296
  23. data/lib/openstudio/extension/core/check_mech_sys_part_load_eff.rb +0 -434
  24. data/lib/openstudio/extension/core/check_mech_sys_type.rb +0 -109
  25. data/lib/openstudio/extension/core/check_part_loads.rb +0 -421
  26. data/lib/openstudio/extension/core/check_placeholder.rb +0 -45
  27. data/lib/openstudio/extension/core/check_plant_cap.rb +0 -93
  28. data/lib/openstudio/extension/core/check_plant_temps.rb +0 -129
  29. data/lib/openstudio/extension/core/check_plenum_loads.rb +0 -57
  30. data/lib/openstudio/extension/core/check_pump_pwr.rb +0 -78
  31. data/lib/openstudio/extension/core/check_sch_coord.rb +0 -211
  32. data/lib/openstudio/extension/core/check_schedules.rb +0 -281
  33. data/lib/openstudio/extension/core/check_simultaneous_heating_and_cooling.rb +0 -128
  34. data/lib/openstudio/extension/core/check_supply_air_and_thermostat_temp_difference.rb +0 -118
  35. data/lib/openstudio/extension/core/check_weather_files.rb +0 -102
  36. data/lib/openstudio/extension/core/deer_vintages.rb +0 -281
  37. data/lib/openstudio/extension/core/os_lib_aedg_measures.rb +0 -461
  38. data/lib/openstudio/extension/core/os_lib_constructions.rb +0 -353
  39. data/lib/openstudio/extension/core/os_lib_geometry.rb +0 -1169
  40. data/lib/openstudio/extension/core/os_lib_helper_methods.rb +0 -383
  41. data/lib/openstudio/extension/core/os_lib_hvac.rb +0 -2163
  42. data/lib/openstudio/extension/core/os_lib_lighting_and_equipment.rb +0 -184
  43. data/lib/openstudio/extension/core/os_lib_model_generation.rb +0 -3584
  44. data/lib/openstudio/extension/core/os_lib_model_simplification.rb +0 -1019
  45. data/lib/openstudio/extension/core/os_lib_outdoorair_and_infiltration.rb +0 -135
  46. data/lib/openstudio/extension/core/os_lib_reporting_qaqc.rb +0 -170
  47. data/lib/openstudio/extension/core/os_lib_schedules.rb +0 -933
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7799f7b07c49bb32488b59d3c14e278cf129172966c96d331b69337581a48475
4
- data.tar.gz: e0fbb5d1fc28ae39ebf76c009370c5e12cd734a86475e9599ee75bf826d3c921
3
+ metadata.gz: e81b50d9c1c29c4a7392098dcae7fcb6fe59a7d6c3dd28d780b71a28d1eb474a
4
+ data.tar.gz: 82ac54e3325692eb0ed125826b39b451f786998554d9bf6e9cf853090bca3072
5
5
  SHA512:
6
- metadata.gz: bb80543411b40e8d5a2c322b54c2ae7fc8532eb90fa37c0b2c11373c2ecd5a5f0d72f0ea32feba37647b78ad26e80c06eab5c987d5286f3662927a9143c728fe
7
- data.tar.gz: 47dd8aa0c31826c597de490133f2cb4f3dac33b2da874128fda8cd1c203786cc5b3e9627a83bb38179df55ab65d6b37e945e934f3abeec370406a2875baa7461
6
+ metadata.gz: 07fada7583c8ccd1b07c34594ed868d1b6f1ac3cce820e750a9b22a8d8e4fad238c518715db42a69544cc64cb123206828bdb02ad3bd88e490c8c0f0e084228c
7
+ data.tar.gz: c6a0c2038641f6cfb43feeacf976f76d3a31a52c3698f3b72f984bc581a940e4aa17639de6ed6b9617f1e8c99960942b432cf68b0da09157ec846381b0ed872d
data/.gitignore CHANGED
@@ -32,6 +32,7 @@ lib/measures/test_results/*
32
32
 
33
33
  # runner conf
34
34
  runner.conf
35
+ runner.conf.bak
35
36
 
36
37
  # Sizing run made as part of spec that tests typical_building_from_model method
37
38
  SR1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # OpenStudio(R) Extension Gem
2
2
 
3
+ ## Version 0.8.0
4
+
5
+ * [#184]( https://github.com/NREL/openstudio-extension-gem/pull/184 ), Removing model methods and model method spec tests. Most model methods moved to openstudio-standards-gem, others moved to OpenStudio C++.
6
+
7
+ * Update dependencies to support Ruby 3.2.2 / OpenStudio 3.8.0
8
+
9
+ ## Version 0.7.1
10
+
11
+ * Fixed [#169]( https://github.com/NREL/openstudio-extension-gem/pull/169 ), Replace --verbose flag to --loglevel inorder to run CI.
12
+ * Fixed [#171]( https://github.com/NREL/openstudio-extension-gem/pull/171 ), Remove bundle flag
13
+ * Fixed [#172]( https://github.com/NREL/openstudio-extension-gem/pull/172 ), useless commit, to trigger the CI
14
+ * Fixed [#173]( https://github.com/NREL/openstudio-extension-gem/pull/173 ), Remove bundle flag to run in ci with new commit.
15
+ * Fixed [#174]( https://github.com/NREL/openstudio-extension-gem/pull/174 ), Bump os-standards to 0.5.0
16
+
3
17
  ## Version 0.7.0
4
18
 
5
19
  * Fixed [#156]( https://github.com/NREL/openstudio-extension-gem/pull/156 ), Adding test for lab building type
data/LICENSE.md CHANGED
@@ -1,4 +1,4 @@
1
- OpenStudio(R), Copyright (c) 2008, 2023 Alliance for Sustainable Energy, LLC.
1
+ OpenStudio(R), Copyright (c) 2008, 2024 Alliance for Sustainable Energy, LLC.
2
2
 
3
3
  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4
4
 
data/README.md CHANGED
@@ -85,6 +85,8 @@ export RUBYLIB=/Applications/OpenStudio-3.1.0/Ruby
85
85
 
86
86
  |OpenStudio Extension Gem|OpenStudio|Ruby|
87
87
  |:--------------:|:----------:|:--------:|
88
+ | 0.8.0 | 3.8 | 3.2 |
89
+ | 0.7.1 | 3.7 | 2.7 |
88
90
  | 0.7.0 | 3.7 | 2.7 |
89
91
  | 0.6.0 | 3.5 | 2.7 |
90
92
  | 0.6.0 | 3.5 | 2.7 |
@@ -41,13 +41,14 @@ module OpenStudio
41
41
 
42
42
  # if the dirname contains a runner.conf file, then use the config file to specify the parameters
43
43
 
44
- @options = OpenStudio::Extension::RunnerConfig.default_config
44
+ @options = OpenStudio::Extension::RunnerConfig.default_config(dirname)
45
45
  # ORDER of PRECEDENCE: default config < runner.conf file < options passed in directly
46
46
  if File.exist?(File.join(dirname, OpenStudio::Extension::RunnerConfig::FILENAME))
47
47
  puts 'Using runner options from runner.conf file'
48
48
  runner_config = OpenStudio::Extension::RunnerConfig.new(dirname)
49
- # use the default values overriden with runner.conf values
50
- @options = @options.merge(runner_config.options)
49
+ # use the default values overriden with runner.conf values where not
50
+ # nil nor empty strings
51
+ @options = @options.merge(runner_config.options.reject{|k, v| v.nil? || (v.kind_of?(String) && v === '')})
51
52
  end
52
53
 
53
54
  if !options.empty?
@@ -99,12 +100,12 @@ module OpenStudio
99
100
 
100
101
  # check existing config
101
102
  needs_config = true
102
- if File.exist?('./.bundle/config') # checking wrt gemfile_dir
103
- puts 'config exists'
103
+ if conf_bpath = Bundler.configured_bundle_path.explicit_path
104
+ puts 'bundler config exists'
104
105
  needs_config = false
105
- config = YAML.load_file('./.bundle/config')
106
106
 
107
- if config['BUNDLE_PATH'] != @bundle_install_path
107
+ if conf_bpath != @bundle_install_path
108
+ raise "Detected mistmatch between bundle's configured path #{conf_bpath} and runner configuration #{@bundle_install_path}"
108
109
  needs_config = true
109
110
  end
110
111
 
@@ -540,12 +541,15 @@ module OpenStudio
540
541
  { glob: "#{root_dir}/**/*.html.erb", license: erb_header_text, regex: erb_regex },
541
542
  { glob: "#{root_dir}/**/*.js.erb", license: js_header_text, regex: js_regex }
542
543
  ]
544
+ # This is the bundle deployment folder
545
+ excluded_subfolders = ['vendor'].map{|d| "#{root_dir}/vendor/bundle"}
546
+
543
547
 
544
548
  puts "Encoding.default_external = #{Encoding.default_external}"
545
549
  puts "Encoding.default_internal = #{Encoding.default_internal}"
546
550
 
547
551
  paths.each do |path|
548
- Dir[path[:glob]].each do |dir_file|
552
+ Dir[path[:glob]].reject{|f| excluded_subfolders.any?{|d| f[d]} }.each do |dir_file|
549
553
  puts "Updating license in file #{dir_file}"
550
554
  f = File.read(dir_file)
551
555
  if f.match?(path[:regex])
@@ -3,13 +3,18 @@
3
3
  # See also https://openstudio.net/license
4
4
  # *******************************************************************************
5
5
 
6
+ require 'bundler'
7
+ require 'fileutils'
6
8
  require 'json'
9
+ require 'parallel'
7
10
 
8
11
  module OpenStudio
9
12
  module Extension
10
13
  class RunnerConfig
11
14
  FILENAME = 'runner.conf'.freeze
12
15
 
16
+ DEFAULT_NPROC = Parallel.processor_count - 1
17
+
13
18
  ##
14
19
  # Class to store configuration of the runner options.
15
20
  ##
@@ -40,17 +45,31 @@ module OpenStudio
40
45
  @data[name.to_sym] = value
41
46
  end
42
47
 
48
+ def self.get_local_bundle_config_path(dirname)
49
+ # Bundler.settings reads from pwd, and I can't test with this...
50
+ bundler_settings = Bundler::Settings.new(File.join(dirname, '.bundle'))
51
+
52
+ if (bundle_install_path = bundler_settings.path.explicit_path)
53
+ puts "Defaulting bundle_install_path to bundle's local config value: '#{bundle_install_path}'"
54
+ else
55
+ puts "Defaulting to .bundle/install (and ignoring system wide: Bundler.configured_bundle_path.base_path=#{bundler_settings.path.base_path})"
56
+ bundle_install_path = File.join(dirname, '.bundle/install/')
57
+ end
58
+
59
+ return bundle_install_path
60
+ end
61
+
43
62
  ##
44
63
  # Return the default runner configuration
45
- def self.default_config
64
+ def self.default_config(dirname)
46
65
  return {
47
66
  file_version: '0.1.0',
48
67
  max_datapoints: 1E9.to_i,
49
- num_parallel: 2,
68
+ num_parallel: DEFAULT_NPROC,
50
69
  run_simulations: true,
51
70
  verbose: false,
52
71
  gemfile_path: '',
53
- bundle_install_path: ''
72
+ bundle_install_path: get_local_bundle_config_path(dirname),
54
73
  }
55
74
  end
56
75
 
@@ -60,11 +79,19 @@ module OpenStudio
60
79
  #
61
80
  # @param [String] dirname Directory where runner.conf file is stored, typically the root of the extension.
62
81
  def self.init(dirname)
63
- File.open(File.join(dirname, FILENAME), 'w') do |f|
64
- f << JSON.pretty_generate(default_config)
82
+ runner_conf_file = File.join(dirname, FILENAME)
83
+ if File.exist?(runner_conf_file)
84
+ puts "runner.conf already exists, saving a runner.conf.bak, previous config:"
85
+ puts File.read(runner_conf_file)
86
+ FileUtils.cp(runner_conf_file, "#{FILENAME}.bak")
87
+ end
88
+
89
+ config = default_config(dirname)
90
+ File.open(runner_conf_file, 'w') do |f|
91
+ f << JSON.pretty_generate(config)
65
92
  end
66
93
 
67
- return default_config
94
+ return config
68
95
  end
69
96
 
70
97
  ##
@@ -5,6 +5,6 @@
5
5
 
6
6
  module OpenStudio
7
7
  module Extension
8
- VERSION = '0.7.1'.freeze
8
+ VERSION = '0.8.0'.freeze
9
9
  end
10
10
  end
@@ -26,16 +26,16 @@ Gem::Specification.new do |spec|
26
26
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
27
27
  spec.require_paths = ['lib']
28
28
 
29
- spec.required_ruby_version = '~> 2.7.0'
29
+ spec.required_ruby_version = '~> 3.2.2'
30
30
 
31
- spec.add_dependency 'bcl', '~> 0.7.1'
32
- spec.add_dependency 'bundler', '~> 2.1.0'
31
+ spec.add_dependency 'bcl', '~> 0.8.0'
32
+ # This only runs on the builders' machine
33
+ spec.add_dependency 'bundler', '2.4.10'
33
34
  spec.add_dependency 'octokit', '~> 4.18.0' # for change logs
34
- spec.add_dependency 'openstudio_measure_tester', '~> 0.3.1'
35
- spec.add_dependency 'openstudio-workflow', '~> 2.3.0'
35
+ spec.add_dependency 'openstudio_measure_tester', '~> 0.4.0'
36
+ spec.add_dependency 'openstudio-workflow', '~> 2.4.0'
36
37
  spec.add_dependency 'parallel', '~> 1.19.1'
37
38
 
38
- spec.add_development_dependency 'openstudio-standards', '~> 0.5.0' # for os_lib unit tests
39
39
  spec.add_development_dependency 'rake', '~> 13.0'
40
40
  spec.add_development_dependency 'rspec', '~> 3.9'
41
41
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openstudio-extension
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katherine Fleming
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2023-11-13 00:00:00.000000000 Z
14
+ date: 2024-05-03 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bcl
@@ -19,28 +19,28 @@ dependencies:
19
19
  requirements:
20
20
  - - "~>"
21
21
  - !ruby/object:Gem::Version
22
- version: 0.7.1
22
+ version: 0.8.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - "~>"
28
28
  - !ruby/object:Gem::Version
29
- version: 0.7.1
29
+ version: 0.8.0
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: bundler
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  requirements:
34
- - - "~>"
34
+ - - '='
35
35
  - !ruby/object:Gem::Version
36
- version: 2.1.0
36
+ version: 2.4.10
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
- - - "~>"
41
+ - - '='
42
42
  - !ruby/object:Gem::Version
43
- version: 2.1.0
43
+ version: 2.4.10
44
44
  - !ruby/object:Gem::Dependency
45
45
  name: octokit
46
46
  requirement: !ruby/object:Gem::Requirement
@@ -61,28 +61,28 @@ dependencies:
61
61
  requirements:
62
62
  - - "~>"
63
63
  - !ruby/object:Gem::Version
64
- version: 0.3.1
64
+ version: 0.4.0
65
65
  type: :runtime
66
66
  prerelease: false
67
67
  version_requirements: !ruby/object:Gem::Requirement
68
68
  requirements:
69
69
  - - "~>"
70
70
  - !ruby/object:Gem::Version
71
- version: 0.3.1
71
+ version: 0.4.0
72
72
  - !ruby/object:Gem::Dependency
73
73
  name: openstudio-workflow
74
74
  requirement: !ruby/object:Gem::Requirement
75
75
  requirements:
76
76
  - - "~>"
77
77
  - !ruby/object:Gem::Version
78
- version: 2.3.0
78
+ version: 2.4.0
79
79
  type: :runtime
80
80
  prerelease: false
81
81
  version_requirements: !ruby/object:Gem::Requirement
82
82
  requirements:
83
83
  - - "~>"
84
84
  - !ruby/object:Gem::Version
85
- version: 2.3.0
85
+ version: 2.4.0
86
86
  - !ruby/object:Gem::Dependency
87
87
  name: parallel
88
88
  requirement: !ruby/object:Gem::Requirement
@@ -97,20 +97,6 @@ dependencies:
97
97
  - - "~>"
98
98
  - !ruby/object:Gem::Version
99
99
  version: 1.19.1
100
- - !ruby/object:Gem::Dependency
101
- name: openstudio-standards
102
- requirement: !ruby/object:Gem::Requirement
103
- requirements:
104
- - - "~>"
105
- - !ruby/object:Gem::Version
106
- version: 0.5.0
107
- type: :development
108
- prerelease: false
109
- version_requirements: !ruby/object:Gem::Requirement
110
- requirements:
111
- - - "~>"
112
- - !ruby/object:Gem::Version
113
- version: 0.5.0
114
100
  - !ruby/object:Gem::Dependency
115
101
  name: rake
116
102
  requirement: !ruby/object:Gem::Requirement
@@ -186,43 +172,6 @@ files:
186
172
  - lib/measures/openstudio_extension_test_measure/resources/os_lib_helper_methods.rb
187
173
  - lib/openstudio-extension.rb
188
174
  - lib/openstudio/extension.rb
189
- - lib/openstudio/extension/core/CreateResults.rb
190
- - lib/openstudio/extension/core/check_air_sys_temps.rb
191
- - lib/openstudio/extension/core/check_calibration.rb
192
- - lib/openstudio/extension/core/check_cond_zns.rb
193
- - lib/openstudio/extension/core/check_domestic_hot_water.rb
194
- - lib/openstudio/extension/core/check_envelope_conductance.rb
195
- - lib/openstudio/extension/core/check_eui_by_end_use.rb
196
- - lib/openstudio/extension/core/check_eui_reasonableness.rb
197
- - lib/openstudio/extension/core/check_fan_pwr.rb
198
- - lib/openstudio/extension/core/check_internal_loads.rb
199
- - lib/openstudio/extension/core/check_mech_sys_capacity.rb
200
- - lib/openstudio/extension/core/check_mech_sys_efficiency.rb
201
- - lib/openstudio/extension/core/check_mech_sys_part_load_eff.rb
202
- - lib/openstudio/extension/core/check_mech_sys_type.rb
203
- - lib/openstudio/extension/core/check_part_loads.rb
204
- - lib/openstudio/extension/core/check_placeholder.rb
205
- - lib/openstudio/extension/core/check_plant_cap.rb
206
- - lib/openstudio/extension/core/check_plant_temps.rb
207
- - lib/openstudio/extension/core/check_plenum_loads.rb
208
- - lib/openstudio/extension/core/check_pump_pwr.rb
209
- - lib/openstudio/extension/core/check_sch_coord.rb
210
- - lib/openstudio/extension/core/check_schedules.rb
211
- - lib/openstudio/extension/core/check_simultaneous_heating_and_cooling.rb
212
- - lib/openstudio/extension/core/check_supply_air_and_thermostat_temp_difference.rb
213
- - lib/openstudio/extension/core/check_weather_files.rb
214
- - lib/openstudio/extension/core/deer_vintages.rb
215
- - lib/openstudio/extension/core/os_lib_aedg_measures.rb
216
- - lib/openstudio/extension/core/os_lib_constructions.rb
217
- - lib/openstudio/extension/core/os_lib_geometry.rb
218
- - lib/openstudio/extension/core/os_lib_helper_methods.rb
219
- - lib/openstudio/extension/core/os_lib_hvac.rb
220
- - lib/openstudio/extension/core/os_lib_lighting_and_equipment.rb
221
- - lib/openstudio/extension/core/os_lib_model_generation.rb
222
- - lib/openstudio/extension/core/os_lib_model_simplification.rb
223
- - lib/openstudio/extension/core/os_lib_outdoorair_and_infiltration.rb
224
- - lib/openstudio/extension/core/os_lib_reporting_qaqc.rb
225
- - lib/openstudio/extension/core/os_lib_schedules.rb
226
175
  - lib/openstudio/extension/rake_task.rb
227
176
  - lib/openstudio/extension/runner.rb
228
177
  - lib/openstudio/extension/runner_config.rb
@@ -233,7 +182,7 @@ licenses: []
233
182
  metadata:
234
183
  bug_tracker_uri: https://github.com/NREL/openstudio-extension-gem/issues
235
184
  changelog_uri: https://github.com/NREL/openstudio-extension-gem/blob/develop/CHANGELOG.md
236
- source_code_uri: https://github.com/NREL/openstudio-extension-gem/tree/v0.7.1
185
+ source_code_uri: https://github.com/NREL/openstudio-extension-gem/tree/v0.8.0
237
186
  post_install_message:
238
187
  rdoc_options: []
239
188
  require_paths:
@@ -242,14 +191,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
242
191
  requirements:
243
192
  - - "~>"
244
193
  - !ruby/object:Gem::Version
245
- version: 2.7.0
194
+ version: 3.2.2
246
195
  required_rubygems_version: !ruby/object:Gem::Requirement
247
196
  requirements:
248
197
  - - ">="
249
198
  - !ruby/object:Gem::Version
250
199
  version: '0'
251
200
  requirements: []
252
- rubygems_version: 3.1.4
201
+ rubygems_version: 3.4.10
253
202
  signing_key:
254
203
  specification_version: 4
255
204
  summary: openstudio base gem for creating generic extensions with encapsulated data