openstudio-analysis 1.0.0.rc19 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +2 -0
  3. data/.gitlab-ci.yml +20 -0
  4. data/.rubocop.yml +2 -133
  5. data/.travis.yml +2 -2
  6. data/CHANGELOG.md +26 -32
  7. data/Gemfile +5 -6
  8. data/LICENSE.md +28 -0
  9. data/README.md +16 -8
  10. data/Rakefile +38 -3
  11. data/lib/openstudio-analysis.rb +35 -0
  12. data/lib/openstudio/analysis.rb +57 -26
  13. data/lib/openstudio/analysis/algorithm_attributes.rb +36 -1
  14. data/lib/openstudio/analysis/formulation.rb +41 -6
  15. data/lib/openstudio/analysis/server_api.rb +53 -36
  16. data/lib/openstudio/analysis/support_files.rb +40 -0
  17. data/lib/openstudio/analysis/translator/datapoints.rb +39 -4
  18. data/lib/openstudio/analysis/translator/excel.rb +43 -8
  19. data/lib/openstudio/analysis/translator/workflow.rb +54 -14
  20. data/lib/openstudio/analysis/version.rb +36 -1
  21. data/lib/openstudio/analysis/workflow.rb +37 -2
  22. data/lib/openstudio/analysis/workflow_step.rb +97 -70
  23. data/lib/openstudio/helpers/hash.rb +35 -0
  24. data/lib/openstudio/helpers/string.rb +36 -2
  25. data/lib/openstudio/weather/epw.rb +32 -17
  26. data/openstudio-analysis.gemspec +21 -18
  27. data/update_license.rb +120 -0
  28. metadata +62 -200
  29. data/LGPL-2.1.txt +0 -502
  30. data/LICENSE.txt +0 -65
  31. data/rubocop-todo.yml +0 -246
  32. data/spec/files/0_1_09_no_variables.xlsx +0 -0
  33. data/spec/files/0_1_09_outputvars.xlsx +0 -0
  34. data/spec/files/0_1_09_setup_version_2.xlsx +0 -0
  35. data/spec/files/0_1_09_small_list.xlsx +0 -0
  36. data/spec/files/0_1_09_small_list_incomplete.xlsx +0 -0
  37. data/spec/files/0_1_09_small_list_repeat_vars.xlsx +0 -0
  38. data/spec/files/0_1_09_small_list_validation_errors.xlsx +0 -0
  39. data/spec/files/0_1_10_proxy.xlsx +0 -0
  40. data/spec/files/0_1_10_proxy_user.xlsx +0 -0
  41. data/spec/files/0_1_10_template_input.xlsx +0 -0
  42. data/spec/files/0_1_11_discrete_variables.xlsx +0 -0
  43. data/spec/files/0_1_12_discrete_dynamic_columns.xlsx +0 -0
  44. data/spec/files/0_2_0_template.xlsx +0 -0
  45. data/spec/files/0_2_0_template_simpletest.xlsx +0 -0
  46. data/spec/files/0_3_0_dynamic_uuids.xlsx +0 -0
  47. data/spec/files/0_3_0_measure_existence.xlsx +0 -0
  48. data/spec/files/0_3_0_outputs.xlsx +0 -0
  49. data/spec/files/0_3_3_short_names.xlsx +0 -0
  50. data/spec/files/0_3_5_multiple_measure_paths.xlsx +0 -0
  51. data/spec/files/0_3_7_unique_measure_names.xlsx +0 -0
  52. data/spec/files/0_3_7_worker_init_final.xlsx +0 -0
  53. data/spec/files/0_4_0_lhs_discrete_continuous.xlsx +0 -0
  54. data/spec/files/0_4_0_multiple_seeds.xlsx +0 -0
  55. data/spec/files/0_4_0_pivot_test.xlsx +0 -0
  56. data/spec/files/analysis/examples/discrete_lhs_example.json +0 -809
  57. data/spec/files/analysis/examples/medium_office_example.json +0 -1673
  58. data/spec/files/analysis/examples/medium_office_workflow.json +0 -1298
  59. data/spec/files/measures/ActualMeasureNoJson/measure.rb +0 -80
  60. data/spec/files/measures/ActualMeasureNoJson/measure.xml +0 -2
  61. data/spec/files/measures/ExampleMeasure/measure.json +0 -3
  62. data/spec/files/measures/ExampleMeasure/measure.rb +0 -5
  63. data/spec/files/measures/ExampleMeasure/measure.xml +0 -1
  64. data/spec/files/measures/IncreaseInsulationRValueForRoofs/measure.json +0 -36
  65. data/spec/files/measures/IncreaseInsulationRValueForRoofs/measure.rb +0 -22
  66. data/spec/files/measures/IncreaseInsulationRValueForRoofs/measure.xml +0 -5
  67. data/spec/files/measures/NoMeasureRbFile/.gitkeep +0 -0
  68. data/spec/files/measures/ReduceLightingLoadsByPercentage/measure.json +0 -3
  69. data/spec/files/measures/ReduceLightingLoadsByPercentage/measure.rb +0 -5
  70. data/spec/files/measures/ReduceLightingLoadsByPercentage/measure.xml +0 -1
  71. data/spec/files/measures/SetThermostatSchedules/measure.json +0 -63
  72. data/spec/files/measures/SetThermostatSchedules/measure.rb +0 -254
  73. data/spec/files/measures/SetThermostatSchedules/measure.xml +0 -2
  74. data/spec/files/measures/example_measure_auto_directory_name/measure.json +0 -3
  75. data/spec/files/measures/example_measure_auto_directory_name/measure.rb +0 -5
  76. data/spec/files/measures/example_measure_auto_directory_name/measure.xml +0 -1
  77. data/spec/files/measures/reduce_lighting_loads_by_percentage/measure.json +0 -3
  78. data/spec/files/measures/reduce_lighting_loads_by_percentage/measure.rb +0 -5
  79. data/spec/files/measures/reduce_lighting_loads_by_percentage/measure.xml +0 -1
  80. data/spec/files/measures/reduce_space_infiltration_by_percentage/measure.rb +0 -5
  81. data/spec/files/measures/reduce_space_infiltration_by_percentage/measure.xml +0 -1
  82. data/spec/files/measures/rotate_building/measure.rb +0 -5
  83. data/spec/files/measures/rotate_building/measure.xml +0 -1
  84. data/spec/files/measures/set_window_to_wall_ratio_by_facade/measure.rb +0 -5
  85. data/spec/files/measures/set_window_to_wall_ratio_by_facade/measure.xml +0 -1
  86. data/spec/files/measures_second_path/measure_in_another_dir/measure.json +0 -3
  87. data/spec/files/measures_second_path/measure_in_another_dir/measure.rb +0 -5
  88. data/spec/files/measures_second_path/measure_in_another_dir/measure.xml +0 -1
  89. data/spec/files/partial_weather.epw +0 -32
  90. data/spec/files/partial_weather_2.epw +0 -32
  91. data/spec/files/small_seed.osm +0 -4622
  92. data/spec/files/worker_init/first_file.rb +0 -15
  93. data/spec/files/worker_init/second_file.rb +0 -15
  94. data/spec/files/workflow/analysis.osa +0 -1334
  95. data/spec/files/workflow/datapoint_0.osd +0 -65
  96. data/spec/files/workflow/datapoint_1.osd +0 -65
  97. data/spec/files/workflow/datapoint_2.osd +0 -65
  98. data/spec/files/workflow/datapoint_wrong_osa_id.osd +0 -65
  99. data/spec/integration/server_api_spec.rb +0 -48
  100. data/spec/openstudio/excel_spec.rb +0 -571
  101. data/spec/openstudio/formulation_spec.rb +0 -157
  102. data/spec/openstudio/hash_spec.rb +0 -21
  103. data/spec/openstudio/osw_spec.rb +0 -94
  104. data/spec/openstudio/server_api_spec.rb +0 -25
  105. data/spec/openstudio/string_spec.rb +0 -0
  106. data/spec/openstudio/support_files_spec.rb +0 -54
  107. data/spec/openstudio/weather_spec.rb +0 -45
  108. data/spec/openstudio/workflow_spec.rb +0 -91
  109. data/spec/openstudio/workflow_step_spec.rb +0 -118
  110. data/spec/schema/osa.json +0 -613
  111. data/spec/schema/osa.png +0 -0
  112. data/spec/schema/osd.json +0 -110
  113. data/spec/schema/osd.png +0 -0
  114. data/spec/spec_helper.rb +0 -19
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: d9c20421f78a32d9fbfb9709c2640a57f5e012cc
4
- data.tar.gz: a87f714e74143979dde36b3f4710551ba866f91c
2
+ SHA256:
3
+ metadata.gz: 7721505c4383067dbed378a9de67e7ca4d86277d0000fc47c764b7b16e79a191
4
+ data.tar.gz: 68d711d6ac89e4c879c1fda531e267479afce94b9b10c87b1ef30193e16f96fb
5
5
  SHA512:
