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 +4 -4
- data/.rubocop.yml +1 -0
- data/CHANGELOG.md +4 -0
- data/lib/openstudio/analysis/translator/workflow.rb +2 -2
- data/lib/openstudio/analysis/version.rb +3 -1
- data/lib/openstudio/analysis/workflow.rb +19 -18
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4dc6517c0ebfd5341ebb89a066ce4371f37aa7a2c20f01e8b36965b33b8b230
|
4
|
+
data.tar.gz: '08f4e8886d1dba3d984a77e03163938d7b957e798e9cdb0122378a8d5f2b2ebc'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73d3b0a51379bc817574aee43db86d3aca220ebdc52b8e7be3a58107ac840c41b00ec084954ed33fdd36626650697b9ed26316756ebd09a33d2317273ec123c9
|
7
|
+
data.tar.gz: 4ec8ab47fbb526354addb1c492078bb0e3a791635e8f42ef7e95a82024db97d40c741558fa3b43f4391e00c6f2bfbf02662147157a48196b688bc4e3a9c66854
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -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|
|
@@ -262,29 +262,30 @@ module OpenStudio
|
|
262
262
|
|
263
263
|
o = OpenStudio::Analysis::Workflow.new
|
264
264
|
|
265
|
-
h[:workflow]
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
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
|
-
|
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
|
-
|
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.
|
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:
|
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:
|
204
|
+
version: 1.3.1
|
205
205
|
requirements: []
|
206
206
|
rubyforge_project:
|
207
207
|
rubygems_version: 2.7.6.2
|