openstudio-workflow 1.1.1 → 1.1.2

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
  SHA1:
3
- metadata.gz: 532be0c06d55d26e5093d3ab50408d22a959ec5e
4
- data.tar.gz: 2d1a4981f3064bb321a26adba13b865c4cf8fa7f
3
+ metadata.gz: 626a53f7a44fd8b5203559f9101767698477acbb
4
+ data.tar.gz: ae410305611dfe81e607f90e09fb4aab37d05e54
5
5
  SHA512:
6
- metadata.gz: e993c121bd067a2ed62531e7fd53d49193fac78f50cb4965eae72346b799255935a076325aacb19bbd202150ca90b7eb4eebf7eaf532588d2e651c5fdf58465f
7
- data.tar.gz: ca03998c2563d734ed1b975538f5b7375a270bfa79128d5142380b8e4ff51e32e90b876ae23d9afd89af829606936c6d64d0396f5aff784f7bc038cbb0619d2d
6
+ metadata.gz: 94d0f57c7490ae80cdb5f97942d3045309784478f0f97850d5ef7b04b1853c0dc19131e82a81bc8d1025010d655ceaaa2bcdf99fa2d6d9d261f1747c98825ce2
7
+ data.tar.gz: 44f91112022af27f4eadfc1319d88b74f73bbffc4ca70f2532774c6411ea6b4b01a7e7b73e4604a4c158fef9231b53f49d790f62092bb7b73af3f8d57df5dbf3
@@ -228,7 +228,7 @@ module OpenStudio
228
228
  #
229
229
  def analysis
230
230
  # DLM: should this come from the OSW? the osd id and checksum are specified there.
231
- osa_abs_path = File.join(osw_dir, 'analysis.osa')
231
+ osa_abs_path = File.join(osw_dir, '../analysis.json')
232
232
  if File.exist? osa_abs_path
233
233
  ::JSON.parse(File.read(osa_abs_path), symbolize_names: true)
234
234
  end
@@ -3,6 +3,7 @@ module OpenStudio
3
3
  module Util
4
4
  require 'openstudio/workflow/util/measure'
5
5
  require 'csv'
6
+ require 'rexml/document'
6
7
 
7
8
  # This module serves as a wrapper around various post-processing tasks used to manage outputs
8
9
  # @todo (rhorsey) ummmm. So some of this is pretty ugly. Since @dmacumber had ideas about this maybe he can figure
@@ -44,9 +45,9 @@ module OpenStudio
44
45
  if @registry[:analysis]
45
46
  logger.info 'Iterating over Analysis JSON Output Variables'
46
47
  # Save the objective functions to the object for sending back to the simulation executive
47
-
48
- if @analysis_json[:analysis] && @analysis_json[:analysis][:output_variables]
49
- @analysis_json[:analysis][:output_variables].each do |variable|
48
+ analysis_json = @registry[:analysis]
49
+ if analysis_json[:analysis] && analysis_json[:analysis][:output_variables]
50
+ analysis_json[:analysis][:output_variables].each do |variable|
50
51
  # determine which ones are the objective functions (code smell: todo: use enumerator)
51
52
  if variable[:objective_function]
52
53
  logger.info "Looking for objective function #{variable[:name]}"
@@ -136,7 +137,12 @@ module OpenStudio
136
137
  # Also, find any "report*.*" files
137
138
  Dir["#{run_dir}/*/report*.*"].each do |report|
138
139
  # get the parent directory of the file and snake case it
139
- measure_class_name = File.basename(File.dirname(report))
140
+ measure_dir_name = File.dirname(report).split('/').last.gsub(/[0-9][0-9][0-9]_/, '')
141
+ measure_xml_path = File.absolute_path(File.join(File.dirname(report), '../../..', 'measures',
142
+ measure_dir_name, 'measure.xml'))
143
+ logger.info "measure_xml_path: #{measure_xml_path}"
144
+ measure_xml = REXML::Document.new File.read(measure_xml_path)
145
+ measure_class_name = OpenStudio.toUnderscoreCase(measure_xml.root.elements['class_name'].text)
140
146
  file_ext = File.extname(report)
141
147
  append_str = File.basename(report, '.*')
142
148
  new_file_name = "#{directory}/reports/#{measure_class_name}_#{append_str}#{file_ext}"
@@ -19,6 +19,6 @@
19
19
 
20
20
  module OpenStudio
21
21
  module Workflow
22
- VERSION = '1.1.1'.freeze # Suffixes must have periods (not dashes)
22
+ VERSION = '1.1.2'.freeze # Suffixes must have periods (not dashes)
23
23
  end
24
24
  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: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicholas Long
@@ -9,34 +9,34 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-02-10 00:00:00.000000000 Z
12
+ date: 2017-03-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ~>
18
+ - - "~>"
19
19
  - !ruby/object:Gem::Version
20
20
  version: '1.6'
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
27
  version: '1.6'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: json-schema
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ~>
32
+ - - "~>"
33
33
  - !ruby/object:Gem::Version
34
34
  version: '0'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ~>
39
+ - - "~>"
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
42
  description: Run OpenStudio based measures and simulations using EnergyPlus
@@ -90,17 +90,17 @@ require_paths:
90
90
  - lib
91
91
  required_ruby_version: !ruby/object:Gem::Requirement
92
92
  requirements:
93
- - - '>='
93
+ - - ">="
94
94
  - !ruby/object:Gem::Version
95
95
  version: '2.0'
96
96
  required_rubygems_version: !ruby/object:Gem::Requirement
97
97
  requirements:
98
- - - '>='
98
+ - - ">="
99
99
  - !ruby/object:Gem::Version
100
100
  version: '0'
101
101
  requirements: []
102
102
  rubyforge_project:
103
- rubygems_version: 2.6.7
103
+ rubygems_version: 2.6.10
104
104
  signing_key:
105
105
  specification_version: 4
106
106
  summary: OpenStudio Workflow Manager