openstudio-analysis 1.0.6 → 1.1.0.pre.rc1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5f09590a10cf6967fb9842c05d8c38ad2be1b3dd534b0f251a9a1e239634fedd
4
- data.tar.gz: 679f353d4f85adcbd51dc9df8b2e61edd4250126a7ae49fab72058f1840e18e4
3
+ metadata.gz: d4dc6517c0ebfd5341ebb89a066ce4371f37aa7a2c20f01e8b36965b33b8b230
4
+ data.tar.gz: '08f4e8886d1dba3d984a77e03163938d7b957e798e9cdb0122378a8d5f2b2ebc'
5
5
  SHA512:
6
- metadata.gz: 39da086f21c02da1bcf3f00c371bb76f703ece1a8c3d2d1895f4585c0ac1d3ba8801858dbdeb69d922a067a733fbfe200375163b3e87917a4651a4a4f1969e3e
7
- data.tar.gz: e834f1873b13b933444d2dfaade3dfc62b7b177063fb9dbf69b06a2e133603123b2cbf8e28707d61748065fa12634cb72ab715b54004fdae482857a60b43a4b4
6
+ metadata.gz: 73d3b0a51379bc817574aee43db86d3aca220ebdc52b8e7be3a58107ac840c41b00ec084954ed33fdd36626650697b9ed26316756ebd09a33d2317273ec123c9
7
+ data.tar.gz: 4ec8ab47fbb526354addb1c492078bb0e3a791635e8f42ef7e95a82024db97d40c741558fa3b43f4391e00c6f2bfbf02662147157a48196b688bc4e3a9c66854
@@ -3,6 +3,7 @@ AllCops:
3
3
  - 'spec/files/measures/**/*'
4
4
  - 'spec/files/measures_second_path/**/*'
5
5
  - 'spec/files/worker_init/*'
6
+ - 'update_license.rb'
6
7
 
7
8
  inherit_from:
8
9
  - http://s3.amazonaws.com/openstudio-resources/styles/rubocop_v3.yml
@@ -1,6 +1,10 @@
1
1
  OpenStudio Analysis Gem Change Log
2
2
  ==================================
3
3
 
4
+ Version 1.1.0 (Unreleased)
5
+ --------------------------
6
+ * Allow for blank :seed, :weather_file and :workflow sections of OSA
7
+
4
8
  Version 1.0.6
5
9
  -------------
6
10
  * Always include ../lib to the file paths to search
@@ -69,11 +69,11 @@ module OpenStudio
69
69
  @measure_paths = options[:measure_paths] ? options[:measure_paths] : []
70
70
 
71
71
  # Initialize static inputs from the OSA
72
- @seed_file = File.basename(@osa[:seed][:path])
72
+ !@osa[:seed].nil? ? @seed_file = File.basename(@osa[:seed][:path]) : @seed_file = ''
73
73
  if @options[:seed]
74
74
  @seed_file = @options[:seed]
75
75
  end
76
- @weather_file = File.basename(@osa[:weather_file][:path])
76
+ !@osa[:weather_file].nil? ? @weather_file = File.basename(@osa[:weather_file][:path]) : @weather_file = ''
77
77
  @osa_id = @osa[:_id]
78
78
  @steps = []
79
79
  @osa[:problem][:workflow].each_with_index do |step, i|
@@ -35,6 +35,8 @@
35
35
 
36
36
  module OpenStudio
37
37
  module Analysis
38
- VERSION = '1.0.6'.freeze
38
+ # format should be ^.*\-{1}[a-z]+[0-9]+
39
+ # for example: -rc1, -beta6, -customusecase0
40
+ VERSION = '1.1.0-rc1'.freeze
39
41
  end
40
42
  end
@@ -262,29 +262,30 @@ module OpenStudio
262
262
 
263
263
  o = OpenStudio::Analysis::Workflow.new
264
264
 
265
- h[:workflow].each do |wf|
266
- puts "Adding measure #{wf[:name]}"
267
-
268
- # Go though the defined measure paths and try and find the local measure
269
- local_measure_dir = nil
270
- if wf[:measure_definition_directory_local] && Dir.exist?(wf[:measure_definition_directory_local])
271
- local_measure_dir = wf[:measure_definition_directory_local]
272
- else
273
- # search in the measure paths for the measure
274
- OpenStudio::Analysis.measure_paths.each do |p|
275
- test_dir = File.join(p, File.basename(wf[:measure_definition_directory]))
276
- if Dir.exist?(test_dir)
277
- local_measure_dir = test_dir
278
- break
265
+ if h[:workflow]
266
+ h[:workflow].each do |wf|
267
+ puts "Adding measure #{wf[:name]}"
268
+
269
+ # Go though the defined measure paths and try and find the local measure
270
+ local_measure_dir = nil
271
+ if wf[:measure_definition_directory_local] && Dir.exist?(wf[:measure_definition_directory_local])
272
+ local_measure_dir = wf[:measure_definition_directory_local]
273
+ else
274
+ # search in the measure paths for the measure
275
+ OpenStudio::Analysis.measure_paths.each do |p|
276
+ test_dir = File.join(p, File.basename(wf[:measure_definition_directory]))
277
+ if Dir.exist?(test_dir)
278
+ local_measure_dir = test_dir
279
+ break
280
+ end
279
281
  end
280
282
  end
281
- end
282
283
 
283
- raise "Could not find local measure when loading workflow for #{wf[:measure_definition_class_name]} in #{File.basename(wf[:measure_definition_directory])}. You may have to add measure paths to OpenStudio::Analysis.measure_paths" unless local_measure_dir
284
+ raise "Could not find local measure when loading workflow for #{wf[:measure_definition_class_name]} in #{File.basename(wf[:measure_definition_directory])}. You may have to add measure paths to OpenStudio::Analysis.measure_paths" unless local_measure_dir
284
285
 
285
- o.add_measure_from_analysis_hash(wf[:name], wf[:display_name], local_measure_dir, wf)
286
+ o.add_measure_from_analysis_hash(wf[:name], wf[:display_name], local_measure_dir, wf)
287
+ end
286
288
  end
287
-
288
289
  o
289
290
  end
290
291
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openstudio-analysis
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.1.0.pre.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicholas Long
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-21 00:00:00.000000000 Z
11
+ date: 2021-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bcl
@@ -199,9 +199,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
199
199
  version: 2.5.0
200
200
  required_rubygems_version: !ruby/object:Gem::Requirement
201
201
  requirements:
202
- - - ">="
202
+ - - ">"
203
203
  - !ruby/object:Gem::Version
204
- version: '0'
204
+ version: 1.3.1
205
205
  requirements: []
206
206
  rubyforge_project:
207
207
  rubygems_version: 2.7.6.2