6
- metadata.gz: 794269c64d78465a8a741dd566e5be506168cdd3a6a5625891cb6ec1da9e9b1c14dce43be4f8fe9c7b2b092058fc02d3f3cd4b3609707f31cfba055e51fb8669
7
- data.tar.gz: b123ae96f3b587a8ab726234596122b396eb353fb2f542042bbfe74fe98539da1685b3e0476d79c736b04338f9de3b8139706f8439f0c529a5807391ba48742d
6
+ metadata.gz: dc866e59c1c8c5a80c21ddb3614069c7a94b48b422390a7a0f35b1781db71d10830afc7663c187082df7962a69f1d9cf5bbb5cfb9f44d1aabd53f592b6d185a0
7
+ data.tar.gz: 4e01767d2ea6431b0673b861552dbed0c971c7c58f7e8618814d7cfcb8c9e31774bb5b2c70ecf8f10e9c2f4b6cc264f4e96f434dabe5223a2298e1b2f2ceece9
data/.gitignore CHANGED
@@ -5,6 +5,7 @@
5
5
  *.swp
6
6
  *.gem
7
7
  ~$*
8
+ .rubocop-http*
8
9
  tmp/*
9
10
  .yardoc
10
11
  doc/
@@ -17,3 +18,4 @@ Gemfile.lock
17
18
  spec/files/measures/ActualMeasureNoJson/measure.json
18
19
  rubocop-results.xml
19
20
  coverage
21
+ /gems
@@ -0,0 +1,20 @@
1
+ test:windows:
2
+ stage: test
3
+ tags:
4
+ - windows
5
+ script:
6
+ - bundle exec rake
7
+
8
+ test:mac:
9
+ stage: test
10
+ tags:
11
+ - mac
12
+ script:
13
+ - bundle exec rake
14
+
15
+ test:ubuntu:
16
+ stage: test
17
+ tags:
18
+ - ubuntu
19
+ script:
20
+ - bundle exec rake
@@ -4,136 +4,5 @@ AllCops:
4
4
  - 'spec/files/measures_second_path/**/*'
