openstudio-workflow 1.3.5 → 2.0.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +6 -0
- data/README.md +10 -10
- data/Rakefile +2 -0
- data/lib/openstudio-workflow.rb +2 -0
- data/lib/openstudio/workflow/adapters/input/local.rb +3 -0
- data/lib/openstudio/workflow/adapters/output/local.rb +3 -0
- data/lib/openstudio/workflow/adapters/output/socket.rb +2 -0
- data/lib/openstudio/workflow/adapters/output/web.rb +2 -0
- data/lib/openstudio/workflow/adapters/output_adapter.rb +4 -0
- data/lib/openstudio/workflow/job.rb +2 -0
- data/lib/openstudio/workflow/jobs/run_energyplus.rb +6 -3
- data/lib/openstudio/workflow/jobs/run_ep_measures.rb +5 -2
- data/lib/openstudio/workflow/jobs/run_initialization.rb +6 -3
- data/lib/openstudio/workflow/jobs/run_os_measures.rb +5 -2
- data/lib/openstudio/workflow/jobs/run_postprocess.rb +2 -0
- data/lib/openstudio/workflow/jobs/run_preprocess.rb +7 -4
- data/lib/openstudio/workflow/jobs/run_reporting_measures.rb +4 -0
- data/lib/openstudio/workflow/jobs/run_translation.rb +7 -4
- data/lib/openstudio/workflow/multi_delegator.rb +2 -0
- data/lib/openstudio/workflow/registry.rb +5 -0
- data/lib/openstudio/workflow/run.rb +4 -2
- data/lib/openstudio/workflow/time_logger.rb +2 -0
- data/lib/openstudio/workflow/util.rb +2 -0
- data/lib/openstudio/workflow/util/energyplus.rb +229 -226
- data/lib/openstudio/workflow/util/io.rb +2 -0
- data/lib/openstudio/workflow/util/model.rb +4 -0
- data/lib/openstudio/workflow/util/post_process.rb +4 -1
- data/lib/openstudio/workflow/util/weather_file.rb +5 -0
- data/lib/openstudio/workflow/version.rb +3 -1
- data/lib/openstudio/workflow_json.rb +5 -0
- data/lib/openstudio/workflow_runner.rb +4 -0
- metadata +56 -42
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# *******************************************************************************
|
2
4
|
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
|
3
5
|
# All rights reserved.
|
@@ -63,6 +65,7 @@ module OpenStudio
|
|
63
65
|
loaded_model = OpenStudio::Model::Model.load(osm_path)
|
64
66
|
end
|
65
67
|
raise "Failed to load OSM file #{osm_path}" if loaded_model.empty?
|
68
|
+
|
66
69
|
loaded_model.get
|
67
70
|
end
|
68
71
|
|
@@ -80,6 +83,7 @@ module OpenStudio
|
|
80
83
|
|
81
84
|
idf = OpenStudio::Workspace.load(idf_path)
|
82
85
|
raise "Failed to load IDF file #{idf_path}" if idf.empty?
|
86
|
+
|
83
87
|
idf.get
|
84
88
|
end
|
85
89
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# *******************************************************************************
|
2
4
|
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
|
3
5
|
# All rights reserved.
|
@@ -52,6 +54,7 @@ module OpenStudio
|
|
52
54
|
#
|
53
55
|
def load_sql_file(sql_file)
|
54
56
|
return nil unless File.exist? sql_file
|
57
|
+
|
55
58
|
OpenStudio::SqlFile.new(@sql_filename)
|
56
59
|
end
|
57
60
|
|
@@ -135,7 +138,7 @@ module OpenStudio
|
|
135
138
|
#
|
136
139
|
def rename_hash_keys(hash, logger)
|
137
140
|
# @todo should we log the name changes?
|
138
|
-
regex =
|
141
|
+
regex = %r{[|!@#\$%^&\*\(\)\{\}\\\[\];:'",<.>/?\+=]+}
|
139
142
|
|
140
143
|
rename_keys = lambda do |h|
|
141
144
|
if Hash === h
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# *******************************************************************************
|
2
4
|
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
|
3
5
|
# All rights reserved.
|
@@ -60,6 +62,7 @@ module OpenStudio
|
|
60
62
|
end
|
61
63
|
weather_file = get_weather_file_from_osm(model, logger) if weather_file.nil?
|
62
64
|
raise 'Could not locate the weather file in the filesystem. Please see the log' if weather_file == false
|
65
|
+
|
63
66
|
logger.warn 'The weather file could not be determined. Please see the log for details' unless weather_file
|
64
67
|
weather_file
|
65
68
|
end
|
@@ -113,6 +116,7 @@ module OpenStudio
|
|
113
116
|
#
|
114
117
|
def get_weather_file_from_fs(directory, wf, wf_search_array, logger)
|
115
118
|
raise "wf was defined as #{wf}. Please correct" unless wf
|
119
|
+
|
116
120
|
weather_file = nil
|
117
121
|
if Pathname.new(wf).absolute?
|
118
122
|
weather_file = wf
|
@@ -120,6 +124,7 @@ module OpenStudio
|
|
120
124
|
wf_search_array.each do |wf_dir|
|
121
125
|
logger.warn "The path #{wf_dir} does not exist" unless File.exist? File.join(directory, wf_dir)
|
122
126
|
next unless File.exist? File.join(directory, wf_dir)
|
127
|
+
|
123
128
|
if Dir.entries(File.join(directory, wf_dir)).include? File.basename(wf)
|
124
129
|
weather_file = File.absolute_path(File.join(directory, wf_dir, wf))
|
125
130
|
break
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# *******************************************************************************
|
2
4
|
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
|
3
5
|
# All rights reserved.
|
@@ -35,6 +37,6 @@
|
|
35
37
|
|
36
38
|
module OpenStudio
|
37
39
|
module Workflow
|
38
|
-
VERSION = '
|
40
|
+
VERSION = '2.0.0.pre1' # Suffixes must have periods (not dashes)
|
39
41
|
end
|
40
42
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# *******************************************************************************
|
2
4
|
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
|
3
5
|
# All rights reserved.
|
@@ -51,6 +53,7 @@ class Optional_Shim
|
|
51
53
|
|
52
54
|
def get
|
53
55
|
raise 'Uninitialized Optional_Shim' if @obj.nil?
|
56
|
+
|
54
57
|
@obj
|
55
58
|
end
|
56
59
|
end
|
@@ -121,6 +124,7 @@ class WorkflowStepResult_Shim
|
|
121
124
|
if @result[:initial_condition]
|
122
125
|
return Optional_Shim.new(@result[:initial_condition])
|
123
126
|
end
|
127
|
+
|
124
128
|
return Optional_Shim.new(nil)
|
125
129
|
end
|
126
130
|
|
@@ -128,6 +132,7 @@ class WorkflowStepResult_Shim
|
|
128
132
|
if @result[:final_condition]
|
129
133
|
return Optional_Shim.new(@result[:final_condition])
|
130
134
|
end
|
135
|
+
|
131
136
|
return Optional_Shim.new(nil)
|
132
137
|
end
|
133
138
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# *******************************************************************************
|
2
4
|
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
|
3
5
|
# All rights reserved.
|
@@ -138,6 +140,7 @@ class WorkflowRunner < OpenStudio::Ruleset::OSRunner
|
|
138
140
|
if current_step.empty?
|
139
141
|
raise 'Cannot find current_step'
|
140
142
|
end
|
143
|
+
|
141
144
|
current_step = current_step.get
|
142
145
|
|
143
146
|
if current_step.step[:result].nil?
|
@@ -258,6 +261,7 @@ class WorkflowRunner < OpenStudio::Ruleset::OSRunner
|
|
258
261
|
# Overload halted
|
259
262
|
def halted
|
260
263
|
return @halted unless @use_os_halted
|
264
|
+
|
261
265
|
super
|
262
266
|
end
|
263
267
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openstudio-workflow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0.pre1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicholas Long
|
@@ -17,166 +17,180 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: '1
|
20
|
+
version: '2.1'
|
21
21
|
type: :development
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: '1
|
27
|
+
version: '2.1'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: rake
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "~>"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '12.3'
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '12.3'
|
28
42
|
- !ruby/object:Gem::Dependency
|
29
43
|
name: rspec
|
30
44
|
requirement: !ruby/object:Gem::Requirement
|
31
45
|
requirements:
|
32
|
-
- -
|
46
|
+
- - "~>"
|
33
47
|
- !ruby/object:Gem::Version
|
34
|
-
version: 3.
|
48
|
+
version: '3.9'
|
35
49
|
type: :development
|
36
50
|
prerelease: false
|
37
51
|
version_requirements: !ruby/object:Gem::Requirement
|
38
52
|
requirements:
|
39
|
-
- -
|
53
|
+
- - "~>"
|
40
54
|
- !ruby/object:Gem::Version
|
41
|
-
version: 3.
|
55
|
+
version: '3.9'
|
42
56
|
- !ruby/object:Gem::Dependency
|
43
57
|
name: json-schema
|
44
58
|
requirement: !ruby/object:Gem::Requirement
|
45
59
|
requirements:
|
46
|
-
- -
|
60
|
+
- - "~>"
|
47
61
|
- !ruby/object:Gem::Version
|
48
62
|
version: 2.8.0
|
49
63
|
type: :development
|
50
64
|
prerelease: false
|
51
65
|
version_requirements: !ruby/object:Gem::Requirement
|
52
66
|
requirements:
|
53
|
-
- -
|
67
|
+
- - "~>"
|
54
68
|
- !ruby/object:Gem::Version
|
55
69
|
version: 2.8.0
|
56
70
|
- !ruby/object:Gem::Dependency
|
57
71
|
name: builder
|
58
72
|
requirement: !ruby/object:Gem::Requirement
|
59
73
|
requirements:
|
60
|
-
- -
|
74
|
+
- - "~>"
|
61
75
|
- !ruby/object:Gem::Version
|
62
|
-
version: 2.
|
76
|
+
version: 3.2.4
|
63
77
|
type: :development
|
64
78
|
prerelease: false
|
65
79
|
version_requirements: !ruby/object:Gem::Requirement
|
66
80
|
requirements:
|
67
|
-
- -
|
81
|
+
- - "~>"
|
68
82
|
- !ruby/object:Gem::Version
|
69
|
-
version: 2.
|
83
|
+
version: 3.2.4
|
70
84
|
- !ruby/object:Gem::Dependency
|
71
85
|
name: ci_reporter
|
72
86
|
requirement: !ruby/object:Gem::Requirement
|
73
87
|
requirements:
|
74
|
-
- -
|
88
|
+
- - "~>"
|
75
89
|
- !ruby/object:Gem::Version
|
76
90
|
version: 2.0.0
|
77
91
|
type: :development
|
78
92
|
prerelease: false
|
79
93
|
version_requirements: !ruby/object:Gem::Requirement
|
80
94
|
requirements:
|
81
|
-
- -
|
95
|
+
- - "~>"
|
82
96
|
- !ruby/object:Gem::Version
|
83
97
|
version: 2.0.0
|
84
98
|
- !ruby/object:Gem::Dependency
|
85
99
|
name: ci_reporter_rspec
|
86
100
|
requirement: !ruby/object:Gem::Requirement
|
87
101
|
requirements:
|
88
|
-
- -
|
102
|
+
- - "~>"
|
89
103
|
- !ruby/object:Gem::Version
|
90
104
|
version: 1.0.0
|
91
105
|
type: :development
|
92
106
|
prerelease: false
|
93
107
|
version_requirements: !ruby/object:Gem::Requirement
|
94
108
|
requirements:
|
95
|
-
- -
|
109
|
+
- - "~>"
|
96
110
|
- !ruby/object:Gem::Version
|
97
111
|
version: 1.0.0
|
98
112
|
- !ruby/object:Gem::Dependency
|
99
113
|
name: coveralls
|
100
114
|
requirement: !ruby/object:Gem::Requirement
|
101
115
|
requirements:
|
102
|
-
- -
|
116
|
+
- - "~>"
|
103
117
|
- !ruby/object:Gem::Version
|
104
118
|
version: 0.8.21
|
105
119
|
type: :development
|
106
120
|
prerelease: false
|
107
121
|
version_requirements: !ruby/object:Gem::Requirement
|
108
122
|
requirements:
|
109
|
-
- -
|
123
|
+
- - "~>"
|
110
124
|
- !ruby/object:Gem::Version
|
111
125
|
version: 0.8.21
|
112
126
|
- !ruby/object:Gem::Dependency
|
113
127
|
name: parallel
|
114
128
|
requirement: !ruby/object:Gem::Requirement
|
115
129
|
requirements:
|
116
|
-
- -
|
130
|
+
- - "~>"
|
117
131
|
- !ruby/object:Gem::Version
|
118
|
-
version: 1.
|
132
|
+
version: 1.19.1
|
119
133
|
type: :development
|
120
134
|
prerelease: false
|
121
135
|
version_requirements: !ruby/object:Gem::Requirement
|
122
136
|
requirements:
|
123
|
-
- -
|
137
|
+
- - "~>"
|
124
138
|
- !ruby/object:Gem::Version
|
125
|
-
version: 1.
|
139
|
+
version: 1.19.1
|
126
140
|
- !ruby/object:Gem::Dependency
|
127
141
|
name: public_suffix
|
128
142
|
requirement: !ruby/object:Gem::Requirement
|
129
143
|
requirements:
|
130
|
-
- -
|
144
|
+
- - "~>"
|
131
145
|
- !ruby/object:Gem::Version
|
132
|
-
version:
|
146
|
+
version: 4.0.3
|
133
147
|
type: :development
|
134
148
|
prerelease: false
|
135
149
|
version_requirements: !ruby/object:Gem::Requirement
|
136
150
|
requirements:
|
137
|
-
- -
|
151
|
+
- - "~>"
|
138
152
|
- !ruby/object:Gem::Version
|
139
|
-
version:
|
153
|
+
version: 4.0.3
|
140
154
|
- !ruby/object:Gem::Dependency
|
141
155
|
name: rainbow
|
142
156
|
requirement: !ruby/object:Gem::Requirement
|
143
157
|
requirements:
|
144
|
-
- -
|
158
|
+
- - "~>"
|
145
159
|
- !ruby/object:Gem::Version
|
146
|
-
version:
|
160
|
+
version: 3.0.0
|
147
161
|
type: :development
|
148
162
|
prerelease: false
|
149
163
|
version_requirements: !ruby/object:Gem::Requirement
|
150
164
|
requirements:
|
151
|
-
- -
|
165
|
+
- - "~>"
|
152
166
|
- !ruby/object:Gem::Version
|
153
|
-
version:
|
167
|
+
version: 3.0.0
|
154
168
|
- !ruby/object:Gem::Dependency
|
155
169
|
name: rubocop
|
156
170
|
requirement: !ruby/object:Gem::Requirement
|
157
171
|
requirements:
|
158
|
-
- -
|
172
|
+
- - "~>"
|
159
173
|
- !ruby/object:Gem::Version
|
160
|
-
version: 0.
|
174
|
+
version: 0.80.1
|
161
175
|
type: :development
|
162
176
|
prerelease: false
|
163
177
|
version_requirements: !ruby/object:Gem::Requirement
|
164
178
|
requirements:
|
165
|
-
- -
|
179
|
+
- - "~>"
|
166
180
|
- !ruby/object:Gem::Version
|
167
|
-
version: 0.
|
181
|
+
version: 0.80.1
|
168
182
|
- !ruby/object:Gem::Dependency
|
169
183
|
name: rubocop-checkstyle_formatter
|
170
184
|
requirement: !ruby/object:Gem::Requirement
|
171
185
|
requirements:
|
172
|
-
- -
|
186
|
+
- - "~>"
|
173
187
|
- !ruby/object:Gem::Version
|
174
188
|
version: 0.4.0
|
175
189
|
type: :development
|
176
190
|
prerelease: false
|
177
191
|
version_requirements: !ruby/object:Gem::Requirement
|
178
192
|
requirements:
|
179
|
-
- -
|
193
|
+
- - "~>"
|
180
194
|
- !ruby/object:Gem::Version
|
181
195
|
version: 0.4.0
|
182
196
|
description: Run OpenStudio based measures and simulations using EnergyPlus
|
@@ -230,17 +244,17 @@ require_paths:
|
|
230
244
|
- lib
|
231
245
|
required_ruby_version: !ruby/object:Gem::Requirement
|
232
246
|
requirements:
|
233
|
-
- - "
|
247
|
+
- - "~>"
|
234
248
|
- !ruby/object:Gem::Version
|
235
|
-
version: 2.
|
249
|
+
version: 2.5.0
|
236
250
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
237
251
|
requirements:
|
238
|
-
- - "
|
252
|
+
- - ">"
|
239
253
|
- !ruby/object:Gem::Version
|
240
|
-
version:
|
254
|
+
version: 1.3.1
|
241
255
|
requirements: []
|
242
256
|
rubyforge_project:
|
243
|
-
rubygems_version: 2.
|
257
|
+
rubygems_version: 2.7.6.2
|
244
258
|
signing_key:
|
245
259
|
specification_version: 4
|
246
260
|
summary: OpenStudio Workflow Manager
|