openstudio-analysis 1.0.1 → 1.0.6
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 -1
- data/.travis.yml +2 -3
- data/CHANGELOG.md +25 -0
- data/Gemfile +1 -5
- data/LICENSE.md +1 -1
- data/Rakefile +1 -1
- data/lib/openstudio-analysis.rb +2 -1
- data/lib/openstudio/analysis.rb +23 -27
- data/lib/openstudio/analysis/algorithm_attributes.rb +1 -1
- data/lib/openstudio/analysis/formulation.rb +1 -1
- data/lib/openstudio/analysis/server_api.rb +8 -14
- data/lib/openstudio/analysis/support_files.rb +1 -1
- data/lib/openstudio/analysis/translator/datapoints.rb +24 -38
- data/lib/openstudio/analysis/translator/excel.rb +2 -2
- data/lib/openstudio/analysis/translator/workflow.rb +10 -13
- data/lib/openstudio/analysis/version.rb +2 -2
- data/lib/openstudio/analysis/workflow.rb +9 -18
- data/lib/openstudio/analysis/workflow_step.rb +67 -78
- data/lib/openstudio/helpers/hash.rb +1 -1
- data/lib/openstudio/helpers/string.rb +1 -1
- data/{spec/openstudio/server_api_spec.rb → lib/openstudio/helpers/utils.rb} +26 -28
- data/lib/openstudio/weather/epw.rb +1 -1
- data/openstudio-analysis.gemspec +17 -14
- data/update_license.rb +3 -3
- metadata +57 -194
- data/spec/files/0_1_09_no_variables.xlsx +0 -0
- data/spec/files/0_1_09_outputvars.xlsx +0 -0
- data/spec/files/0_1_09_setup_version_2.xlsx +0 -0
- data/spec/files/0_1_09_small_list.xlsx +0 -0
- data/spec/files/0_1_09_small_list_incomplete.xlsx +0 -0
- data/spec/files/0_1_09_small_list_repeat_vars.xlsx +0 -0
- data/spec/files/0_1_09_small_list_validation_errors.xlsx +0 -0
- data/spec/files/0_1_10_proxy.xlsx +0 -0
- data/spec/files/0_1_10_proxy_user.xlsx +0 -0
- data/spec/files/0_1_10_template_input.xlsx +0 -0
- data/spec/files/0_1_11_discrete_variables.xlsx +0 -0
- data/spec/files/0_1_12_discrete_dynamic_columns.xlsx +0 -0
- data/spec/files/0_2_0_template.xlsx +0 -0
- data/spec/files/0_2_0_template_simpletest.xlsx +0 -0
- data/spec/files/0_3_0_dynamic_uuids.xlsx +0 -0
- data/spec/files/0_3_0_measure_existence.xlsx +0 -0
- data/spec/files/0_3_0_outputs.xlsx +0 -0
- data/spec/files/0_3_3_short_names.xlsx +0 -0
- data/spec/files/0_3_5_multiple_measure_paths.xlsx +0 -0
- data/spec/files/0_3_7_unique_measure_names.xlsx +0 -0
- data/spec/files/0_3_7_worker_init_final.xlsx +0 -0
- data/spec/files/0_4_0_lhs_discrete_continuous.xlsx +0 -0
- data/spec/files/0_4_0_multiple_seeds.xlsx +0 -0
- data/spec/files/0_4_0_pivot_test.xlsx +0 -0
- data/spec/files/analysis/examples/discrete_lhs_example.json +0 -809
- data/spec/files/analysis/examples/medium_office_example.json +0 -1674
- data/spec/files/analysis/examples/medium_office_workflow.json +0 -1298
- data/spec/files/measures/ActualMeasureNoJson/measure.rb +0 -80
- data/spec/files/measures/ActualMeasureNoJson/measure.xml +0 -2
- data/spec/files/measures/ExampleMeasure/measure.json +0 -3
- data/spec/files/measures/ExampleMeasure/measure.rb +0 -5
- data/spec/files/measures/ExampleMeasure/measure.xml +0 -1
- data/spec/files/measures/IncreaseInsulationRValueForRoofs/measure.json +0 -36
- data/spec/files/measures/IncreaseInsulationRValueForRoofs/measure.rb +0 -22
- data/spec/files/measures/IncreaseInsulationRValueForRoofs/measure.xml +0 -5
- data/spec/files/measures/NoMeasureRbFile/.gitkeep +0 -0
- data/spec/files/measures/ReduceLightingLoadsByPercentage/measure.json +0 -3
- data/spec/files/measures/ReduceLightingLoadsByPercentage/measure.rb +0 -5
- data/spec/files/measures/ReduceLightingLoadsByPercentage/measure.xml +0 -1
- data/spec/files/measures/SetThermostatSchedules/measure.json +0 -63
- data/spec/files/measures/SetThermostatSchedules/measure.rb +0 -254
- data/spec/files/measures/SetThermostatSchedules/measure.xml +0 -2
- data/spec/files/measures/example_measure_auto_directory_name/measure.json +0 -3
- data/spec/files/measures/example_measure_auto_directory_name/measure.rb +0 -5
- data/spec/files/measures/example_measure_auto_directory_name/measure.xml +0 -1
- data/spec/files/measures/reduce_lighting_loads_by_percentage/measure.json +0 -3
- data/spec/files/measures/reduce_lighting_loads_by_percentage/measure.rb +0 -5
- data/spec/files/measures/reduce_lighting_loads_by_percentage/measure.xml +0 -1
- data/spec/files/measures/reduce_space_infiltration_by_percentage/measure.rb +0 -5
- data/spec/files/measures/reduce_space_infiltration_by_percentage/measure.xml +0 -1
- data/spec/files/measures/rotate_building/measure.rb +0 -5
- data/spec/files/measures/rotate_building/measure.xml +0 -1
- data/spec/files/measures/set_window_to_wall_ratio_by_facade/measure.rb +0 -5
- data/spec/files/measures/set_window_to_wall_ratio_by_facade/measure.xml +0 -1
- data/spec/files/measures_second_path/measure_in_another_dir/measure.json +0 -3
- data/spec/files/measures_second_path/measure_in_another_dir/measure.rb +0 -5
- data/spec/files/measures_second_path/measure_in_another_dir/measure.xml +0 -1
- data/spec/files/partial_weather.epw +0 -32
- data/spec/files/partial_weather_2.epw +0 -32
- data/spec/files/small_seed.osm +0 -4622
- data/spec/files/worker_init/first_file.rb +0 -15
- data/spec/files/worker_init/second_file.sh +0 -4
- data/spec/files/workflow/analysis.osa +0 -1334
- data/spec/files/workflow/datapoint_0.osd +0 -65
- data/spec/files/workflow/datapoint_1.osd +0 -65
- data/spec/files/workflow/datapoint_2.osd +0 -65
- data/spec/files/workflow/datapoint_wrong_osa_id.osd +0 -65
- data/spec/integration/server_api_spec.rb +0 -83
- data/spec/openstudio/excel_spec.rb +0 -606
- data/spec/openstudio/formulation_spec.rb +0 -200
- data/spec/openstudio/hash_spec.rb +0 -56
- data/spec/openstudio/osw_spec.rb +0 -129
- data/spec/openstudio/string_spec.rb +0 -34
- data/spec/openstudio/support_files_spec.rb +0 -89
- data/spec/openstudio/weather_spec.rb +0 -80
- data/spec/openstudio/workflow_spec.rb +0 -126
- data/spec/openstudio/workflow_step_spec.rb +0 -158
- data/spec/schema/osa.json +0 -613
- data/spec/schema/osa.png +0 -0
- data/spec/schema/osd.json +0 -110
- data/spec/schema/osd.png +0 -0
- data/spec/spec_helper.rb +0 -56
@@ -1,5 +1,5 @@
|
|
1
1
|
# *******************************************************************************
|
2
|
-
# OpenStudio(R), Copyright (c) 2008-
|
2
|
+
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
|
3
3
|
# All rights reserved.
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
5
5
|
# modification, are permitted provided that the following conditions are met:
|
@@ -60,7 +60,7 @@ module OpenStudio
|
|
60
60
|
@name = ''
|
61
61
|
@display_name = ''
|
62
62
|
|
63
|
-
# The type of item being added (
|
63
|
+
# The type of item being added (ModelMeasure, EnergyPlusMeasure, ...)
|
64
64
|
@type = nil
|
65
65
|
|
66
66
|
@measure_definition_class_name = nil
|
@@ -267,15 +267,12 @@ module OpenStudio
|
|
267
267
|
#
|
268
268
|
# @param instance_name [String] Machine name of the instance
|
269
269
|
# @param instance_display_name [String] Display name of the instance
|
270
|
-
# @param path_to_measure [String] This is the local path to the measure
|
271
|
-
# @param hash [Hash] Measure hash in the format of
|
270
|
+
# @param path_to_measure [String] This is the local path to the measure directory, relative or absolute. It is used when zipping up all the measures.
|
271
|
+
# @param hash [Hash] Measure hash in the format of a converted measure.xml hash (from the Analysis Spreadsheet project)
|
272
272
|
# @param options [Hash] Optional arguments
|
273
273
|
# @option options [Boolean] :ignore_not_found Do not raise an exception if the measure could not be found on the machine
|
274
274
|
# @return [Object] Returns the OpenStudio::Analysis::WorkflowStep
|
275
275
|
def self.from_measure_hash(instance_name, instance_display_name, path_to_measure, hash, options = {})
|
276
|
-
# TODO: Validate the hash
|
277
|
-
# TODO: validate that the measure exists?
|
278
|
-
|
279
276
|
if File.directory? path_to_measure
|
280
277
|
path_to_measure = File.join(path_to_measure, 'measure.rb')
|
281
278
|
end
|
@@ -312,40 +309,36 @@ module OpenStudio
|
|
312
309
|
# do not allow the choice variable_type
|
313
310
|
|
314
311
|
s.type = hash[:measure_type] # this is actually the measure type
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
var_type = arg[:variable_type] ? arg[:variable_type].downcase : arg[:value_type]
|
319
|
-
|
320
|
-
if var_type == 'choice'
|
321
|
-
# WARN the user that the measure had a "choice data type"
|
322
|
-
var_type = 'string'
|
323
|
-
end
|
312
|
+
hash[:arguments]&.each do |arg|
|
313
|
+
# warn the user to we need to deprecate variable_type and use value_type (which is what os server uses)
|
314
|
+
var_type = arg[:variable_type] ? arg[:variable_type].downcase : arg[:value_type]
|
324
315
|
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
name: arg[:name],
|
329
|
-
value_type: var_type,
|
330
|
-
default_value: arg[:default_value],
|
331
|
-
value: arg[:default_value]
|
332
|
-
}
|
316
|
+
if var_type == 'choice'
|
317
|
+
# WARN the user that the measure had a "choice data type"
|
318
|
+
var_type = 'string'
|
333
319
|
end
|
320
|
+
|
321
|
+
s.arguments << {
|
322
|
+
display_name: arg[:display_name],
|
323
|
+
display_name_short: arg[:display_name_short],
|
324
|
+
name: arg[:name],
|
325
|
+
value_type: var_type,
|
326
|
+
default_value: arg[:default_value],
|
327
|
+
value: arg[:default_value]
|
328
|
+
}
|
334
329
|
end
|
335
330
|
|
336
331
|
# Load the arguments of variables, but do not make them variables. This format is more about arugments, than variables
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
}
|
348
|
-
end
|
332
|
+
hash[:variables]&.each do |variable|
|
333
|
+
# add the arguments first
|
334
|
+
s.arguments << {
|
335
|
+
display_name: variable[:argument][:display_name],
|
336
|
+
display_name_short: variable[:argument][:display_name_short],
|
337
|
+
name: variable[:argument][:name],
|
338
|
+
value_type: variable[:argument][:value_type],
|
339
|
+
default_value: variable[:argument][:default_value],
|
340
|
+
value: variable[:argument][:default_value]
|
341
|
+
}
|
349
342
|
end
|
350
343
|
|
351
344
|
s
|
@@ -356,7 +349,7 @@ module OpenStudio
|
|
356
349
|
# @param instance_name [String] Machine name of the instance
|
357
350
|
# @param instance_display_name [String] Display name of the instance
|
358
351
|
# @param path_to_measure [String] This is the local path to the measure directroy, relative or absolute. It is used when zipping up all the measures.
|
359
|
-
# @param hash [Hash] Measure hash in the format of the measure.
|
352
|
+
# @param hash [Hash] Measure hash in the format of the measure.xml converted to JSON (from the Analysis Spreadsheet project)
|
360
353
|
# @param options [Hash] Optional arguments
|
361
354
|
# @option options [Boolean] :ignore_not_found Do not raise an exception if the measure could not be found on the machine
|
362
355
|
# @return [Object] Returns the OpenStudio::Analysis::WorkflowStep
|
@@ -398,51 +391,47 @@ module OpenStudio
|
|
398
391
|
s.measure_definition_version_uuid = hash[:measure_definition_version_uuid]
|
399
392
|
|
400
393
|
s.type = hash[:measure_type] # this is actually the measure type
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
var_type = arg[:value_type]
|
405
|
-
|
406
|
-
if var_type == 'choice'
|
407
|
-
# WARN the user that the measure had a "choice data type"
|
408
|
-
var_type = 'string'
|
409
|
-
end
|
394
|
+
hash[:arguments]&.each do |arg|
|
395
|
+
# warn the user to we need to deprecate variable_type and use value_type (which is what os server uses)
|
396
|
+
var_type = arg[:value_type]
|
410
397
|
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
name: arg[:name],
|
415
|
-
value_type: var_type,
|
416
|
-
default_value: arg[:default_value],
|
417
|
-
value: arg[:value]
|
418
|
-
}
|
398
|
+
if var_type == 'choice'
|
399
|
+
# WARN the user that the measure had a "choice data type"
|
400
|
+
var_type = 'string'
|
419
401
|
end
|
402
|
+
|
403
|
+
s.arguments << {
|
404
|
+
display_name: arg[:display_name],
|
405
|
+
display_name_short: arg[:display_name_short],
|
406
|
+
name: arg[:name],
|
407
|
+
value_type: var_type,
|
408
|
+
default_value: arg[:default_value],
|
409
|
+
value: arg[:value]
|
410
|
+
}
|
420
411
|
end
|
421
412
|
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
s.make_variable(variable[:argument][:name], variable[:display_name], distribution, var_options)
|
445
|
-
end
|
413
|
+
hash[:variables]&.each do |variable|
|
414
|
+
# add the arguments first
|
415
|
+
s.arguments << {
|
416
|
+
display_name: variable[:argument][:display_name],
|
417
|
+
display_name_short: variable[:argument][:display_name_short],
|
418
|
+
name: variable[:argument][:name],
|
419
|
+
value_type: variable[:argument][:value_type],
|
420
|
+
default_value: variable[:argument][:default_value],
|
421
|
+
value: variable[:argument][:default_value]
|
422
|
+
}
|
423
|
+
|
424
|
+
var_options = {}
|
425
|
+
var_options[:variable_type] = variable[:variable_type]
|
426
|
+
var_options[:variable_display_name_short] = variable[:display_name_short]
|
427
|
+
var_options[:static_value] = variable[:static_value]
|
428
|
+
distribution = variable[:uncertainty_description]
|
429
|
+
distribution[:minimum] = variable[:minimum]
|
430
|
+
distribution[:mean] = distribution[:attributes].find { |a| a[:name] == 'modes' }[:value]
|
431
|
+
distribution[:maximum] = variable[:maximum]
|
432
|
+
distribution[:standard_deviation] = distribution[:attributes].find { |a| a[:name] == 'stddev' }[:value]
|
433
|
+
distribution[:step_size] = distribution[:attributes].find { |a| a[:name] == 'delta_x' }[:value]
|
434
|
+
s.make_variable(variable[:argument][:name], variable[:display_name], distribution, var_options)
|
446
435
|
end
|
447
436
|
|
448
437
|
s
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# *******************************************************************************
|
2
|
-
# OpenStudio(R), Copyright (c) 2008-
|
2
|
+
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
|
3
3
|
# All rights reserved.
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
5
5
|
# modification, are permitted provided that the following conditions are met:
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# *******************************************************************************
|
2
|
-
# OpenStudio(R), Copyright (c) 2008-
|
2
|
+
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
|
3
3
|
# All rights reserved.
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
5
5
|
# modification, are permitted provided that the following conditions are met:
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# *******************************************************************************
|
2
|
-
# OpenStudio(R), Copyright (c) 2008-
|
2
|
+
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
|
3
3
|
# All rights reserved.
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
5
5
|
# modification, are permitted provided that the following conditions are met:
|
@@ -33,36 +33,34 @@
|
|
33
33
|
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
34
34
|
# *******************************************************************************
|
35
35
|
|
36
|
-
require '
|
36
|
+
require 'rexml/document'
|
37
37
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
context 'create a new object instance' do
|
44
|
-
before(:all) do
|
45
|
-
@api = OpenStudio::Analysis::ServerApi.new
|
46
|
-
end
|
38
|
+
def parse_measure_xml(measure_xml_filename)
|
39
|
+
measure_hash = {}
|
40
|
+
xml_to_parse = File.open(measure_xml_filename)
|
41
|
+
xml_root = REXML::Document.new(xml_to_parse).root
|
47
42
|
|
48
|
-
|
49
|
-
|
50
|
-
|
43
|
+
# pull out some information
|
44
|
+
measure_hash[:classname] = xml_root.elements['//measure/class_name'].text
|
45
|
+
measure_hash[:name] = xml_root.elements['//measure/name'].text
|
46
|
+
measure_hash[:display_name] = xml_root.elements['//measure/display_name'].text
|
47
|
+
measure_hash[:display_name_titleized] = measure_hash[:name].titleize
|
48
|
+
measure_hash[:measure_type] = xml_root.elements['//measure/attributes/attribute[name="Measure Type"]/value'].text
|
49
|
+
measure_hash[:description] = xml_root.elements['//measure/description'].text
|
50
|
+
measure_hash[:modeler_description] = xml_root.elements['//measure/modeler_description'].text
|
51
|
+
measure_hash[:uid] = xml_root.elements['//measure/uid'].text
|
52
|
+
measure_hash[:version_id] = xml_root.elements['//measure/version_id'].text
|
53
|
+
measure_hash[:arguments] = []
|
51
54
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
55
|
+
REXML::XPath.each(xml_root, '//measure/arguments/argument') do |arg|
|
56
|
+
measure_hash[:arguments] << {
|
57
|
+
name: arg.elements['name'].text,
|
58
|
+
display_name: arg.elements['display_name'].text,
|
59
|
+
variable_type: arg.elements['type'].text.downcase,
|
60
|
+
default_value: arg.elements['default_value'].text,
|
61
|
+
units: arg.elements['units'] ? arg.elements['units'].text : ''
|
62
|
+
}
|
59
63
|
end
|
60
64
|
|
61
|
-
|
62
|
-
it 'should have a not localhost URL' do
|
63
|
-
options = { hostname: 'http://abc.def.ghi' }
|
64
|
-
api = OpenStudio::Analysis::ServerApi.new(options)
|
65
|
-
expect(api.hostname).to eq(options[:hostname])
|
66
|
-
end
|
67
|
-
end
|
65
|
+
measure_hash
|
68
66
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# *******************************************************************************
|
2
|
-
# OpenStudio(R), Copyright (c) 2008-
|
2
|
+
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
|
3
3
|
# All rights reserved.
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
5
5
|
# modification, are permitted provided that the following conditions are met:
|
data/openstudio-analysis.gemspec
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
lib = File.expand_path('lib', __dir__)
|
2
|
-
$LOAD_PATH.unshift
|
3
|
-
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
3
|
require 'openstudio/analysis/version'
|
5
4
|
|
6
5
|
Gem::Specification.new do |s|
|
@@ -9,26 +8,30 @@ Gem::Specification.new do |s|
|
|
9
8
|
s.platform = Gem::Platform::RUBY
|
10
9
|
s.authors = ['Nicholas Long']
|
11
10
|
s.email = ['Nicholas.Long@nrel.gov']
|
11
|
+
|
12
12
|
s.homepage = 'http://openstudio.nrel.gov'
|
13
13
|
s.summary = 'Create JSON, ZIP to communicate with OpenStudio Distributed Analysis in the Cloud'
|
14
14
|
s.description = 'Basic classes for generating the files needed for OpenStudio-Server'
|
15
15
|
s.license = 'BSD'
|
16
16
|
|
17
|
-
s.
|
18
|
-
|
19
|
-
|
20
|
-
s.
|
21
|
-
s.executables
|
22
|
-
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
17
|
+
s.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
|
+
f.match(%r{^(test|spec|features)/})
|
19
|
+
end
|
20
|
+
s.bindir = 'exe'
|
21
|
+
s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
22
|
s.require_paths = ['lib']
|
24
23
|
|
25
|
-
s.
|
24
|
+
s.required_ruby_version = '~> 2.5.0'
|
25
|
+
|
26
|
+
s.add_dependency 'bcl', '~> 0.6.1'
|
26
27
|
s.add_dependency 'dencity', '~> 0.1.0'
|
27
|
-
s.add_dependency 'faraday', '~> 0.
|
28
|
-
s.add_dependency '
|
29
|
-
s.add_dependency '
|
30
|
-
s.add_dependency 'rubyzip', '~> 1.2'
|
28
|
+
s.add_dependency 'faraday', '~> 1.0.1'
|
29
|
+
s.add_dependency 'roo', '~> 2.8.3'
|
30
|
+
s.add_dependency 'rubyzip', '~> 2.3.0'
|
31
31
|
s.add_dependency 'semantic', '~> 1.4'
|
32
32
|
|
33
|
-
s.add_development_dependency 'rake', '~>
|
33
|
+
s.add_development_dependency 'rake', '~> 13.0'
|
34
|
+
s.add_development_dependency 'rspec', '~> 3.9'
|
35
|
+
s.add_development_dependency 'rubocop', '~> 0.54.0'
|
36
|
+
s.add_development_dependency 'rubocop-checkstyle_formatter', '~> 0.4.0'
|
34
37
|
end
|
data/update_license.rb
CHANGED
@@ -6,7 +6,7 @@ js_regex = /^\/\* @preserve.*Copyright.*license.{2}\*\//m
|
|
6
6
|
|
7
7
|
ruby_header_text = <<EOT
|
8
8
|
# *******************************************************************************
|
9
|
-
# OpenStudio(R), Copyright (c) 2008-
|
9
|
+
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
|
10
10
|
# All rights reserved.
|
11
11
|
# Redistribution and use in source and binary forms, with or without
|
12
12
|
# modification, are permitted provided that the following conditions are met:
|
@@ -45,7 +45,7 @@ ruby_header_text.strip!
|
|
45
45
|
erb_header_text = <<EOT
|
46
46
|
<%
|
47
47
|
# *******************************************************************************
|
48
|
-
# OpenStudio(R), Copyright (c) 2008-
|
48
|
+
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
|
49
49
|
# All rights reserved.
|
50
50
|
# Redistribution and use in source and binary forms, with or without
|
51
51
|
# modification, are permitted provided that the following conditions are met:
|
@@ -84,7 +84,7 @@ erb_header_text.strip!
|
|
84
84
|
|
85
85
|
js_header_text = <<EOT
|
86
86
|
/* @preserve
|
87
|
-
* OpenStudio(R), Copyright (c) 2008-
|
87
|
+
* OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC. All rights reserved.
|
88
88
|
* Use of this source code is governed by a BSD-style license that can be found at openstudio.net/license.
|
89
89
|
*/
|
90
90
|
EOT
|
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.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicholas Long
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bcl
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.6.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.6.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: dencity
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,84 +44,112 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 1.0.1
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 1.0.1
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: roo
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 2.8.3
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 2.8.3
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: rubyzip
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 2.
|
75
|
+
version: 2.3.0
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 2.
|
82
|
+
version: 2.3.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: semantic
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '1.
|
89
|
+
version: '1.4'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '1.
|
96
|
+
version: '1.4'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: rake
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
104
|
-
type: :
|
103
|
+
version: '13.0'
|
104
|
+
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
110
|
+
version: '13.0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: rspec
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
117
|
+
version: '3.9'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
124
|
+
version: '3.9'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rubocop
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 0.54.0
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 0.54.0
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rubocop-checkstyle_formatter
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 0.4.0
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 0.4.0
|
125
153
|
description: Basic classes for generating the files needed for OpenStudio-Server
|
126
154
|
email:
|
127
155
|
- Nicholas.Long@nrel.gov
|
@@ -152,91 +180,9 @@ files:
|
|
152
180
|
- lib/openstudio/analysis/workflow_step.rb
|
153
181
|
- lib/openstudio/helpers/hash.rb
|
154
182
|
- lib/openstudio/helpers/string.rb
|
183
|
+
- lib/openstudio/helpers/utils.rb
|
155
184
|
- lib/openstudio/weather/epw.rb
|
156
185
|
- openstudio-analysis.gemspec
|
157
|
-
- spec/files/0_1_09_no_variables.xlsx
|
158
|
-
- spec/files/0_1_09_outputvars.xlsx
|
159
|
-
- spec/files/0_1_09_setup_version_2.xlsx
|
160
|
-
- spec/files/0_1_09_small_list.xlsx
|
161
|
-
- spec/files/0_1_09_small_list_incomplete.xlsx
|
162
|
-
- spec/files/0_1_09_small_list_repeat_vars.xlsx
|
163
|
-
- spec/files/0_1_09_small_list_validation_errors.xlsx
|
164
|
-
- spec/files/0_1_10_proxy.xlsx
|
165
|
-
- spec/files/0_1_10_proxy_user.xlsx
|
166
|
-
- spec/files/0_1_10_template_input.xlsx
|
167
|
-
- spec/files/0_1_11_discrete_variables.xlsx
|
168
|
-
- spec/files/0_1_12_discrete_dynamic_columns.xlsx
|
169
|
-
- spec/files/0_2_0_template.xlsx
|
170
|
-
- spec/files/0_2_0_template_simpletest.xlsx
|
171
|
-
- spec/files/0_3_0_dynamic_uuids.xlsx
|
172
|
-
- spec/files/0_3_0_measure_existence.xlsx
|
173
|
-
- spec/files/0_3_0_outputs.xlsx
|
174
|
-
- spec/files/0_3_3_short_names.xlsx
|
175
|
-
- spec/files/0_3_5_multiple_measure_paths.xlsx
|
176
|
-
- spec/files/0_3_7_unique_measure_names.xlsx
|
177
|
-
- spec/files/0_3_7_worker_init_final.xlsx
|
178
|
-
- spec/files/0_4_0_lhs_discrete_continuous.xlsx
|
179
|
-
- spec/files/0_4_0_multiple_seeds.xlsx
|
180
|
-
- spec/files/0_4_0_pivot_test.xlsx
|
181
|
-
- spec/files/analysis/examples/discrete_lhs_example.json
|
182
|
-
- spec/files/analysis/examples/medium_office_example.json
|
183
|
-
- spec/files/analysis/examples/medium_office_workflow.json
|
184
|
-
- spec/files/measures/ActualMeasureNoJson/measure.rb
|
185
|
-
- spec/files/measures/ActualMeasureNoJson/measure.xml
|
186
|
-
- spec/files/measures/ExampleMeasure/measure.json
|
187
|
-
- spec/files/measures/ExampleMeasure/measure.rb
|
188
|
-
- spec/files/measures/ExampleMeasure/measure.xml
|
189
|
-
- spec/files/measures/IncreaseInsulationRValueForRoofs/measure.json
|
190
|
-
- spec/files/measures/IncreaseInsulationRValueForRoofs/measure.rb
|
191
|
-
- spec/files/measures/IncreaseInsulationRValueForRoofs/measure.xml
|
192
|
-
- spec/files/measures/NoMeasureRbFile/.gitkeep
|
193
|
-
- spec/files/measures/ReduceLightingLoadsByPercentage/measure.json
|
194
|
-
- spec/files/measures/ReduceLightingLoadsByPercentage/measure.rb
|
195
|
-
- spec/files/measures/ReduceLightingLoadsByPercentage/measure.xml
|
196
|
-
- spec/files/measures/SetThermostatSchedules/measure.json
|
197
|
-
- spec/files/measures/SetThermostatSchedules/measure.rb
|
198
|
-
- spec/files/measures/SetThermostatSchedules/measure.xml
|
199
|
-
- spec/files/measures/example_measure_auto_directory_name/measure.json
|
200
|
-
- spec/files/measures/example_measure_auto_directory_name/measure.rb
|
201
|
-
- spec/files/measures/example_measure_auto_directory_name/measure.xml
|
202
|
-
- spec/files/measures/reduce_lighting_loads_by_percentage/measure.json
|
203
|
-
- spec/files/measures/reduce_lighting_loads_by_percentage/measure.rb
|
204
|
-
- spec/files/measures/reduce_lighting_loads_by_percentage/measure.xml
|
205
|
-
- spec/files/measures/reduce_space_infiltration_by_percentage/measure.rb
|
206
|
-
- spec/files/measures/reduce_space_infiltration_by_percentage/measure.xml
|
207
|
-
- spec/files/measures/rotate_building/measure.rb
|
208
|
-
- spec/files/measures/rotate_building/measure.xml
|
209
|
-
- spec/files/measures/set_window_to_wall_ratio_by_facade/measure.rb
|
210
|
-
- spec/files/measures/set_window_to_wall_ratio_by_facade/measure.xml
|
211
|
-
- spec/files/measures_second_path/measure_in_another_dir/measure.json
|
212
|
-
- spec/files/measures_second_path/measure_in_another_dir/measure.rb
|
213
|
-
- spec/files/measures_second_path/measure_in_another_dir/measure.xml
|
214
|
-
- spec/files/partial_weather.epw
|
215
|
-
- spec/files/partial_weather_2.epw
|
216
|
-
- spec/files/small_seed.osm
|
217
|
-
- spec/files/worker_init/first_file.rb
|
218
|
-
- spec/files/worker_init/second_file.sh
|
219
|
-
- spec/files/workflow/analysis.osa
|
220
|
-
- spec/files/workflow/datapoint_0.osd
|
221
|
-
- spec/files/workflow/datapoint_1.osd
|
222
|
-
- spec/files/workflow/datapoint_2.osd
|
223
|
-
- spec/files/workflow/datapoint_wrong_osa_id.osd
|
224
|
-
- spec/integration/server_api_spec.rb
|
225
|
-
- spec/openstudio/excel_spec.rb
|
226
|
-
- spec/openstudio/formulation_spec.rb
|
227
|
-
- spec/openstudio/hash_spec.rb
|
228
|
-
- spec/openstudio/osw_spec.rb
|
229
|
-
- spec/openstudio/server_api_spec.rb
|
230
|
-
- spec/openstudio/string_spec.rb
|
231
|
-
- spec/openstudio/support_files_spec.rb
|
232
|
-
- spec/openstudio/weather_spec.rb
|
233
|
-
- spec/openstudio/workflow_spec.rb
|
234
|
-
- spec/openstudio/workflow_step_spec.rb
|
235
|
-
- spec/schema/osa.json
|
236
|
-
- spec/schema/osa.png
|
237
|
-
- spec/schema/osd.json
|
238
|
-
- spec/schema/osd.png
|
239
|
-
- spec/spec_helper.rb
|
240
186
|
- update_license.rb
|
241
187
|
homepage: http://openstudio.nrel.gov
|
242
188
|
licenses:
|
@@ -248,102 +194,19 @@ require_paths:
|
|
248
194
|
- lib
|
249
195
|
required_ruby_version: !ruby/object:Gem::Requirement
|
250
196
|
requirements:
|
251
|
-
- - "
|
197
|
+
- - "~>"
|
252
198
|
- !ruby/object:Gem::Version
|
253
|
-
version:
|
199
|
+
version: 2.5.0
|
254
200
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
255
201
|
requirements:
|
256
202
|
- - ">="
|
257
203
|
- !ruby/object:Gem::Version
|
258
|
-
version:
|
204
|
+
version: '0'
|
259
205
|
requirements: []
|
260
206
|
rubyforge_project:
|
261
|
-
rubygems_version: 2.7.6
|
207
|
+
rubygems_version: 2.7.6.2
|
262
208
|
signing_key:
|
263
209
|
specification_version: 4
|
264
210
|
summary: Create JSON, ZIP to communicate with OpenStudio Distributed Analysis in the
|
265
211
|
Cloud
|
266
|
-
test_files:
|
267
|
-
- spec/files/0_1_09_no_variables.xlsx
|
268
|
-
- spec/files/0_1_09_outputvars.xlsx
|
269
|
-
- spec/files/0_1_09_setup_version_2.xlsx
|
270
|
-
- spec/files/0_1_09_small_list.xlsx
|
271
|
-
- spec/files/0_1_09_small_list_incomplete.xlsx
|
272
|
-
- spec/files/0_1_09_small_list_repeat_vars.xlsx
|
273
|
-
- spec/files/0_1_09_small_list_validation_errors.xlsx
|
274
|
-
- spec/files/0_1_10_proxy.xlsx
|
275
|
-
- spec/files/0_1_10_proxy_user.xlsx
|
276
|
-
- spec/files/0_1_10_template_input.xlsx
|
277
|
-
- spec/files/0_1_11_discrete_variables.xlsx
|
278
|
-
- spec/files/0_1_12_discrete_dynamic_columns.xlsx
|
279
|
-
- spec/files/0_2_0_template.xlsx
|
280
|
-
- spec/files/0_2_0_template_simpletest.xlsx
|
281
|
-
- spec/files/0_3_0_dynamic_uuids.xlsx
|
282
|
-
- spec/files/0_3_0_measure_existence.xlsx
|
283
|
-
- spec/files/0_3_0_outputs.xlsx
|
284
|
-
- spec/files/0_3_3_short_names.xlsx
|
285
|
-
- spec/files/0_3_5_multiple_measure_paths.xlsx
|
286
|
-
- spec/files/0_3_7_unique_measure_names.xlsx
|
287
|
-
- spec/files/0_3_7_worker_init_final.xlsx
|
288
|
-
- spec/files/0_4_0_lhs_discrete_continuous.xlsx
|
289
|
-
- spec/files/0_4_0_multiple_seeds.xlsx
|
290
|
-
- spec/files/0_4_0_pivot_test.xlsx
|
291
|
-
- spec/files/analysis/examples/discrete_lhs_example.json
|
292
|
-
- spec/files/analysis/examples/medium_office_example.json
|
293
|
-
- spec/files/analysis/examples/medium_office_workflow.json
|
294
|
-
- spec/files/measures/ActualMeasureNoJson/measure.rb
|
295
|
-
- spec/files/measures/ActualMeasureNoJson/measure.xml
|
296
|
-
- spec/files/measures/ExampleMeasure/measure.json
|
297
|
-
- spec/files/measures/ExampleMeasure/measure.rb
|
298
|
-
- spec/files/measures/ExampleMeasure/measure.xml
|
299
|
-
- spec/files/measures/IncreaseInsulationRValueForRoofs/measure.json
|
300
|
-
- spec/files/measures/IncreaseInsulationRValueForRoofs/measure.rb
|
301
|
-
- spec/files/measures/IncreaseInsulationRValueForRoofs/measure.xml
|
302
|
-
- spec/files/measures/NoMeasureRbFile/.gitkeep
|
303
|
-
- spec/files/measures/ReduceLightingLoadsByPercentage/measure.json
|
304
|
-
- spec/files/measures/ReduceLightingLoadsByPercentage/measure.rb
|
305
|
-
- spec/files/measures/ReduceLightingLoadsByPercentage/measure.xml
|
306
|
-
- spec/files/measures/SetThermostatSchedules/measure.json
|
307
|
-
- spec/files/measures/SetThermostatSchedules/measure.rb
|
308
|
-
- spec/files/measures/SetThermostatSchedules/measure.xml
|
309
|
-
- spec/files/measures/example_measure_auto_directory_name/measure.json
|
310
|
-
- spec/files/measures/example_measure_auto_directory_name/measure.rb
|
311
|
-
- spec/files/measures/example_measure_auto_directory_name/measure.xml
|
312
|
-
- spec/files/measures/reduce_lighting_loads_by_percentage/measure.json
|
313
|
-
- spec/files/measures/reduce_lighting_loads_by_percentage/measure.rb
|
314
|
-
- spec/files/measures/reduce_lighting_loads_by_percentage/measure.xml
|
315
|
-
- spec/files/measures/reduce_space_infiltration_by_percentage/measure.rb
|
316
|
-
- spec/files/measures/reduce_space_infiltration_by_percentage/measure.xml
|
317
|
-
- spec/files/measures/rotate_building/measure.rb
|
318
|
-
- spec/files/measures/rotate_building/measure.xml
|
319
|
-
- spec/files/measures/set_window_to_wall_ratio_by_facade/measure.rb
|
320
|
-
- spec/files/measures/set_window_to_wall_ratio_by_facade/measure.xml
|
321
|
-
- spec/files/measures_second_path/measure_in_another_dir/measure.json
|
322
|
-
- spec/files/measures_second_path/measure_in_another_dir/measure.rb
|
323
|
-
- spec/files/measures_second_path/measure_in_another_dir/measure.xml
|
324
|
-
- spec/files/partial_weather.epw
|
325
|
-
- spec/files/partial_weather_2.epw
|
326
|
-
- spec/files/small_seed.osm
|
327
|
-
- spec/files/worker_init/first_file.rb
|
328
|
-
- spec/files/worker_init/second_file.sh
|
329
|
-
- spec/files/workflow/analysis.osa
|
330
|
-
- spec/files/workflow/datapoint_0.osd
|
331
|
-
- spec/files/workflow/datapoint_1.osd
|
332
|
-
- spec/files/workflow/datapoint_2.osd
|
333
|
-
- spec/files/workflow/datapoint_wrong_osa_id.osd
|
334
|
-
- spec/integration/server_api_spec.rb
|
335
|
-
- spec/openstudio/excel_spec.rb
|
336
|
-
- spec/openstudio/formulation_spec.rb
|
337
|
-
- spec/openstudio/hash_spec.rb
|
338
|
-
- spec/openstudio/osw_spec.rb
|
339
|
-
- spec/openstudio/server_api_spec.rb
|
340
|
-
- spec/openstudio/string_spec.rb
|
341
|
-
- spec/openstudio/support_files_spec.rb
|
342
|
-
- spec/openstudio/weather_spec.rb
|
343
|
-
- spec/openstudio/workflow_spec.rb
|
344
|
-
- spec/openstudio/workflow_step_spec.rb
|
345
|
-
- spec/schema/osa.json
|
346
|
-
- spec/schema/osa.png
|
347
|
-
- spec/schema/osd.json
|
348
|
-
- spec/schema/osd.png
|
349
|
-
- spec/spec_helper.rb
|
212
|
+
test_files: []
|