5
5
  - 'spec/files/worker_init/*'
6
6
 
7
- # ==================== Linters ====================
8
- Lint/AmbiguousOperator:
9
- Enabled: true
10
-
11
- Lint/BlockAlignment:
12
- Enabled: true
13
-
14
- Lint/ParenthesesAsGroupedExpression:
15
- Enabled: true
16
-
17
- Lint/RequireParentheses:
18
- Enabled: true
19
-
20
- Lint/UnreachableCode:
21
- Enabled: false
22
-
23
- Lint/UselessAssignment:
24
- Enabled: true
25
-
26
- Lint/UnusedBlockArgument:
27
- Description: 'Checks for unused block arguments.'
28
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
29
- Enabled: false
30
-
31
- Lint/UnusedMethodArgument:
32
- Description: 'Checks for unused method arguments.'
33
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
34
- Enabled: false
35
-
36
- Lint/UselessAssignment:
37
- Description: 'Checks for useless assignment to a local variable.'
38
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
39
- Enabled: false
40
-
41
- # ==================== Performance ========================
42
-
43
- Performance/Casecmp:
44
- Enabled: false
45
-
46
- # ==================== Styles / Metrics====================
47
-
48
- Metrics/BlockNesting:
49
- Max: 4
50
-
51
- Metrics/ClassLength:
52
- Max: 500
53
-
54
- Metrics/CyclomaticComplexity:
55
- Max: 50
56
-
57
- Metrics/LineLength:
58
- Max: 120
59
-
60
- Metrics/MethodLength:
61
- Max: 350
62
-
63
- Metrics/ParameterLists:
64
- Max: 8
65
-
66
- # ==================== Disabled on Purpose ====================
67
-
68
- # Allow indented case statements
69
- # Configuration parameters: IndentWhenRelativeTo, SupportedStyles, IndentOneStep.
70
- Style/CaseIndentation:
71
- Enabled: false
72
-
73
- # Configuration parameters: EnforcedStyle, SupportedStyles, SingleLineConditionsOnly.
74
- # SupportedStyles: assign_to_condition, assign_inside_condition
75
- Style/ConditionalAssignment:
76
- Enabled: false
77
-
78
- # Configuration parameters: EnforcedStyle, SupportedStyles.
79
- Style/ClassAndModuleChildren:
80
- Enabled: false
81
-
82
- Style/ClassVars:
83
- Enabled: false
84
-
85
- Style/Documentation:
86
- Enabled: false
87
-
88
- # Offense count: 1
89
- Style/EachWithObject:
90
- Enabled: false
91
-
92
- # Configuration parameters: AllowedVariables.
93
- Style/GlobalVars:
94
- Enabled: false
95
-
96
- # Configuration parameters: MinBodyLength.
97
- Style/GuardClause:
98
- Enabled: true
99
-
100
- # Configuration parameters: MaxLineLength.
101
- Style/IfUnlessModifier:
102
- Enabled: false
103
-
104
- # Configuration parameters: EnforcedStyle, SupportedStyles.
105
- # SupportedStyles: symmetrical, new_line, same_line
106
- Style/MultilineMethodCallBraceLayout:
107
- Enabled: false
108
-
109
- # Do NOT enable.
110
- # Configuration parameters: EnforcedStyle, SupportedStyles.
111
- Style/Next:
112
- Enabled: false
113
-
114
- Style/NumericLiterals:
115
- Description: 'Add underscores to large numeric literals to improve readability.'
116
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
117
- Enabled: false
118
-
119
- # Configuration parameters: AutoCorrect, EnforcedStyle, SupportedStyles.
120
- # SupportedStyles: predicate, comparison
121
- Style/NumericPredicate:
122
- Enabled: false
123
-
124
- # More Changes per DLM -- pulled from https://github.com/bbatsov/rubocop/blob/master/config/enabled.yml
125
- Style/RedundantReturn:
126
- Description: 'Do not use return where it is not required.'
127
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-return'
128
- Enabled: false
129
-
130
- Style/RedundantParentheses:
131
- Enabled: false
132
-
133
- # Do NOT enable this because it appears $? is different than $CHILD_STATUS.
134
- Style/SpecialGlobalVars:
135
- Enabled: false
136
-
137
- Style/ZeroLengthPredicate:
138
- Enabled: false
139
-
7
+ inherit_from:
8
+ - http://s3.amazonaws.com/openstudio-resources/styles/rubocop_v3.yml
@@ -1,4 +1,4 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.0.0-p451
4
- - 2.0.0-p648
3
+ - 2.5.1
4
+ before_install: gem install bundler -v 2.1
@@ -1,47 +1,44 @@
1
1
  OpenStudio Analysis Gem Change Log
2
2
  ==================================
3
3
 
4
- Version 1.0.0.rc11 (Unreleased)
5
- ------------------
4
+ Version 1.0.4
5
+ -------------
6
+ * Update dependency nokogiri
7
+
8
+ Version 1.0.3
9
+ -------------
10
+ * Update dependencies roo and rubyzip
11
+
12
+ Version 1.0.2
13
+ -------------
14
+ * Updates required for OpenStudio 3x
15
+ * Require Ruby ~> 2.5.1
16
+ * Update to Nokogiri ~> 1.8.2 (required for Ruby 2.5 on Windows)
17
+
18
+ Version 1.0.1
19
+ -------------
20
+ * Add support for Ruby 2.5.1 (keeping support for 2.2)
21
+ * Lock version of Roo to older version
22
+ * Updated copyright dates and remove old LGPL license. License is not LGPL but a BSD-style license.
23
+
24
+ Version 1.0.0
25
+ -------------
26
+ This is the first official release in quite some time. This includes many changes which unfortunately have not been
27
+ cataloged. The changes from 0.4.5 include:
28
+
29
+ * Requires ruby > 2.1.
6
30
  * Default path to ServerApi logfile to ~/os_server_api.log. This can be overridden by setting the log_path options key in the initializer.
7
31
  * Fix get_datapoint_status for new version of API where data_points are under analysis
8
-
9
- Version 1.0.0.rc10
10
- ------------------
11
32
  * Fix boolean data type in datapoints translator
12
33
  * Allow __skip__ variable in datapoints translator
13
-
14
- Version 1.0.0.rc9
15
- -----------------
16
34
  * Fix bug in batch datapoints to look for outputs_json, not outputs when importing the definition of the outputs JSON file.
17
-
18
- Version 1.0.0.rc8
19
- -----------------
20
35
  * Allow "None" as an argument in batch datapoints. This will allow the measure to be added without setting any of the arguments. Useful for adding Reporting Measures to the workflow.
21
-
22
- Version 1.0.0.rc7
23
- -----------------
24
36
  * Use more recent version of BCL gem for underscoring strings
25
-
26
- Version 1.0.0.pre.rc6
27
- ---------------------
28
37
  * When creating OSWs from batch datapoints, set the default run_directory to ./run
29
-
30
- Version 1.0.0.pre.rc5
31
- ---------------------
32
38
  * fix get_datapoint method. show_full is no longer a valid endpoint in the new server code
33
-
34
- Version 1.0.0.pre.rc4
35
- ---------------------
36
39
  * Change seed_model to seed_file in OSWs generated from the translator
37
40
  * Add more unit tests
38
-
39
- Version 1.0.0.pre.rc3
40
- ---------------------
41
41
  * Catch null arguments when translating from OSA/OSD to OSW
42
-
43
- Version 1.0.0.pre.rc2
44
- --------------------------------
45
42
  * Note that pre.rc1 was yanked from Rubygems.
46
43
  * Remove allow_multiple_jobs and server_as_worker options. These are by defaulted to true now.
47
44
  * Remove uncertain strings from end of uncertainty distributions
@@ -52,9 +49,6 @@ Version 1.0.0.pre.rc2
52
49
  * Add zip extension to formulation zip upon save if none exists
53
50
  * In upload_datapoint, allows set the analysis_id in the file to the one passed.
54
51
  * Remove reading JSON from custom_csv method.
55
-
56
- Version 1.0.0-pat2
57
- ------------------------------
58
52
  * Fixed bug in workflow translator which caused errors in server models
59
53
  * Updated gem versions to converge across the OpenStudio Analysis Framework platforms
60
54
 
data/Gemfile CHANGED
@@ -2,14 +2,13 @@ source 'http://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
- gem 'openstudio-aws', '0.4.2'
6
- gem 'dencity'
7
5
  gem 'colored', '~> 1.2'
6
+ gem 'openstudio-aws', '~> 0.4.2'
8
7
 
9
8
  group :test do
10
- gem 'coveralls', require: false
11
- gem 'rspec', '~> 3.4'
9
+ # Don't install coveralls on window because requires devkit for json
10
+ unless Gem.win_platform?
11
+ gem 'coveralls', require: false
12
+ end
12
13
  gem 'ci_reporter_rspec'
13
- gem 'rubocop', '~> 0.31'
14
- gem 'rubocop-checkstyle_formatter', '~> 0.2'
15
14
  end
