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.
Files changed (202) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +11 -0
  3. data/Rakefile +1 -1
  4. data/lib/openstudio/analysis/translator/excel.rb +63 -19
  5. data/lib/openstudio/analysis/version.rb +1 -1
  6. data/lib/openstudio/helpers/string.rb +5 -0
  7. data/lib/openstudio/templates/analysis.json.erb +5 -5
  8. data/spec/files/export/analysis/small_seed.json +117 -117
  9. data/spec/files/export/analysis/small_seed.zip +0 -0
  10. data/spec/files/setup_version_2.xlsx +0 -0
  11. data/spec/openstudio/analysis/translator/excel_spec.rb +26 -0
  12. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.10.xml +9 -0
  13. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.11.xml +9 -0
  14. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.12.xml +9 -0
  15. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.13.xml +9 -0
  16. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.14.xml +9 -0
  17. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.15.xml +9 -0
  18. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.16.xml +9 -0
  19. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.17.xml +9 -0
  20. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.18.xml +9 -0
  21. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.19.xml +9 -0
  22. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.20.xml +9 -0
  23. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.21.xml +9 -0
  24. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.22.xml +9 -0
  25. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.23.xml +9 -0
  26. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.24.xml +9 -0
  27. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.6.xml +9 -0
  28. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.7.xml +9 -0
  29. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.8.xml +9 -0
  30. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-create-a-new-localhost-instance.9.xml +9 -0
  31. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.10.xml +9 -0
  32. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.11.xml +9 -0
  33. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.12.xml +9 -0
  34. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.13.xml +9 -0
  35. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.14.xml +9 -0
  36. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.15.xml +9 -0
  37. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.16.xml +9 -0
  38. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.17.xml +9 -0
  39. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.18.xml +9 -0
  40. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.19.xml +9 -0
  41. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.20.xml +9 -0
  42. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.21.xml +9 -0
  43. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.22.xml +9 -0
  44. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.23.xml +9 -0
  45. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.24.xml +9 -0
  46. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.6.xml +9 -0
  47. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.7.xml +9 -0
  48. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.8.xml +9 -0
  49. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi-test-not-localhost.9.xml +9 -0
  50. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.10.xml +7 -0
  51. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.11.xml +7 -0
  52. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.12.xml +7 -0
  53. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.13.xml +7 -0
  54. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.14.xml +7 -0
  55. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.15.xml +7 -0
  56. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.16.xml +7 -0
  57. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.17.xml +7 -0
  58. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.18.xml +7 -0
  59. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.19.xml +7 -0
  60. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.20.xml +7 -0
  61. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.21.xml +7 -0
  62. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.22.xml +7 -0
  63. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.23.xml +7 -0
  64. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.24.xml +7 -0
  65. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.6.xml +7 -0
  66. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.7.xml +7 -0
  67. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.8.xml +7 -0
  68. data/spec/reports/SPEC-OpenStudio-Analysis-ServerApi.9.xml +7 -0
  69. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.10.xml +22 -0
  70. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.11.xml +22 -0
  71. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.12.xml +22 -0
  72. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.13.xml +22 -0
  73. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.14.xml +22 -0
  74. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.15.xml +22 -0
  75. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.16.xml +22 -0
  76. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.17.xml +22 -0
  77. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.18.xml +22 -0
  78. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.19.xml +22 -0
  79. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.20.xml +22 -0
  80. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.21.xml +22 -0
  81. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.22.xml +22 -0
  82. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.23.xml +22 -0
  83. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.24.xml +22 -0
  84. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.6.xml +22 -0
  85. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.7.xml +22 -0
  86. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.8.xml +22 -0
  87. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-no-variables-defined.9.xml +22 -0
  88. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.0.xml +22 -0
  89. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.1.xml +24 -0
  90. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.10.xml +33 -0
  91. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.11.xml +35 -0
  92. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.12.xml +35 -0
  93. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.13.xml +35 -0
  94. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.14.xml +36 -0
  95. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.15.xml +22 -0
  96. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.16.xml +27 -0
  97. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.17.xml +26 -0
  98. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.2.xml +20 -0
  99. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.3.xml +15 -0
  100. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.4.xml +15 -0
  101. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.5.xml +17 -0
  102. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.6.xml +17 -0
  103. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.7.xml +33 -0
  104. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.8.xml +33 -0
  105. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.9.xml +33 -0
  106. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-setup-version-2.xml +19 -0
  107. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.10.xml +16 -0
  108. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.11.xml +16 -0
  109. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.12.xml +16 -0
  110. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.13.xml +16 -0
  111. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.14.xml +16 -0
  112. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.15.xml +16 -0
  113. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.16.xml +16 -0
  114. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.17.xml +16 -0
  115. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.18.xml +16 -0
  116. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.19.xml +16 -0
  117. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.20.xml +16 -0
  118. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.21.xml +16 -0
  119. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.22.xml +16 -0
  120. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.23.xml +16 -0
  121. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.24.xml +16 -0
  122. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.6.xml +16 -0
  123. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.7.xml +16 -0
  124. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.8.xml +16 -0
  125. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-incomplete-variables.9.xml +16 -0
  126. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.10.xml +15 -0
  127. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.11.xml +15 -0
  128. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.12.xml +15 -0
  129. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.13.xml +15 -0
  130. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.14.xml +15 -0
  131. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.15.xml +15 -0
  132. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.16.xml +15 -0
  133. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.17.xml +15 -0
  134. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.18.xml +15 -0
  135. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.19.xml +15 -0
  136. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.20.xml +15 -0
  137. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.21.xml +15 -0
  138. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.22.xml +15 -0
  139. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.23.xml +15 -0
  140. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.24.xml +15 -0
  141. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.6.xml +15 -0
  142. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.7.xml +15 -0
  143. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.8.xml +15 -0
  144. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables-should-not-validate.9.xml +15 -0
  145. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.10.xml +30 -0
  146. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.11.xml +30 -0
  147. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.12.xml +30 -0
  148. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.13.xml +30 -0
  149. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.14.xml +30 -0
  150. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.15.xml +30 -0
  151. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.16.xml +30 -0
  152. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.17.xml +30 -0
  153. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.18.xml +30 -0
  154. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.19.xml +30 -0
  155. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.20.xml +30 -0
  156. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.21.xml +30 -0
  157. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.22.xml +30 -0
  158. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.23.xml +30 -0
  159. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.24.xml +30 -0
  160. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.6.xml +30 -0
  161. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.7.xml +30 -0
  162. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.8.xml +30 -0
  163. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-of-variables.9.xml +30 -0
  164. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.10.xml +15 -0
  165. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.11.xml +15 -0
  166. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.12.xml +15 -0
  167. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.13.xml +15 -0
  168. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.14.xml +15 -0
  169. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.15.xml +15 -0
  170. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.16.xml +15 -0
  171. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.17.xml +15 -0
  172. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.18.xml +15 -0
  173. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.19.xml +15 -0
  174. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.20.xml +15 -0
  175. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.21.xml +15 -0
  176. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.22.xml +15 -0
  177. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.23.xml +15 -0
  178. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.24.xml +15 -0
  179. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.6.xml +15 -0
  180. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.7.xml +15 -0
  181. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.8.xml +15 -0
  182. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel-small-list-with-with-repeated-variable-names.9.xml +15 -0
  183. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.10.xml +7 -0
  184. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.11.xml +7 -0
  185. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.12.xml +7 -0
  186. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.13.xml +7 -0
  187. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.14.xml +7 -0
  188. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.15.xml +7 -0
  189. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.16.xml +7 -0
  190. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.17.xml +7 -0
  191. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.18.xml +7 -0
  192. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.19.xml +7 -0
  193. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.20.xml +7 -0
  194. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.21.xml +7 -0
  195. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.22.xml +7 -0
  196. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.23.xml +7 -0
  197. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.24.xml +7 -0
  198. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.6.xml +7 -0
  199. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.7.xml +7 -0
  200. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.8.xml +7 -0
  201. data/spec/reports/SPEC-OpenStudio-Analysis-Translator-Excel.9.xml +7 -0
  202. metadata +385 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 13b5dec27ec223ea03b7ec5639507606f743cf3c
