openstudio-analysis 0.1.13 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/openstudio/analysis/translator/excel.rb +138 -61
- data/lib/openstudio/analysis/version.rb +1 -1
- data/lib/openstudio/templates/discrete_uncertain_variable.json.erb +15 -3
- data/lib/openstudio/templates/pivot_variable.json.erb +0 -1
- data/lib/openstudio/templates/static_variable.json.erb +0 -2
- data/lib/openstudio/templates/uncertain_variable.json.erb +4 -1
- data/spec/files/discrete_dynamic_columns.xlsx +0 -0
- data/spec/files/discrete_variables.xlsx +0 -0
- data/spec/files/export/analysis/discrete_dynamic_seed.json +445 -0
- data/spec/files/export/analysis/discrete_dynamic_seed.zip +0 -0
- data/spec/files/export/analysis/discrete_seed.json +156 -126
- data/spec/files/export/analysis/discrete_seed.zip +0 -0
- data/spec/files/export/analysis/output_vars.json +150 -121
- data/spec/files/export/analysis/output_vars.zip +0 -0
- data/spec/files/export/analysis/small_seed.json +138 -117
- data/spec/files/export/analysis/small_seed.zip +0 -0
- data/spec/files/no_variables.xlsx +0 -0
- data/spec/openstudio/analysis/translator/excel_spec.rb +66 -47
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.51.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.52.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.53.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.54.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.55.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.56.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.57.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.58.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.59.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.60.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.61.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.51.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.52.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.53.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.54.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.55.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.56.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.57.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.58.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.59.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.60.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.61.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.51.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.52.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.53.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.54.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.55.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.56.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.57.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.58.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.59.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.60.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.61.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-discrete-variables.10.xml +18 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-discrete-variables.11.xml +18 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-discrete-variables.12.xml +106 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-discrete-variables.13.xml +18 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-discrete-variables.14.xml +56 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-discrete-variables.15.xml +64 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-discrete-variables.16.xml +48 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-discrete-variables.17.xml +18 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-discrete-variables.18.xml +18 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-discrete-variables.19.xml +18 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-discrete-variables.9.xml +18 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-discrete-with-dynamic-columns.0.xml +17 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-discrete-with-dynamic-columns.1.xml +17 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-discrete-with-dynamic-columns.2.xml +17 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-discrete-with-dynamic-columns.3.xml +17 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-discrete-with-dynamic-columns.xml +25 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.51.xml +20 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.52.xml +20 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.53.xml +20 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.54.xml +20 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.55.xml +20 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.56.xml +20 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.57.xml +20 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.58.xml +20 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.59.xml +20 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.60.xml +20 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.61.xml +20 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-proxy-setup-with-user.17.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-proxy-setup-with-user.18.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-proxy-setup-with-user.19.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-proxy-setup-with-user.20.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-proxy-setup-with-user.21.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-proxy-setup-with-user.22.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-proxy-setup-with-user.23.xml +14 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-proxy-setup-with-user.24.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-proxy-setup-with-user.25.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-proxy-setup-with-user.26.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-proxy-setup-with-user.27.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-proxy-setup.23.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-proxy-setup.24.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-proxy-setup.25.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-proxy-setup.26.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-proxy-setup.27.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-proxy-setup.28.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-proxy-setup.29.xml +14 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-proxy-setup.30.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-proxy-setup.31.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-proxy-setup.32.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-proxy-setup.33.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-output-variables.10.xml +93 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-output-variables.11.xml +36 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-output-variables.12.xml +36 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-output-variables.13.xml +36 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-output-variables.3.xml +36 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-output-variables.4.xml +36 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-output-variables.5.xml +36 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-output-variables.6.xml +36 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-output-variables.7.xml +36 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-output-variables.8.xml +36 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-output-variables.9.xml +43 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-0-1-9.0.xml +21 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-0-1-9.1.xml +21 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-0-1-9.10.xml +21 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-0-1-9.2.xml +21 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-0-1-9.3.xml +21 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-0-1-9.4.xml +21 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-0-1-9.5.xml +21 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-0-1-9.6.xml +26 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-0-1-9.7.xml +50 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-0-1-9.8.xml +21 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-0-1-9.9.xml +21 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.51.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.52.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.53.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.54.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.55.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.56.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.57.xml +12 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.58.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.59.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.60.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.61.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.51.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.52.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.53.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.54.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.55.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.56.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.57.xml +13 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.58.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.59.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.60.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.61.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.51.xml +23 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.52.xml +23 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.53.xml +23 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.54.xml +23 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.55.xml +23 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.56.xml +23 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.57.xml +30 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.58.xml +52 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.59.xml +23 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.60.xml +23 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.61.xml +23 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.51.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.52.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.53.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.54.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.55.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.56.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.57.xml +16 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.58.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.59.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.60.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.61.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-version-0-1-10.0.xml +13 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-version-0-1-10.1.xml +13 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-version-0-1-10.10.xml +13 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-version-0-1-10.2.xml +13 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-version-0-1-10.3.xml +13 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-version-0-1-10.4.xml +13 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-version-0-1-10.5.xml +13 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-version-0-1-10.6.xml +18 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-version-0-1-10.7.xml +13 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-version-0-1-10.8.xml +13 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-version-0-1-10.9.xml +13 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.51.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.52.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.53.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.54.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.55.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.56.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.57.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.58.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.59.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.60.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.61.xml +7 -0
- metadata +348 -2
|
Binary file
|
|
Binary file
|
|
@@ -3,69 +3,69 @@ require 'spec_helper'
|
|
|
3
3
|
describe OpenStudio::Analysis::Translator::Excel do
|
|
4
4
|
context "no variables defined" do
|
|
5
5
|
let(:path) { "spec/files/no_variables.xlsx" }
|
|
6
|
-
|
|
6
|
+
|
|
7
7
|
before(:each) do
|
|
8
8
|
@excel = OpenStudio::Analysis::Translator::Excel.new(path)
|
|
9
9
|
end
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
it "should have measure path" do
|
|
12
12
|
expect(@excel.measure_path).to eq("./measures")
|
|
13
13
|
end
|
|
14
|
-
|
|
14
|
+
|
|
15
15
|
it "should have excel data" do
|
|
16
16
|
puts @excel
|
|
17
17
|
expect(@excel).not_to be_nil
|
|
18
18
|
end
|
|
19
|
-
|
|
19
|
+
|
|
20
20
|
it "should process the excel file" do
|
|
21
21
|
expect(@excel.process).to eq(true)
|
|
22
|
-
|
|
22
|
+
|
|
23
23
|
# after processing the measures directory should be what is in the excel file
|
|
24
24
|
expect(@excel.measure_path).to eq(File.expand_path(File.join("spec", "files", "measures")))
|
|
25
25
|
end
|
|
26
|
-
|
|
26
|
+
|
|
27
27
|
it "should not work because no variables defined" do
|
|
28
28
|
#old_path = @excel.measure_path
|
|
29
29
|
#@excel.measure_path = "path/does/not/exist"
|
|
30
30
|
#
|
|
31
31
|
end
|
|
32
|
-
|
|
32
|
+
|
|
33
33
|
it "should not export to a JSON" do
|
|
34
34
|
@excel.process
|
|
35
35
|
expect { @excel.save_analysis }.to raise_error("Argument 'r_value' did not process. Most likely it did not have all parameters defined.")
|
|
36
36
|
end
|
|
37
37
|
end
|
|
38
|
-
|
|
38
|
+
|
|
39
39
|
context "small list of incomplete variables" do
|
|
40
40
|
before(:all) do
|
|
41
41
|
@excel = OpenStudio::Analysis::Translator::Excel.new("spec/files/small_list_incomplete.xlsx")
|
|
42
42
|
end
|
|
43
|
-
|
|
43
|
+
|
|
44
44
|
it "should fail to process" do
|
|
45
45
|
expect { @excel.process }.to raise_error("Variable adjust_thermostat_setpoints_by_degrees:cooling_adjustment must have a mean")
|
|
46
46
|
end
|
|
47
47
|
end
|
|
48
|
-
|
|
48
|
+
|
|
49
49
|
context "small list with with repeated variable names" do
|
|
50
50
|
before(:all) do
|
|
51
51
|
@excel = OpenStudio::Analysis::Translator::Excel.new("spec/files/small_list_repeat_vars.xlsx")
|
|
52
52
|
end
|
|
53
|
-
|
|
53
|
+
|
|
54
54
|
it "should fail to process" do
|
|
55
55
|
expect { @excel.process }.to raise_error("duplicate variable names found in list [\"Insulation R-value (ft^2*h*R/Btu).\"]")
|
|
56
56
|
end
|
|
57
57
|
end
|
|
58
|
-
|
|
58
|
+
|
|
59
59
|
context "small list of variables should not validate" do
|
|
60
60
|
before(:all) do
|
|
61
61
|
@excel = OpenStudio::Analysis::Translator::Excel.new("spec/files/small_list_validation_errors.xlsx")
|
|
62
62
|
end
|
|
63
|
-
|
|
63
|
+
|
|
64
64
|
it "should fail to process" do
|
|
65
65
|
expect { @excel.process }.to raise_error("Variable min is greater than variable max for adjust_thermostat_setpoints_by_degrees:heating_adjustment")
|
|
66
66
|
end
|
|
67
67
|
end
|
|
68
|
-
|
|
68
|
+
|
|
69
69
|
context "small list of variables" do
|
|
70
70
|
before(:all) do
|
|
71
71
|
@excel = OpenStudio::Analysis::Translator::Excel.new("spec/files/small_list.xlsx")
|
|
@@ -75,13 +75,13 @@ describe OpenStudio::Analysis::Translator::Excel do
|
|
|
75
75
|
expect(@excel.models.first).not_to be_nil
|
|
76
76
|
expect(@excel.models.first[:name]).to eq("small_seed")
|
|
77
77
|
end
|
|
78
|
-
|
|
78
|
+
|
|
79
79
|
it "should have a weather file" do
|
|
80
80
|
expect(@excel.weather_files.first).not_to be_nil
|
|
81
81
|
puts @excel.weather_files.first
|
|
82
82
|
expect(@excel.weather_files.first.include?("partial_weather.epw")).to eq(true)
|
|
83
83
|
end
|
|
84
|
-
|
|
84
|
+
|
|
85
85
|
it "should have notes and source" do
|
|
86
86
|
@excel.variables['data'].each do |measure|
|
|
87
87
|
measure['variables'].each do |var|
|
|
@@ -93,23 +93,23 @@ describe OpenStudio::Analysis::Translator::Excel do
|
|
|
93
93
|
end
|
|
94
94
|
end
|
|
95
95
|
end
|
|
96
|
-
|
|
96
|
+
|
|
97
97
|
it "should write a json" do
|
|
98
98
|
@excel.save_analysis
|
|
99
99
|
expect(File).to exist("spec/files/export/analysis/small_seed.json")
|
|
100
100
|
expect(File).to exist("spec/files/export/analysis/small_seed.zip")
|
|
101
|
-
|
|
101
|
+
|
|
102
102
|
expect(JSON.parse(File.read("spec/files/export/analysis/small_seed.json"))).not_to be_nil
|
|
103
|
-
|
|
103
|
+
|
|
104
104
|
end
|
|
105
105
|
end
|
|
106
|
-
|
|
106
|
+
|
|
107
107
|
context "setup version 0.1.9" do
|
|
108
108
|
before(:all) do
|
|
109
109
|
@excel = OpenStudio::Analysis::Translator::Excel.new("spec/files/setup_version_2.xlsx")
|
|
110
110
|
@excel.process
|
|
111
111
|
end
|
|
112
|
-
|
|
112
|
+
|
|
113
113
|
it "should have a version and machine name" do
|
|
114
114
|
expect(@excel.version).to eq("0.1.9")
|
|
115
115
|
expect(@excel.machine_name).to eq("example_analysis")
|
|
@@ -117,7 +117,7 @@ describe OpenStudio::Analysis::Translator::Excel do
|
|
|
117
117
|
it "should have the new settings" do
|
|
118
118
|
expect(@excel.settings["server_instance_type"]).to eq("m2.xlarge")
|
|
119
119
|
end
|
|
120
|
-
|
|
120
|
+
|
|
121
121
|
it "should have algorithm setup" do
|
|
122
122
|
expect(@excel.algorithm["number_of_samples"]).to eq(100)
|
|
123
123
|
expect(@excel.algorithm["number_of_generations"]).to eq(20)
|
|
@@ -125,82 +125,101 @@ describe OpenStudio::Analysis::Translator::Excel do
|
|
|
125
125
|
expect(@excel.algorithm["number_of_generations"]).to be_a Integer
|
|
126
126
|
expect(@excel.algorithm["tolerance"]).to eq(0.115)
|
|
127
127
|
expect(@excel.algorithm["tolerance"]).to be_a Float
|
|
128
|
-
|
|
128
|
+
|
|
129
129
|
end
|
|
130
|
-
|
|
130
|
+
|
|
131
131
|
it "should create a valid hash" do
|
|
132
132
|
h = @excel.create_analysis_hash
|
|
133
|
-
|
|
133
|
+
|
|
134
134
|
expect(h['analysis']['problem']['analysis_type']).to eq("lhs")
|
|
135
135
|
expect(h['analysis']['problem']['algorithm']).not_to be_nil
|
|
136
136
|
expect(h['analysis']['problem']['algorithm']['number_of_samples']).to eq(100)
|
|
137
137
|
expect(h['analysis']['problem']['algorithm']['sample_method']).to eq("all_variables")
|
|
138
138
|
end
|
|
139
139
|
end
|
|
140
|
-
|
|
140
|
+
|
|
141
141
|
context "proxy setup" do
|
|
142
142
|
before(:all) do
|
|
143
143
|
@excel = OpenStudio::Analysis::Translator::Excel.new("spec/files/proxy.xlsx")
|
|
144
144
|
@excel.process
|
|
145
145
|
end
|
|
146
|
-
|
|
146
|
+
|
|
147
147
|
it "should have a proxy setting" do
|
|
148
148
|
expect(@excel.settings["proxy_host"]).to eq("192.168.0.1")
|
|
149
149
|
expect(@excel.settings["proxy_port"]).to eq(8080)
|
|
150
150
|
expect(@excel.settings["proxy_username"]).to be_nil
|
|
151
|
-
|
|
151
|
+
|
|
152
152
|
end
|
|
153
153
|
end
|
|
154
|
-
|
|
154
|
+
|
|
155
155
|
context "proxy setup with user" do
|
|
156
156
|
before(:all) do
|
|
157
157
|
@excel = OpenStudio::Analysis::Translator::Excel.new("spec/files/proxy_user.xlsx")
|
|
158
158
|
@excel.process
|
|
159
159
|
end
|
|
160
|
-
|
|
160
|
+
|
|
161
161
|
it "should have a user" do
|
|
162
162
|
expect(@excel.settings["proxy_host"]).to eq("192.168.0.1")
|
|
163
163
|
expect(@excel.settings["proxy_port"]).to eq(8080)
|
|
164
164
|
expect(@excel.settings["proxy_username"]).to eq("a_user")
|
|
165
165
|
end
|
|
166
166
|
end
|
|
167
|
-
|
|
167
|
+
|
|
168
168
|
context "discrete variables" do
|
|
169
169
|
before(:all) do
|
|
170
170
|
@excel = OpenStudio::Analysis::Translator::Excel.new("spec/files/discrete_variables.xlsx")
|
|
171
171
|
@excel.process
|
|
172
172
|
end
|
|
173
|
-
|
|
173
|
+
|
|
174
174
|
it "should have parsed the spreadsheet" do
|
|
175
175
|
@excel.variables['data'].each do |measure|
|
|
176
176
|
measure['variables'].each do |var|
|
|
177
|
-
|
|
177
|
+
|
|
178
178
|
end
|
|
179
179
|
end
|
|
180
180
|
end
|
|
181
|
-
|
|
181
|
+
|
|
182
182
|
it "should save the file" do
|
|
183
183
|
@excel.save_analysis
|
|
184
184
|
end
|
|
185
185
|
end
|
|
186
|
-
|
|
186
|
+
|
|
187
|
+
context "discrete with dynamic columns" do
|
|
188
|
+
before(:all) do
|
|
189
|
+
@excel = OpenStudio::Analysis::Translator::Excel.new("spec/files/discrete_dynamic_columns.xlsx")
|
|
190
|
+
@excel.process
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
it "should have parsed the spreadsheet" do
|
|
194
|
+
@excel.variables['data'].each do |measure|
|
|
195
|
+
measure['variables'].each do |var|
|
|
196
|
+
puts var.inspect
|
|
197
|
+
end
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
it "should save the file" do
|
|
202
|
+
@excel.save_analysis
|
|
203
|
+
end
|
|
204
|
+
end
|
|
205
|
+
|
|
187
206
|
context "setup output variables" do
|
|
188
207
|
before(:all) do
|
|
189
208
|
@excel = OpenStudio::Analysis::Translator::Excel.new("spec/files/outputvars.xlsx")
|
|
190
209
|
@excel.process
|
|
191
210
|
end
|
|
192
|
-
|
|
211
|
+
|
|
193
212
|
it "should have a model" do
|
|
194
213
|
expect(@excel.models.first).not_to be_nil
|
|
195
214
|
expect(@excel.models.first[:name]).to eq("output_vars")
|
|
196
215
|
end
|
|
197
|
-
|
|
216
|
+
|
|
198
217
|
it "should have a weather file" do
|
|
199
218
|
expect(@excel.weather_files.first).not_to be_nil
|
|
200
219
|
puts @excel.weather_files.first
|
|
201
220
|
expect(@excel.weather_files.first.include?("partial_weather.epw")).to eq(true)
|
|
202
221
|
end
|
|
203
|
-
|
|
222
|
+
|
|
204
223
|
it "should have notes and source" do
|
|
205
224
|
@excel.variables['data'].each do |measure|
|
|
206
225
|
measure['variables'].each do |var|
|
|
@@ -212,7 +231,7 @@ describe OpenStudio::Analysis::Translator::Excel do
|
|
|
212
231
|
end
|
|
213
232
|
end
|
|
214
233
|
end
|
|
215
|
-
|
|
234
|
+
|
|
216
235
|
it "should have typed booleans" do
|
|
217
236
|
expect(@excel.run_setup['use_server_as_worker']).to eq(true)
|
|
218
237
|
expect(@excel.run_setup['allow_multiple_jobs']).to eq(true)
|
|
@@ -225,29 +244,29 @@ describe OpenStudio::Analysis::Translator::Excel do
|
|
|
225
244
|
expect(@excel.algorithm["number_of_generations"]).to be_a Integer
|
|
226
245
|
#expect(@excel.algorithm["tolerance"]).to eq(0.115)
|
|
227
246
|
#expect(@excel.algorithm["tolerance"]).to be_a Float
|
|
228
|
-
|
|
247
|
+
|
|
229
248
|
end
|
|
230
|
-
|
|
249
|
+
|
|
231
250
|
it "should create a valid hash" do
|
|
232
251
|
h = @excel.create_analysis_hash
|
|
233
|
-
|
|
252
|
+
|
|
234
253
|
expect(h['analysis']['problem']['analysis_type']).to eq("nsga")
|
|
235
254
|
expect(h['analysis']['problem']['algorithm']).not_to be_nil
|
|
236
255
|
expect(h['analysis']['problem']['algorithm']['number_of_samples']).to eq(100)
|
|
237
256
|
expect(h['analysis']['problem']['algorithm']['sample_method']).to eq("all_variables")
|
|
238
257
|
end
|
|
239
|
-
|
|
240
|
-
|
|
258
|
+
|
|
259
|
+
|
|
241
260
|
it "should write a json" do
|
|
242
261
|
@excel.save_analysis
|
|
243
262
|
expect(File).to exist("spec/files/export/analysis/output_vars.json")
|
|
244
263
|
expect(File).to exist("spec/files/export/analysis/output_vars.zip")
|
|
245
|
-
|
|
264
|
+
|
|
246
265
|
expect(JSON.parse(File.read("spec/files/export/analysis/output_vars.json"))).not_to be_nil
|
|
247
|
-
|
|
266
|
+
|
|
248
267
|
end
|
|
249
268
|
end
|
|
250
|
-
|
|
269
|
+
|
|
251
270
|
context "version 0.1.10" do
|
|
252
271
|
before(:all) do
|
|
253
272
|
@excel = OpenStudio::Analysis::Translator::Excel.new("spec/files/template_input_0.1.10.xlsx")
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<testsuite name="OpenStudio::Analysis::ServerApi create a new localhost instance" tests="1" time="0.038284" failures="0" errors="0" skipped="0" timestamp="2014-04-14T08:32:38-06:00">
|
|
3
|
+
<testcase name="OpenStudio::Analysis::ServerApi create a new localhost instance should set the default host to localhost" time="0.012044">
|
|
4
|
+
</testcase>
|
|
5
|
+
<system-out>
|
|
6
|
+
</system-out>
|
|
7
|
+
<system-err>
|
|
8
|
+
</system-err>
|
|
9
|
+
</testsuite>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<testsuite name="OpenStudio::Analysis::ServerApi create a new localhost instance" tests="1" time="0.034429" failures="0" errors="0" skipped="0" timestamp="2014-04-14T08:42:00-06:00">
|
|
3
|
+
<testcase name="OpenStudio::Analysis::ServerApi create a new localhost instance should set the default host to localhost" time="0.010309">
|
|
4
|
+
</testcase>
|
|
5
|
+
<system-out>
|
|
6
|
+
</system-out>
|
|
7
|
+
<system-err>
|
|
8
|
+
</system-err>
|
|
9
|
+
</testsuite>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<testsuite name="OpenStudio::Analysis::ServerApi create a new localhost instance" tests="1" time="0.04428" failures="0" errors="0" skipped="0" timestamp="2014-04-14T09:24:09-06:00">
|
|
3
|
+
<testcase name="OpenStudio::Analysis::ServerApi create a new localhost instance should set the default host to localhost" time="0.010393">
|
|
4
|
+
</testcase>
|
|
5
|
+
<system-out>
|
|
6
|
+
</system-out>
|
|
7
|
+
<system-err>
|
|
8
|
+
</system-err>
|
|
9
|
+
</testsuite>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<testsuite name="OpenStudio::Analysis::ServerApi create a new localhost instance" tests="1" time="0.031578" failures="0" errors="0" skipped="0" timestamp="2014-04-14T09:40:41-06:00">
|
|
3
|
+
<testcase name="OpenStudio::Analysis::ServerApi create a new localhost instance should set the default host to localhost" time="0.000554">
|
|
4
|
+
</testcase>
|
|
5
|
+
<system-out>
|
|
6
|
+
</system-out>
|
|
7
|
+
<system-err>
|
|
8
|
+
</system-err>
|
|
9
|
+
</testsuite>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<testsuite name="OpenStudio::Analysis::ServerApi create a new localhost instance" tests="1" time="0.03399" failures="0" errors="0" skipped="0" timestamp="2014-04-14T09:41:54-06:00">
|
|
3
|
+
<testcase name="OpenStudio::Analysis::ServerApi create a new localhost instance should set the default host to localhost" time="0.000645">
|
|
4
|
+
</testcase>
|
|
5
|
+
<system-out>
|
|
6
|
+
</system-out>
|
|
7
|
+
<system-err>
|
|
8
|
+
</system-err>
|
|
9
|
+
</testsuite>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<testsuite name="OpenStudio::Analysis::ServerApi create a new localhost instance" tests="1" time="0.031814" failures="0" errors="0" skipped="0" timestamp="2014-04-14T09:43:10-06:00">
|
|
3
|
+
<testcase name="OpenStudio::Analysis::ServerApi create a new localhost instance should set the default host to localhost" time="0.000544">
|
|
4
|
+
</testcase>
|
|
5
|
+
<system-out>
|
|
6
|
+
</system-out>
|
|
7
|
+
<system-err>
|
|
8
|
+
</system-err>
|
|
9
|
+
</testsuite>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<testsuite name="OpenStudio::Analysis::ServerApi create a new localhost instance" tests="1" time="0.032187" failures="0" errors="0" skipped="0" timestamp="2014-04-14T09:54:19-06:00">
|
|
3
|
+
<testcase name="OpenStudio::Analysis::ServerApi create a new localhost instance should set the default host to localhost" time="0.000515">
|
|
4
|
+
</testcase>
|
|
5
|
+
<system-out>
|
|
6
|
+
</system-out>
|
|
7
|
+
<system-err>
|
|
8
|
+
</system-err>
|
|
9
|
+
</testsuite>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<testsuite name="OpenStudio::Analysis::ServerApi create a new localhost instance" tests="1" time="0.045189" failures="0" errors="0" skipped="0" timestamp="2014-04-14T15:05:52-06:00">
|
|
3
|
+
<testcase name="OpenStudio::Analysis::ServerApi create a new localhost instance should set the default host to localhost" time="0.000869">
|
|
4
|
+
</testcase>
|
|
5
|
+
<system-out>
|
|
6
|
+
</system-out>
|
|
7
|
+
<system-err>
|
|
8
|
+
</system-err>
|
|
9
|
+
</testsuite>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<testsuite name="OpenStudio::Analysis::ServerApi create a new localhost instance" tests="1" time="0.043959" failures="0" errors="0" skipped="0" timestamp="2014-04-14T15:08:47-06:00">
|
|
3
|
+
<testcase name="OpenStudio::Analysis::ServerApi create a new localhost instance should set the default host to localhost" time="0.000944">
|
|
4
|
+
</testcase>
|
|
5
|
+
<system-out>
|
|
6
|
+
</system-out>
|
|
7
|
+
<system-err>
|
|
8
|
+
</system-err>
|
|
9
|
+
</testsuite>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<testsuite name="OpenStudio::Analysis::ServerApi create a new localhost instance" tests="1" time="0.044612" failures="0" errors="0" skipped="0" timestamp="2014-04-14T15:14:17-06:00">
|
|
3
|
+
<testcase name="OpenStudio::Analysis::ServerApi create a new localhost instance should set the default host to localhost" time="0.001034">
|
|
4
|
+
</testcase>
|
|
5
|
+
<system-out>
|
|
6
|
+
</system-out>
|
|
7
|
+
<system-err>
|
|
8
|
+
</system-err>
|
|
9
|
+
</testsuite>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<testsuite name="OpenStudio::Analysis::ServerApi create a new localhost instance" tests="1" time="0.042915" failures="0" errors="0" skipped="0" timestamp="2014-04-14T15:15:34-06:00">
|
|
3
|
+
<testcase name="OpenStudio::Analysis::ServerApi create a new localhost instance should set the default host to localhost" time="0.000791">
|
|
4
|
+
</testcase>
|
|
5
|
+
<system-out>
|
|
6
|
+
</system-out>
|
|
7
|
+
<system-err>
|
|
8
|
+
</system-err>
|
|
9
|
+
</testsuite>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<testsuite name="OpenStudio::Analysis::ServerApi test not localhost" tests="1" time="0.001167" failures="0" errors="0" skipped="0" timestamp="2014-04-14T08:32:38-06:00">
|
|
3
|
+
<testcase name="OpenStudio::Analysis::ServerApi test not localhost should have a not localhost URL" time="0.000739">
|
|
4
|
+
</testcase>
|
|
5
|
+
<system-out>
|
|
6
|
+
</system-out>
|
|
7
|
+
<system-err>
|
|
8
|
+
</system-err>
|
|
9
|
+
</testsuite>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<testsuite name="OpenStudio::Analysis::ServerApi test not localhost" tests="1" time="0.000705" failures="0" errors="0" skipped="0" timestamp="2014-04-14T08:42:00-06:00">
|
|
3
|
+
<testcase name="OpenStudio::Analysis::ServerApi test not localhost should have a not localhost URL" time="0.000424">
|
|
4
|
+
</testcase>
|
|
5
|
+
<system-out>
|
|
6
|
+
</system-out>
|
|
7
|
+
<system-err>
|
|
8
|
+
</system-err>
|
|
9
|
+
</testsuite>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<testsuite name="OpenStudio::Analysis::ServerApi test not localhost" tests="1" time="0.000655" failures="0" errors="0" skipped="0" timestamp="2014-04-14T09:24:09-06:00">
|
|
3
|
+
<testcase name="OpenStudio::Analysis::ServerApi test not localhost should have a not localhost URL" time="0.000408">
|
|
4
|
+
</testcase>
|
|
5
|
+
<system-out>
|
|
6
|
+
</system-out>
|
|
7
|
+
<system-err>
|
|
8
|
+
</system-err>
|
|
9
|
+
</testsuite>
|