@@ -0,0 +1,28 @@
1
+ OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC. All rights reserved.
2
+
3
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided
4
+ that the following conditions are met:
5
+
6
+ (1) Redistributions of source code must retain the above copyright notice, this list of conditions and
7
+ the following disclaimer.
8
+
9
+ (2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
10
+ the following disclaimer in the documentation and/or other materials provided with the distribution.
11
+
12
+ (3) Neither the name of the copyright holder nor the names of any contributors may be used to endorse or
13
+ promote products derived from this software without specific prior written permission from the respective
14
+ party.
15
+
16
+ (4) Other than as required in clauses (1) and (2), distributions in any form of modifications or other
17
+ derivative works may not use the "OpenStudio" trademark, "OS", "os", or any other confusingly similar
18
+ designation without specific prior written permission from Alliance for Sustainable Energy, LLC.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
21
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
22
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE UNITED
23
+ STATES GOVERNMENT, OR THE UNITED STATES DEPARTMENT OF ENERGY, NOR ANY OF THEIR EMPLOYEES, BE LIABLE FOR ANY
24
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
27
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
28
+ DAMAGE.
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # OpenStudio Analysis Gem
2
2
 
3
- [![Build Status](https://travis-ci.org/NREL/OpenStudio-analysis-gem.svg?branch=develop)](https://travis-ci.org/NREL/OpenStudio-analysis-gem) [![Dependency Status](https://www.versioneye.com/user/projects/540a2fe5ccc023dd23000002/badge.svg?style=flat)](https://www.versioneye.com/user/projects/540a2fe5ccc023dd23000002) [![Coverage Status](https://coveralls.io/repos/NREL/OpenStudio-analysis-gem/badge.svg?branch=develop)](https://coveralls.io/r/NREL/OpenStudio-analysis-gem?branch=develop)
3
+ [![Build Status](https://travis-ci.org/NREL/OpenStudio-analysis-gem.svg?branch=develop)](https://travis-ci.org/NREL/OpenStudio-analysis-gem)
4
+ [![Coverage Status](https://coveralls.io/repos/NREL/OpenStudio-analysis-gem/badge.svg?branch=develop)](https://coveralls.io/r/NREL/OpenStudio-analysis-gem?branch=develop)
5
+ [![Gem Version](https://badge.fury.io/rb/openstudio-analysis.svg)](https://badge.fury.io/rb/openstudio-analysis)
4
6
 
5
7
  The OpenStudio Analysis Gem is used to communicate files to the OpenStudio Distributed Analysis.
6
8
 
@@ -28,7 +30,7 @@ There are two ways to create an OpenStudio Analysis description:
28
30
 
29
31
  # add measures to the workflow
30
32
  wf = analysis.workflow
31
- def add_measure_from_path(instance_name, instance_display_name, local_path_to_measure)
33
+ # def add_measure_from_path(instance_name, instance_display_name, local_path_to_measure)
32
34
  wf.add_measure_from_path('instance_name', 'Display name', 'path_to_measure')
33
35
  wf.add_measure_from_path('instance_name_2', 'Display name two', 'path_to_measure_2')
34
36
 
@@ -66,15 +68,21 @@ There are two ways to create an OpenStudio Analysis description:
66
68
 
67
69
  * Server API
68
70
 
69
- ```
70
-
71
-
72
- ```
71
+ ## Testing
73
72
 
73
+ This gem used RSpec for testing. To test simply run `bundle exec rspec` at the command line.
74
74
 
75
- ## Testing
75
+ # Releasing
76
+
77
+ Follow the steps below when releasing a new version:
76
78
 
77
- This gem used RSpec for testing. To test simply run `rspec` at the command line.
79
+ 1. Update /lib/openstudio/analysis/version.rb to the next version. Make sure to follow semantic versioning.
80
+ 2. Add changes to the CHANGELOG.md.
81
+ 3. Run rubocop and make sure code meets coding standards.
82
+ 4. Push release candidate on a branch.
83
+ 5. Create a pull request to develop. Once the tests pass, merge into develop.
84
+ 6. Create a pull request to master. Once tests pass, then merge into master.
85
+ 7. Checkout master and run `rake release`
78
86
 
79
87
  # Todos
80
88
 
data/Rakefile CHANGED
@@ -1,3 +1,38 @@
1
+ # *******************************************************************************
2
+ # OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
3
+ # All rights reserved.
4
+ # Redistribution and use in source and binary forms, with or without
5
+ # modification, are permitted provided that the following conditions are met:
6
+ #
7
+ # (1) Redistributions of source code must retain the above copyright notice,
8
+ # this list of conditions and the following disclaimer.
9
+ #
10
+ # (2) Redistributions in binary form must reproduce the above copyright notice,
11
+ # this list of conditions and the following disclaimer in the documentation
12
+ # and/or other materials provided with the distribution.
13
+ #
14
+ # (3) Neither the name of the copyright holder nor the names of any contributors
15
+ # may be used to endorse or promote products derived from this software without
16
+ # specific prior written permission from the respective party.
17
+ #
18
+ # (4) Other than as required in clauses (1) and (2), distributions in any form
19
+ # of modifications or other derivative works may not use the "OpenStudio"
20
+ # trademark, "OS", "os", or any other confusingly similar designation without
21
+ # specific prior written permission from Alliance for Sustainable Energy, LLC.
22
+ #
23
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24
+ # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25
+ # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26
+ # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES
27
+ # GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
28
+ # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29
+ # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
30
+ # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
31
+ # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
32
+ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
33
+ # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
+ # *******************************************************************************
35
+
1
36
  require 'bundler'
2
37
  Bundler.setup
3
38
 
@@ -10,12 +45,12 @@ require 'ci/reporter/rake/rspec'
10
45
  require 'bundler/gem_tasks'
11
46
 
12
47
  RSpec::Core::RakeTask.new('spec:unit') do |spec|
13
- spec.rspec_opts = %w(--format progress)
48
+ spec.rspec_opts = ['--format', 'progress']
14
49
  spec.pattern = FileList['spec/openstudio/**/*_spec.rb']
15
50
  end
16
51
 
17
52
  RSpec::Core::RakeTask.new('spec:integration') do |spec|
18
- spec.rspec_opts = %w(--format progress)
53
+ spec.rspec_opts = ['--format', 'progress']
19
54
  spec.pattern = FileList['spec/integration/**/*_spec.rb']
20
55
  end
21
56
 
@@ -27,7 +62,7 @@ task default: 'spec:unit'
27
62
  require 'rubocop/rake_task'
28
63
  desc 'Run RuboCop on the lib directory'
29
64
  RuboCop::RakeTask.new(:rubocop) do |task|
30
- task.options = ['--no-color', '--out=rubocop-results.xml']
65
+ task.options = ['--no-color', '--out=rubocop-results.xml', '--format', 'simple']
31
66
  task.formatters = ['RuboCop::Formatter::CheckstyleFormatter']
32
67
  task.requires = ['rubocop/formatter/checkstyle_formatter']
33
68
  # don't abort rake on failure
@@ -1,3 +1,38 @@
1
+ # *******************************************************************************
2
+ # OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
3
+ # All rights reserved.
4
+ # Redistribution and use in source and binary forms, with or without
5
+ # modification, are permitted provided that the following conditions are met:
6
+ #
7
+ # (1) Redistributions of source code must retain the above copyright notice,
8
+ # this list of conditions and the following disclaimer.
9
+ #
10
+ # (2) Redistributions in binary form must reproduce the above copyright notice,
11
+ # this list of conditions and the following disclaimer in the documentation
12
+ # and/or other materials provided with the distribution.
13
+ #
14
+ # (3) Neither the name of the copyright holder nor the names of any contributors
15
+ # may be used to endorse or promote products derived from this software without
16
+ # specific prior written permission from the respective party.
17
+ #
18
+ # (4) Other than as required in clauses (1) and (2), distributions in any form
19
+ # of modifications or other derivative works may not use the "OpenStudio"
20
+ # trademark, "OS", "os", or any other confusingly similar designation without
21
+ # specific prior written permission from Alliance for Sustainable Energy, LLC.
22
+ #
23
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24
+ # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25
+ # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26
+ # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES
27
+ # GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
28
+ # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29
+ # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
30
+ # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
31
+ # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
32
+ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
33
+ # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
+ # *******************************************************************************
35
+
1
36
  # Ruby libraries to include
2
37
  require 'json'
3
38
  require 'securerandom'