openstudio-extension 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5236e369124bbe20e9e3ac29a5256aa253c952a9476834fcffd16abcdec7759a
4
- data.tar.gz: 50ca0367d6b629d120bb5a267ff41c639e25a7efbfd488e9da532b3bb7820dce
3
+ metadata.gz: 14382dd7b9d2ea113c334dc5d478fc543e03c8cfd187e5d1ed702414e1e878cb
4
+ data.tar.gz: 2943baf83593784439ef8e1e4c656bacc1042666eede5f4e2836351c160a5009
5
5
  SHA512:
6
- metadata.gz: 918c839e7b3540c30c08bdba2f132f5ce7f048f24bd8b8f2143741a38107c503c23e5ffbe977dcda8c5515fff2c12ead86308f9b5b5bb007d6107644b141baa6
7
- data.tar.gz: 33bc58b51565be29ad26dc0590838ee2ffddb51a83756fe1184acbbb9398fb57c9836866784eca8beb03f9dbc6207b74c5a80c835624481f50045ce990754f5e
6
+ metadata.gz: 1b0ab92740d7232a7febfbea649b5d39a45f7b5a23b4f172ab0122c06aff38f6b6d692b3d0e7e44f85ca2f346b7afbc39de44c8b439431345a32b74b6cb3dadd
7
+ data.tar.gz: e81c0739957432be1ec8da8ea503a2daad939b36dc94faf21087c17c6871b4c633b02a788e84f7fff2faabbbda11c41b15220b62c2ad30b3d86e34601dea60c8
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/
@@ -1,6 +1,13 @@
1
1
  # OpenStudio Extension Gem
2
2
 
3
+ ## Version 0.3.2
4
+
5
+ * Update Extension Gem Template
6
+ * Add gemfile path instead of just dirname to the initialization
7
+ * Update to latest workflow gem to support URBANopt Workflow
8
+
3
9
  ## Version 0.3.1
10
+
4
11
  * This change first zeroes-out latent (for good measure) and radiant fractions before setting lost fraction to 1.0 to avoid this error.
5
12
 
6
13
  ## Version 0.3.0
@@ -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
@@ -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
@@ -62,6 +62,8 @@ module OpenStudio
62
62
  # @option options [String] :num_parallel Number of simulations to run in parallel at a time
63
63
  # @option options [String] :run_simulations Set to true to run the simulations
64
64
  # @option options [String] :verbose Set to true to receive extra information while running simulations
65
+ # @option options [String] :gemfile_path Path to gemfile to use
66
+ # @option options [String] :bundle_install_path Path where the bundle should be installed
65
67
  def initialize(dirname = Dir.pwd, bundle_without = [], options = {})
66
68
  # DLM: I am not sure if we want to use the main root directory to create these bundles
67
69
  # had the idea of passing in a Gemfile name/alias and path to Gemfile, then doing the bundle
@@ -88,9 +90,14 @@ module OpenStudio
88
90
  @gemfile_path = !@options.key?(:gemfile_path) || @options[:gemfile_path] === '' ? File.join(@dirname, 'Gemfile') : @options[:gemfile_path]
89
91
  @bundle_install_path = !@options.key?(:bundle_install_path) || @options[:bundle_install_path] === '' ? File.join(@dirname, '.bundle/install/') : @options[:bundle_install_path]
90
92
  @original_dir = Dir.pwd
93
+
94
+ # gemfile directory
95
+ @gemfile_dir = File.dirname(@gemfile_path)
96
+
91
97
  # puts "DIRNAME: #{@dirname}"
92
98
  # puts "@gemfile_path set to: #{@gemfile_path}"
93
99
  # puts "@bundle_install_path set to: #{@bundle_install_path}"
100
+ # puts "@gemfile directory: #{@gemfile_dir}"
94
101
 
95
102
  @bundle_without = bundle_without || []
96
103
  @bundle_without_string = @bundle_without.join(' ')
@@ -106,8 +113,8 @@ module OpenStudio
106
113
  else
107
114
  # there is a gemfile, attempt to create a bundle
108
115
  begin