4
- data.tar.gz: a36e11a236c5afc09ec0e63ca4298b98f0d4fb55
3
+ metadata.gz: 4ae67d42886b996287c5359e182083045cfe85b6
4
+ data.tar.gz: 89317f8592fb0d6d68be5d4d2b86fb8de0c33614
5
5
  SHA512:
6
- metadata.gz: dcafcb379a586b42a980d9e8aad98b5bb7cff9389b7c32b28239c832629367f65c9b98207c4d63690e8acc1d1cc391adcb6915bdb99f0941f4ad73d3ad2a2b36
7
- data.tar.gz: afbc982b5e00649b58a5aa70eb4ea648f2004c16d9eed61f8e61c1468aaa487bbe0080af34af926303fc2a66a7d65a214cd4cac7e9bd118a8a59b09d96d6b9e6
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 :number_of_samples
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] == "Running Setup"
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 b_run_setup
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
- @number_of_samples = row[1].to_i if row[0] == "Number of Samples"
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'] = []
@@ -1,6 +1,6 @@
1
1
  module OpenStudio
2
2
  module Analysis
3
- VERSION = "0.1.6"
3
+ VERSION = "0.1.7"
4
4
  OPENSTUDIO_VERSION = "1.1.4"
5
5
  end
6
6
  end
@@ -8,5 +8,10 @@ class String
8
8
  tr("-", "_").
9
9
  downcase
10
10
  end
11
+
12
+ def snake_case
13
+ self.gsub(" ", "_").
14
+ downcase
15
+ end
11
16
  end
12
17
 
@@ -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": "all_variables"
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": []