openstudio-analysis 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/Rakefile +1 -1
- data/lib/openstudio/analysis/translator/excel.rb +63 -19
- data/lib/openstudio/analysis/version.rb +1 -1
- data/lib/openstudio/helpers/string.rb +5 -0
- data/lib/openstudio/templates/analysis.json.erb +5 -5
- data/spec/files/export/analysis/small_seed.json +117 -117
- data/spec/files/export/analysis/small_seed.zip +0 -0
- data/spec/files/setup_version_2.xlsx +0 -0
- data/spec/openstudio/analysis/translator/excel_spec.rb +26 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.10.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.11.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.12.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.13.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.14.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.15.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.16.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.17.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.18.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.19.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.20.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.21.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.22.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.23.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.24.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.6.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.7.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.8.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.9.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.10.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.11.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.12.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.13.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.14.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.15.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.16.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.17.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.18.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.19.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.20.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.21.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.22.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.23.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.24.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.6.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.7.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.8.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.9.xml +9 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.10.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.11.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.12.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.13.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.14.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.15.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.16.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.17.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.18.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.19.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.20.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.21.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.22.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.23.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.24.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.6.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.7.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.8.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.9.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.10.xml +22 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.11.xml +22 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.12.xml +22 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.13.xml +22 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.14.xml +22 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.15.xml +22 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.16.xml +22 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.17.xml +22 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.18.xml +22 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.19.xml +22 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.20.xml +22 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.21.xml +22 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.22.xml +22 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.23.xml +22 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.24.xml +22 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.6.xml +22 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.7.xml +22 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.8.xml +22 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.9.xml +22 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.0.xml +22 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.1.xml +24 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.10.xml +33 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.11.xml +35 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.12.xml +35 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.13.xml +35 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.14.xml +36 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.15.xml +22 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.16.xml +27 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.17.xml +26 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.2.xml +20 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.3.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.4.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.5.xml +17 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.6.xml +17 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.7.xml +33 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.8.xml +33 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.9.xml +33 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.xml +19 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.10.xml +16 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.11.xml +16 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.12.xml +16 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.13.xml +16 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.14.xml +16 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.15.xml +16 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.16.xml +16 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.17.xml +16 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.18.xml +16 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.19.xml +16 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.20.xml +16 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.21.xml +16 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.22.xml +16 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.23.xml +16 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.24.xml +16 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.6.xml +16 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.7.xml +16 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.8.xml +16 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.9.xml +16 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.10.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.11.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.12.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.13.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.14.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.15.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.16.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.17.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.18.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.19.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.20.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.21.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.22.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.23.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.24.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.6.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.7.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.8.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.9.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.10.xml +30 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.11.xml +30 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.12.xml +30 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.13.xml +30 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.14.xml +30 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.15.xml +30 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.16.xml +30 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.17.xml +30 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.18.xml +30 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.19.xml +30 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.20.xml +30 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.21.xml +30 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.22.xml +30 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.23.xml +30 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.24.xml +30 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.6.xml +30 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.7.xml +30 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.8.xml +30 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.9.xml +30 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.10.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.11.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.12.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.13.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.14.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.15.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.16.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.17.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.18.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.19.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.20.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.21.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.22.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.23.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.24.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.6.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.7.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.8.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.9.xml +15 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.10.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.11.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.12.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.13.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.14.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.15.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.16.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.17.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.18.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.19.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.20.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.21.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.22.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.23.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.24.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.6.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.7.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.8.xml +7 -0
- data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.9.xml +7 -0
- metadata +385 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ae67d42886b996287c5359e182083045cfe85b6
|
4
|
+
data.tar.gz: 89317f8592fb0d6d68be5d4d2b86fb8de0c33614
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d07df1298aeddd96b09b58a72ae55802d5badc04c194d50cac81df509dbf817b989b758a560306109d74a867ae8fd039543230f5b1edbac45870e77ad23525c7
|
7
|
+
data.tar.gz: ad4f1c8a02213360581455198bd1ffa8e19750967359ba223048b35f2a3de5296bd89e8a02de71494c2496cce8e95cfa1c277fda38caea5516e761b252c9ce75
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,17 @@
|
|
1
1
|
OpenStudio Analysis Gem Change Log
|
2
2
|
==================================
|
3
3
|
|
4
|
+
Version 0.1.7
|
5
|
+
-------------
|
6
|
+
|
7
|
+
* Add setting section
|
8
|
+
|
9
|
+
* Add problem and algorithm arguments
|
10
|
+
|
11
|
+
Version 0.1.6
|
12
|
+
-------------
|
13
|
+
|
14
|
+
* Small fixes
|
4
15
|
Version 0.1.5
|
5
16
|
-------------
|
6
17
|
|
data/Rakefile
CHANGED
@@ -28,7 +28,7 @@ task :release => :build do
|
|
28
28
|
end
|
29
29
|
|
30
30
|
RSpec::Core::RakeTask.new("spec") do |spec|
|
31
|
-
spec.rspec_opts = %w(--format progress --format CI::Reporter::RSpec)
|
31
|
+
#spec.rspec_opts = %w(--format progress --format CI::Reporter::RSpec)
|
32
32
|
spec.pattern = "spec/**/*_spec.rb"
|
33
33
|
end
|
34
34
|
|
@@ -2,20 +2,24 @@ module OpenStudio
|
|
2
2
|
module Analysis
|
3
3
|
module Translator
|
4
4
|
class Excel
|
5
|
+
attr_reader :version
|
6
|
+
attr_reader :settings
|
5
7
|
attr_reader :variables
|
6
8
|
attr_reader :models
|
7
9
|
attr_reader :weather_files
|
8
10
|
attr_reader :measure_path
|
9
11
|
attr_reader :export_path
|
10
12
|
attr_reader :variables
|
11
|
-
|
13
|
+
attr_reader :algorithm
|
14
|
+
attr_reader :problem
|
15
|
+
|
12
16
|
# remove these once we have classes to construct the JSON file
|
13
17
|
attr_reader :name
|
14
|
-
attr_reader :
|
18
|
+
attr_reader :machine_name
|
15
19
|
attr_reader :template_json
|
16
20
|
|
17
21
|
# methods to override instance variables
|
18
|
-
|
22
|
+
|
19
23
|
# pass in the filename to read
|
20
24
|
def initialize(xls_filename)
|
21
25
|
@root_path = File.expand_path(File.dirname(xls_filename))
|
@@ -29,15 +33,21 @@ module OpenStudio
|
|
29
33
|
end
|
30
34
|
|
31
35
|
# Initialize some other instance variables
|
36
|
+
@version = nil
|
37
|
+
@name = nil
|
38
|
+
@machine_name = nil
|
39
|
+
@settings = {}
|
32
40
|
@weather_files = []
|
33
41
|
@models = []
|
34
42
|
@other_files = []
|
35
43
|
@export_path = "./export"
|
36
44
|
@measure_path = "./measures"
|
37
|
-
@number_of_samples = 0
|
45
|
+
@number_of_samples = 0 # todo: remove this
|
46
|
+
@problem = {}
|
47
|
+
@algorithm = {}
|
38
48
|
@template_json = nil
|
39
49
|
end
|
40
|
-
|
50
|
+
|
41
51
|
def process
|
42
52
|
@setup = parse_setup()
|
43
53
|
@variables = parse_variables()
|
@@ -76,7 +86,7 @@ module OpenStudio
|
|
76
86
|
end
|
77
87
|
|
78
88
|
FileUtils.mkdir_p(@export_path)
|
79
|
-
|
89
|
+
|
80
90
|
# verify that all continuous variables have all the data needed and create a name maps
|
81
91
|
variable_names = []
|
82
92
|
@variables['data'].each do |measure|
|
@@ -120,7 +130,7 @@ module OpenStudio
|
|
120
130
|
if dupes.count > 0
|
121
131
|
raise "duplicate variable names found in list #{dupes.inspect}"
|
122
132
|
end
|
123
|
-
|
133
|
+
|
124
134
|
# most of the checks will raise a runtime exception, so this true will never be called
|
125
135
|
true
|
126
136
|
end
|
@@ -129,7 +139,7 @@ module OpenStudio
|
|
129
139
|
# save the format in the OpenStudio analysis json format template without
|
130
140
|
# the correct weather files or models
|
131
141
|
@template_json = translate_to_analysis_json_template()
|
132
|
-
|
142
|
+
|
133
143
|
#validate_template_json
|
134
144
|
|
135
145
|
# iterate over each model and save the zip and json
|
@@ -274,8 +284,6 @@ module OpenStudio
|
|
274
284
|
analysis_json['analysis']['seed']['path'] = "./seed/#{File.basename(model[:path])}"
|
275
285
|
|
276
286
|
# Set the weather file as the first in the list -- this is optional
|
277
|
-
# TODO: check if epw or if zip file
|
278
|
-
|
279
287
|
analysis_json['analysis']['weather_file']['file_type'] = 'EPW'
|
280
288
|
if File.extname(@weather_files.first) =~ /.zip/i
|
281
289
|
analysis_json['analysis']['weather_file']['path'] = "./weather/#{File.basename(@weather_files.first, '.zip')}.epw"
|
@@ -288,48 +296,78 @@ module OpenStudio
|
|
288
296
|
|
289
297
|
File.open("#{@export_path}/#{model[:name]}.json", "w") { |f| f << JSON.pretty_generate(analysis_json) }
|
290
298
|
end
|
291
|
-
|
299
|
+
|
292
300
|
# parse_setup will pull out the data on the "setup" tab and store it in memory for later use
|
293
301
|
def parse_setup()
|
294
302
|
rows = @xls.sheet('Setup').parse()
|
303
|
+
b_settings = false
|
295
304
|
b_run_setup = false
|
296
305
|
b_problem_setup = false
|
306
|
+
b_algorithm_setup = false
|
297
307
|
b_weather_files = false
|
298
308
|
b_models = false
|
299
309
|
b_other_libs = false
|
300
310
|
|
301
311
|
rows.each do |row|
|
302
|
-
if row[0] == "
|
312
|
+
if row[0] == "Settings"
|
313
|
+
b_settings = true
|
314
|
+
b_run_setup = false
|
315
|
+
b_problem_setup = false
|
316
|
+
b_algorithm_setup = false
|
317
|
+
b_weather_files = false
|
318
|
+
b_models = false
|
319
|
+
b_other_libs = false
|
320
|
+
next
|
321
|
+
elsif row[0] == "Running Setup"
|
322
|
+
b_settings = false
|
303
323
|
b_run_setup = true
|
304
324
|
b_problem_setup = false
|
325
|
+
b_algorithm_setup = false
|
305
326
|
b_weather_files = false
|
306
327
|
b_models = false
|
307
328
|
b_other_libs = false
|
308
329
|
next
|
309
330
|
elsif row[0] == "Problem Definition"
|
331
|
+
b_settings = false
|
310
332
|
b_run_setup = false
|
311
333
|
b_problem_setup = true
|
334
|
+
b_algorithm_setup = false
|
335
|
+
b_weather_files = false
|
336
|
+
b_models = false
|
337
|
+
b_other_libs = false
|
338
|
+
next
|
339
|
+
elsif row[0] == "Algorithm Setup"
|
340
|
+
b_settings = false
|
341
|
+
b_run_setup = false
|
342
|
+
b_problem_setup = false
|
343
|
+
b_algorithm_setup = true
|
312
344
|
b_weather_files = false
|
313
345
|
b_models = false
|
314
346
|
b_other_libs = false
|
315
347
|
next
|
316
348
|
elsif row[0] == "Weather Files"
|
349
|
+
b_settings = false
|
317
350
|
b_run_setup = false
|
318
351
|
b_problem_setup = false
|
352
|
+
b_algorithm_setup = false
|
319
353
|
b_weather_files = true
|
320
354
|
b_models = false
|
321
355
|
b_other_libs = false
|
322
356
|
next
|
323
357
|
elsif row[0] == "Models"
|
358
|
+
b_settings = false
|
324
359
|
b_run_setup = false
|
325
360
|
b_problem_setup = false
|
361
|
+
b_algorithm_setup = false
|
326
362
|
b_weather_files = false
|
327
363
|
b_models = true
|
328
364
|
b_other_libs = false
|
329
365
|
next
|
330
366
|
elsif row[0] == "Other Library Files"
|
367
|
+
b_settings = false
|
331
368
|
b_run_setup = false
|
332
369
|
b_problem_setup = false
|
370
|
+
b_algorithm_setup = false
|
333
371
|
b_weather_files = false
|
334
372
|
b_models = false
|
335
373
|
b_other_libs = true
|
@@ -338,12 +376,18 @@ module OpenStudio
|
|
338
376
|
|
339
377
|
next if row[0].nil?
|
340
378
|
|
341
|
-
if
|
379
|
+
if b_settings
|
380
|
+
@version = row[1].chomp if row[0] == "Spreadsheet Version"
|
381
|
+
@settings["#{row[0].snake_case}"] = row[1] if row[0]
|
382
|
+
elsif b_run_setup
|
342
383
|
@name = row[1].chomp if row[0] == "Analysis Name"
|
384
|
+
@machine_name = @name.snake_case
|
343
385
|
@export_path = File.expand_path(File.join(@root_path, row[1])) if row[0] == "Export Directory"
|
344
386
|
@measure_path = File.expand_path(File.join(@root_path, row[1])) if row[0] == "Measure Directory"
|
345
387
|
elsif b_problem_setup
|
346
|
-
@
|
388
|
+
@problem["#{row[0].snake_case}"] = row[1] if row[0]
|
389
|
+
elsif b_algorithm_setup
|
390
|
+
@algorithm["#{row[0].snake_case}"] = row[1] if row[0]
|
347
391
|
elsif b_weather_files
|
348
392
|
if row[0] == "Weather File"
|
349
393
|
@weather_files += Dir.glob(File.expand_path(File.join(@root_path, row[1])))
|
@@ -362,11 +406,11 @@ module OpenStudio
|
|
362
406
|
# be omitted as an intermediate step
|
363
407
|
def parse_variables()
|
364
408
|
rows = @xls.sheet('Variables').parse()
|
365
|
-
|
366
|
-
if !rows
|
409
|
+
|
410
|
+
if !rows
|
367
411
|
raise "Could not find the sheet name 'Variables' in excel file #{@root_path}"
|
368
412
|
end
|
369
|
-
|
413
|
+
|
370
414
|
data = {}
|
371
415
|
data['data'] = []
|
372
416
|
|
@@ -429,7 +473,7 @@ module OpenStudio
|
|
429
473
|
data['data'][measure_index] = {}
|
430
474
|
|
431
475
|
#generate name id
|
432
|
-
puts "Parsing measure #{row[1]}"
|
476
|
+
#todo: put this into a logger. puts "Parsing measure #{row[1]}"
|
433
477
|
display_name = row[1].chomp.strip
|
434
478
|
measure_name = display_name.downcase.strip.gsub("-", "_").gsub(" ", "_")
|
435
479
|
data['data'][measure_index]['display_name'] = display_name
|
@@ -438,7 +482,7 @@ module OpenStudio
|
|
438
482
|
data['data'][measure_index]['measure_file_name'] = row[2]
|
439
483
|
data['data'][measure_index]['measure_file_name_directory'] = row[2].underscore
|
440
484
|
data['data'][measure_index]['measure_type'] = row[3]
|
441
|
-
|
485
|
+
|
442
486
|
data['data'][measure_index]['version'] = @version_id
|
443
487
|
|
444
488
|
data['data'][measure_index]['variables'] = []
|
@@ -4,15 +4,15 @@
|
|
4
4
|
"name": "<%= @name.downcase.gsub(" ", "_") %>",
|
5
5
|
"algorithm": {
|
6
6
|
"sample_method": "lhs",
|
7
|
-
"number_of_samples": <%= @number_of_samples %>
|
7
|
+
"number_of_samples": <%= @problem['number_of_samples'].to_i %>
|
8
8
|
},
|
9
9
|
"parameter_space": [],
|
10
10
|
"problem": {
|
11
|
-
"number_of_samples_KEEP_HERE_UNTIL_ALGO_IS_IMPLEMENTED": <%= @number_of_samples %>,
|
12
|
-
"number_of_samples": <%= @number_of_samples %>,
|
11
|
+
"number_of_samples_KEEP_HERE_UNTIL_ALGO_IS_IMPLEMENTED": <%= @problem['number_of_samples'].to_i %>,
|
12
|
+
"number_of_samples": <%= @problem['number_of_samples'].to_i %>,
|
13
13
|
"algorithm": {
|
14
|
-
"number_of_samples": <%= @number_of_samples %>,
|
15
|
-
"sample_method":
|
14
|
+
"number_of_samples": <%= @problem['number_of_samples'].to_i %>,
|
15
|
+
"sample_method": <%= @problem['sensitivity_method'].to_i %>
|
16
16
|
},
|
17
17
|
"name": "Problem",
|
18
18
|
"workflow": []
|