109
- # go to the directory with the gemfile
110
- Dir.chdir(@dirname)
116
+ # go to the directory with the gemfile to run these commands
117
+ Dir.chdir(@gemfile_dir)
111
118
 
112
119
  # test to see if bundle is installed
113
120
  check_bundle = run_command('bundle -v', get_clean_env)
@@ -119,7 +126,7 @@ module OpenStudio
119
126
 
120
127
  # check existing config
121
128
  needs_config = true
122
- if File.exist?('./.bundle/config')
129
+ if File.exist?('./.bundle/config') # checking wrt gemfile_dir
123
130
  puts 'config exists'
124
131
  needs_config = false
125
132
  config = YAML.load_file('./.bundle/config')
@@ -135,7 +142,7 @@ module OpenStudio
135
142
 
136
143
  # check existing platform
137
144
  needs_platform = true
138
- if File.exist?('Gemfile.lock')
145
+ if File.exist?('Gemfile.lock') # checking wrt gemfile_dir
139
146
  puts 'Gemfile.lock exists'
140
147
  gemfile_lock = Bundler::LockfileParser.new(Bundler.read_file('Gemfile.lock'))
141
148
  if gemfile_lock.platforms.include?('ruby')
@@ -164,9 +171,7 @@ module OpenStudio
164
171
 
165
172
  puts "needs_update = #{needs_update}"
166
173
  if needs_update
167
- # run_command('bundle update', get_clean_env)
168
- # KAF: updated to include specified gemfile_path...this didn't seem to work before
169
- run_command("bundle update --gemfile=#{@gemfile_path}", get_clean_env)
174
+ run_command('bundle update', get_clean_env)
170
175
  end
171
176
  ensure
172
177
  Dir.chdir(@original_dir)
@@ -220,8 +225,7 @@ module OpenStudio
220
225
  result = false
221
226
  original_dir = Dir.pwd
222
227
  begin
223
- Dir.chdir(@dirname)
224
-
228
+ Dir.chdir(@gemfile_dir)
225
229
  # DLM: using popen3 here can result in deadlocks
226
230
  stdout_str, stderr_str, status = Open3.capture3(env, command)
227
231
  if status.success?
@@ -35,6 +35,6 @@
35
35
 
36
36
  module OpenStudio
37
37
  module Extension
38
- VERSION = '0.3.1'.freeze
38
+ VERSION = '0.3.2'.freeze
39
39
  end
40
40
  end
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
31
31
  spec.add_dependency 'bcl', '~> 0.6.1'
32
32
  spec.add_dependency 'bundler', '~> 2.1'
33
33
  spec.add_dependency 'octokit', '~> 4.18.0' # for change logs
34
- spec.add_dependency 'openstudio-workflow', '~> 2.1.0'
34
+ spec.add_dependency 'openstudio-workflow', '~> 2.1.1'
35
35
  spec.add_dependency 'openstudio_measure_tester', '~> 0.2.3'
36
36
  spec.add_dependency 'parallel', '~> 1.19.1'
37
37
 
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.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katherine Fleming
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2020-10-15 00:00:00.000000000 Z
13
+ date: 2020-12-08 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bcl
@@ -60,14 +60,14 @@ dependencies:
60
60
  requirements:
61
61
  - - "~>"
62
62
  - !ruby/object:Gem::Version
63
- version: 2.1.0
63
+ version: 2.1.1
64
64
  type: :runtime
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - "~>"
69
69
  - !ruby/object:Gem::Version
70
- version: 2.1.0
70
+ version: 2.1.1
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: openstudio_measure_tester
73
73
  requirement: !ruby/object:Gem::Requirement
@@ -217,7 +217,7 @@ licenses: []
217
217
  metadata:
218
218
  bug_tracker_uri: https://github.com/NREL/openstudio-extension-gem/issues
219
219
  changelog_uri: https://github.com/NREL/openstudio-extension-gem/blob/develop/CHANGELOG.md
220
- source_code_uri: https://github.com/NREL/openstudio-extension-gem/tree/v0.3.1
220
+ source_code_uri: https://github.com/NREL/openstudio-extension-gem/tree/v0.3.2
221
221
  post_install_message:
222
222
  rdoc_options: []
223
223
  require_paths: