urbanopt-scenario 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +7 -0
  2. data/.github/CONTRIBUTING.md +58 -0
  3. data/.github/ISSUE_TEMPLATE/bug_report.md +27 -0
  4. data/.github/ISSUE_TEMPLATE/feature_request.md +23 -0
  5. data/.github/pull_request_template.md +23 -0
  6. data/.gitignore +26 -0
  7. data/.rdoc_options +36 -0
  8. data/.rspec +3 -0
  9. data/.rubocop.yml +10 -0
  10. data/.travis.yml +23 -0
  11. data/CHANGELOG.md +19 -0
  12. data/Gemfile +43 -0
  13. data/Jenkinsfile +10 -0
  14. data/LICENSE.md +27 -0
  15. data/RDOC_MAIN.md +39 -0
  16. data/README.md +39 -0
  17. data/Rakefile +51 -0
  18. data/deploy_docs.sh +5 -0
  19. data/doc_templates/LICENSE.md +27 -0
  20. data/doc_templates/README.md.erb +42 -0
  21. data/doc_templates/copyright_erb.txt +31 -0
  22. data/doc_templates/copyright_js.txt +4 -0
  23. data/doc_templates/copyright_ruby.txt +29 -0
  24. data/docs/.gitignore +3 -0
  25. data/docs/.vuepress/components/InnerJsonSchema.vue +84 -0
  26. data/docs/.vuepress/components/JsonSchema.vue +12 -0
  27. data/docs/.vuepress/components/ScenarioSchema.vue +12 -0
  28. data/docs/.vuepress/components/StaticLink.vue +8 -0
  29. data/docs/.vuepress/config.js +15 -0
  30. data/docs/.vuepress/highlight.js +8 -0
  31. data/docs/.vuepress/public/custom_rdoc_styles.css +74 -0
  32. data/docs/.vuepress/utils.js +17 -0
  33. data/docs/README.md +39 -0
  34. data/docs/package-lock.json +11817 -0
  35. data/docs/package.json +26 -0
  36. data/docs/schemas/scenario-schema.md +3 -0
  37. data/lib/change_log.rb +147 -0
  38. data/lib/measures/.rubocop.yml +5 -0
  39. data/lib/measures/default_feature_reports/LICENSE.md +27 -0
  40. data/lib/measures/default_feature_reports/README.md +56 -0
  41. data/lib/measures/default_feature_reports/README.md.erb +42 -0
  42. data/lib/measures/default_feature_reports/measure.rb +742 -0
  43. data/lib/measures/default_feature_reports/measure.xml +139 -0
  44. data/lib/measures/default_feature_reports/tests/USA_CO_Golden-NREL.724666_TMY3.epw +8768 -0
  45. data/lib/measures/default_feature_reports/tests/default_feature_reports_test.rb +238 -0
  46. data/lib/measures/default_feature_reports/tests/example_model.osm +4378 -0
  47. data/lib/urbanopt-scenario.rb +31 -0
  48. data/lib/urbanopt/scenario.rb +45 -0
  49. data/lib/urbanopt/scenario/default_reports.rb +40 -0
  50. data/lib/urbanopt/scenario/default_reports/construction_cost.rb +169 -0
  51. data/lib/urbanopt/scenario/default_reports/date.rb +97 -0
  52. data/lib/urbanopt/scenario/default_reports/distributed_generation.rb +187 -0
  53. data/lib/urbanopt/scenario/default_reports/end_use.rb +159 -0
  54. data/lib/urbanopt/scenario/default_reports/end_uses.rb +140 -0
  55. data/lib/urbanopt/scenario/default_reports/feature_report.rb +213 -0
  56. data/lib/urbanopt/scenario/default_reports/generator.rb +92 -0
  57. data/lib/urbanopt/scenario/default_reports/location.rb +99 -0
  58. data/lib/urbanopt/scenario/default_reports/logger.rb +44 -0
  59. data/lib/urbanopt/scenario/default_reports/program.rb +261 -0
  60. data/lib/urbanopt/scenario/default_reports/reporting_period.rb +298 -0
  61. data/lib/urbanopt/scenario/default_reports/scenario_report.rb +300 -0
  62. data/lib/urbanopt/scenario/default_reports/schema/README.md +34 -0
  63. data/lib/urbanopt/scenario/default_reports/schema/scenario_csv_columns.txt +13 -0
  64. data/lib/urbanopt/scenario/default_reports/schema/scenario_schema.json +830 -0
  65. data/lib/urbanopt/scenario/default_reports/solar_pv.rb +92 -0
  66. data/lib/urbanopt/scenario/default_reports/storage.rb +105 -0
  67. data/lib/urbanopt/scenario/default_reports/timeseries_csv.rb +258 -0
  68. data/lib/urbanopt/scenario/default_reports/validator.rb +97 -0
  69. data/lib/urbanopt/scenario/default_reports/wind.rb +92 -0
  70. data/lib/urbanopt/scenario/extension.rb +63 -0
  71. data/lib/urbanopt/scenario/logger.rb +42 -0
  72. data/lib/urbanopt/scenario/scenario_base.rb +79 -0
  73. data/lib/urbanopt/scenario/scenario_csv.rb +122 -0
  74. data/lib/urbanopt/scenario/scenario_datapoint_base.rb +162 -0
  75. data/lib/urbanopt/scenario/scenario_post_processor_base.rb +69 -0
  76. data/lib/urbanopt/scenario/scenario_post_processor_default.rb +98 -0
  77. data/lib/urbanopt/scenario/scenario_runner_base.rb +63 -0
  78. data/lib/urbanopt/scenario/scenario_runner_osw.rb +158 -0
  79. data/lib/urbanopt/scenario/simulation_dir_base.rb +90 -0
  80. data/lib/urbanopt/scenario/simulation_dir_osw.rb +261 -0
  81. data/lib/urbanopt/scenario/simulation_mapper_base.rb +47 -0
  82. data/lib/urbanopt/scenario/version.rb +35 -0
  83. data/urbanopt-scenario-gem.gemspec +38 -0
  84. metadata +251 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f3225219c08dfe2a6beb6fdf3ed6b26443eef98a
4
+ data.tar.gz: 97d3cc6a749f80df8b454812b14ddff48634b917
5
+ SHA512:
6
+ metadata.gz: 7b624a22f243fecceb510cd12eafc0a06856b61b0327e895371a77d16bf2be73d856b94febac2f7b72ab3a9d310db50f724da818979d5c442f217dcca071f619
7
+ data.tar.gz: 39938a49c4ae3f9ffeb76df9ad07f0f4902a5a3c236c645a3651739e6d97bd58c85f9243cd28c9766489588b3a30b850aefa22ce38f4b7285ac6a9312f63d712
@@ -0,0 +1,58 @@
1
+ # URBANopt Contribution Policy
2
+
3
+ ## Version 1.0
4
+
5
+ The URBANopt team welcomes your contribution to the project. You can contribute to the URBANopt project in several ways: by using the software, reporting issues, contributing documentation, or contributing code back to the project. The GitHub [Contributing to Open Source](https://opensource.guide/how-to-contribute/) guide provides a good overview. If you contribute code, you agree that your contribution may be incorporated into the URBANopt Software Development Kit (SDK) and made available under the URBANopt SDK license.
6
+
7
+ The contribution process for URBANopt is composed of three steps:
8
+
9
+ ## 1. Send consent email
10
+
11
+ In order for us to distribute your code as part of URBANopt under the URBANopt SDK [license](https://github.com/urbanopt/urbanopt-scenario-gem/blob/develop/LICENSE.md), we’ll need your consent. An email acknowledging your understanding of these terms and agreeing to them is all that will be asked of any contributor. Send an email to the URBANopt project manager ([see below](#documentation) for the address) including the following text and a list of co-contributors (if any):
12
+
13
+ *I agree to contribute to the URBANopt SDK. I agree to the following terms and conditions for my contributions: First, I agree that I am licensing the copyright to my contributions under the terms of the current URBANopt SDK license. Second, I hereby grant to Alliance for Sustainable Energy, LLC, to any successor manager and distributor of URBANopt SDK appointed by the U.S. Department of Energy, and to all recipients of a version of URBANopt SDK that includes my contributions, a non-exclusive, worldwide, royalty-free, irrevocable patent license under any patent claims owned by me, or owned by my employer and known to me, that are or will be,necessarily infringed upon by my contributions alone, or by combination of my contributions with the version of URBANopt SDK to which they are contributed, to make, have made, use, offer to sell, sell, import, and otherwise transfer any version of URBANopt SDK that includes my contributions, in source code and object code form. Third, I represent and warrant that I am authorized to make the contributions and grant the foregoing license(s). Additionally, if, to my knowledge, my employer has rights to intellectual property that covers my contributions, I represent and warrant that I have received permission to make these contributions and grant the foregoing license(s) on behalf of my employer.*
14
+
15
+ Once we have your consent on file, you’ll only need to redo it if conditions change (e.g. a change of employer).
16
+
17
+ ## 2. Scope agreement and timeline commitment
18
+
19
+ If your contribution is small (e.g. a bug fix), simply submit your contribution via GitHub. If you find a bug, first make sure it is not an already known issue, then report it in the GitHub [issue tracker](https://github.com/urbanopt/urbanopt-scenario-gem/issues) for this repository. If your contribution is larger (e.g. a new feature or new functionality/capability), we’ll need to evaluate your proposed contribution first. We may ask you to revise your materials and make changes to it, which we will then re-review.
20
+
21
+ ## 3. Technical contribution process
22
+
23
+ We want URBANopt to adhere to our established quality standards. Smaller, non-code contributions may not require as much review as code contributions, but all contributions will be reviewed. Code contributions will initially be in a source control branch, and then will be merged into the official URBANopt repository after review and approval. Any bugs, either discovered by you, us, or any users will be tracked in our issue tracker. We request that you take full responsibility for correcting bugs. Be aware that, unless notified otherwise, the correction of bugs takes precedence over the submission or creation of new code.
24
+
25
+ ### Release Schedule
26
+
27
+ Contributions should be aligned with the URBANopt release schedule. The URBANopt SDK is currently released publicly two times each year (approximately on the last workday of March and October). There are cutoff dates for when new contributions are allowed for the upcoming release (approximately two weeks before release date). If your contribution is incomplete or comes in past the cutoff date for a release, we reserve the right to hold your code for a later release.
28
+
29
+ ### Coding Standards
30
+
31
+ Make sure you read and follow the coding standards when writing URBANopt SDK code. Although these standards are not complete or very detailed, they should give you an idea of the style that we would like you to adopt. New additions to the URBANopt SDK must be written using object-oriented programming techniques and practices. Please also look at the URBANopt SDK code itself as an example of the preferred coding style.
32
+
33
+ ### Code Reviews
34
+
35
+ You will be working and testing your code in a source control branch. When a piece of functionality is complete, tested and working, let us know and we will review your code. If the functionality that you contributed is complex, we may ask you for a written design document as well. We want your code to follow coding standards, be clear, readable, and maintainable, and of course it should do what it is supposed to do. We will look for errors, style issues, comments (or lack thereof), and any other issues in your code. We will inform you of our comments and we expect you to make the recommended changes. New re-reviews may be expected until the code complies with our required processes.
36
+
37
+ ### Unit Tests
38
+
39
+ We ask that you supply unit tests along with the code that you have written. A unit test is a program that exercises your code in isolation to verify that it does what it is supposed to do. Your unit tests are very important to us. First, they give an indication that your code works according to its intended functionality. Second, we execute your unit tests automatically along with our unit tests to verify that the overall URBANopt SDK code continues to work.
40
+
41
+ ### Code Coverage
42
+
43
+ We require that your unit tests provide an adequate coverage of the source code you are submitting. You will need to design your unit tests in such a way that all critical parts of the code (at least) are tested and verified.
44
+
45
+ ### Documentation
46
+
47
+ Proper documentation is crucial for our users, without it users will not know how to use your contribution. We require that you create user documentation so that end users know how to use your new functionality.
48
+
49
+ For further questions or information:
50
+
51
+ - Ben Polly\
52
+ URBANopt Project Management\
53
+ ben.polly@nrel.gov\
54
+ (303) 384-7429
55
+
56
+ URBANopt is funded by the U.S. Department of Energy (DOE) and managed by the National Renewable Energy Laboratory (NREL).
57
+
58
+ URBANopt is developed in collaboration with NREL, LBNL, and private firms.
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+ ---
8
+
9
+ ### Expected behavior
10
+
11
+ _A clear and concise description of what you expected to happen._
12
+
13
+ ### Actual behavior
14
+
15
+ _A clear and concise description of what actually happens._
16
+
17
+ ### To Reproduce
18
+
19
+ Steps to reproduce the behavior:
20
+
21
+ 1. Go to '...'
22
+ 1. Enter '...'
23
+ 1. Enter '...'
24
+
25
+ ### Additional context
26
+
27
+ _E.g.: Windows, Mac, Linux? Are you behind a firewall? Do you have additional security constraints?_
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+ ---
8
+
9
+ ### Is your feature request related to a problem? Please describe
10
+
11
+ A clear and concise description of what the problem is. _I'm frustred when..._
12
+
13
+ ### Describe the solution you'd like
14
+
15
+ A clear and concise description of what you want to happen.
16
+
17
+ ### Describe alternatives you've considered
18
+
19
+ A clear and concise description of any alternative solutions or features you've considered.
20
+
21
+ ### Additional context
22
+
23
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+ ---
8
+
9
+ Addresses #[issue number here].
10
+
11
+ ## Pull Request Description
12
+
13
+ [description here]
14
+
15
+ ## Checklist
16
+
17
+ Not all may apply:
18
+
19
+ - [ ] Unit tests have been added or updated
20
+ - [ ] Documentation has been modified appropriately
21
+ - [ ] All tests are passing (green) on circleci
22
+ - [ ] The [changelog](https://github.com/urbanopt/urbanopt-scenario-gem/blob/develop/CHANGELOG.md) has been updated appropriately
23
+ - [ ] This branch is up-to-date with master
@@ -0,0 +1,26 @@
1
+ .bundle/
2
+ .DS_Store
3
+ /.yardoc
4
+ /.ruby-version
5
+ Gemfile.lock
6
+ /gems
7
+ /_yardoc/
8
+ /coverage/
9
+ /doc/
10
+ /pkg/
11
+ /spec/reports/
12
+ /spec/test/
13
+ /tmp/
14
+ /test/
15
+ /lib/measures/test_results
16
+ /lib/measures/*/tests/output
17
+
18
+ .rubocop*s3*
19
+
20
+ # rspec failure tracking
21
+ .rspec_status
22
+
23
+ # Ignore IDE files
24
+ /.idea
25
+ runner.conf
26
+
@@ -0,0 +1,36 @@
1
+ --- !ruby/object:RDoc::Options
2
+ encoding: UTF-8
3
+ static_path: []
4
+ rdoc_include:
5
+ - lib
6
+ charset: UTF-8
7
+ exclude:
8
+ - doc_templates
9
+ - docs
10
+ - lib/measures
11
+ - node_modules
12
+ - spec
13
+ - test
14
+ - Gemfile
15
+ - Gemfile.lock
16
+ - Jenkinsfile
17
+ - LICENSE.md
18
+ - README.md
19
+ - Rakefile
20
+ - urbanopt-scenario-gem.gemspec
21
+ - JSON
22
+ - Object
23
+ hyperlink_all: false
24
+ line_numbers: false
25
+ locale:
26
+ locale_dir: locale
27
+ locale_name:
28
+ main_page: RDOC_MAIN.md
29
+ output_decoration: true
30
+ op_dir: ./docs/.vuepress/public/rdoc
31
+ show_hash: false
32
+ tab_width: 8
33
+ template_stylesheets: ["./docs/.vuepress/public/custom_rdoc_styles.css"]
34
+ title:
35
+ visibility: :protected
36
+ webcvs:
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
@@ -0,0 +1,10 @@
1
+ AllCops:
2
+ Exclude:
3
+ - gems/**/*
4
+ - measures/**/*
5
+ - spec/files/**/measures/**/*
6
+
7
+
8
+ inherit_from:
9
+ - http://s3.amazonaws.com/openstudio-resources/styles/rubocop.yml
10
+
@@ -0,0 +1,23 @@
1
+ ---
2
+ sudo: false
3
+ language: ruby
4
+ #cache: bundler
5
+ rvm:
6
+ - 2.2.4
7
+ matrix:
8
+ include:
9
+ - env: OPENSTUDIO_VERSION=2.7.0 && OPENSTUDIO_SHA=544f363db5 && RUBYLIB=/usr/local/openstudio-2.7.0/Ruby:/usr/Ruby
10
+ before_install:
11
+ - gem install bundler -v '1.17'
12
+ - gem install bundler -v '~> 1.17'
13
+ install:
14
+ - bundle install
15
+ before_script:
16
+ - curl -sLO https://raw.githubusercontent.com/NREL/OpenStudio-server/develop/docker/deployment/scripts/install_openstudio.sh
17
+ - chmod +x install_openstudio.sh
18
+ - sudo ./install_openstudio.sh $OPENSTUDIO_VERSION $OPENSTUDIO_SHA
19
+ - sudo ./install_openstudio.sh $OPENSTUDIO_VERSION $OPENSTUDIO_SHA
20
+ script:
21
+ - bundle exec rake
22
+ - bundle exec rake
23
+
@@ -0,0 +1,19 @@
1
+ # URBANopt Scenario Gem
2
+
3
+ ## Version 0.1.1
4
+
5
+ Date Range: 10/16/19 - 01/14/20
6
+
7
+ Accepted Pull Requests:
8
+ - Fixed [#34]( https://github.com/urbanopt/urbanopt-scenario-gem/pull/34 ), Post process
9
+ - Fixed [#44]( https://github.com/urbanopt/urbanopt-scenario-gem/pull/44 ), reopt integrations
10
+ - Fixed [#47]( https://github.com/urbanopt/urbanopt-scenario-gem/pull/47 ), Use runner.conf for run options
11
+ - Fixed [#48]( https://github.com/urbanopt/urbanopt-scenario-gem/pull/48 ), Bump mixin-deep from 1.3.1 to 1.3.2 in /docs
12
+ - Fixed [#49]( https://github.com/urbanopt/urbanopt-scenario-gem/pull/49 ), Bump lodash from 4.17.11 to 4.17.15 in /docs
13
+ - Fixed [#50]( https://github.com/urbanopt/urbanopt-scenario-gem/pull/50 ), Bump lodash.template from 4.4.0 to 4.5.0 in /docs
14
+ - Fixed [#51]( https://github.com/urbanopt/urbanopt-scenario-gem/pull/51 ), Der
15
+ - Fixed [#61]( https://github.com/urbanopt/urbanopt-scenario-gem/pull/61 ), GitHub security
16
+ - Fixed [#62]( https://github.com/urbanopt/urbanopt-scenario-gem/pull/62 ), Update issue templates
17
+ - Fixed [#64]( https://github.com/urbanopt/urbanopt-scenario-gem/pull/64 ), update dependency versions for security
18
+
19
+ ## Version 0.1.0
data/Gemfile ADDED
@@ -0,0 +1,43 @@
1
+ source 'http://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in urbanopt-scenario-gem.gemspec
4
+ gemspec
5
+
6
+ # Local gems are useful when developing and integrating the various dependencies.
7
+ # To favor the use of local gems, set the following environment variable:
8
+ # Mac: export FAVOR_LOCAL_GEMS=1
9
+ # Windows: set FAVOR_LOCAL_GEMS=1
10
+ # Note that if allow_local is true, but the gem is not found locally, then it will
11
+ # checkout the latest version (develop) from github.
12
+ allow_local = ENV['FAVOR_LOCAL_GEMS']
13
+
14
+ # Uncomment the extension and common measures gem if you need to test local development versions. Otherwise
15
+ # these are included in the model articulation gem.
16
+ #
17
+ # if allow_local && File.exist?('../OpenStudio-extension-gem')
18
+ # gem 'openstudio-extension', path: '../OpenStudio-extension-gem'
19
+ # elsif allow_local
20
+ # gem 'openstudio-extension', github: 'NREL/OpenStudio-extension-gem', branch: 'develop'
21
+ # end
22
+ #
23
+ # if allow_local && File.exist?('../openstudio-common-measures-gem')
24
+ # gem 'openstudio-common-measures', path: '../openstudio-common-measures-gem'
25
+ # elsif allow_local
26
+ # gem 'openstudio-common-measures', github: 'NREL/openstudio-common-measures-gem', branch: 'develop'
27
+ # end
28
+
29
+ if allow_local && File.exist?('../openstudio-model-articulation-gem')
30
+ gem 'openstudio-model-articulation', path: '../openstudio-model-articulation-gem'
31
+ elsif allow_local
32
+ gem 'openstudio-model-articulation', github: 'NREL/openstudio-model-articulation-gem', branch: 'develop'
33
+ end
34
+
35
+ if allow_local && File.exist?('../urbanopt-core-gem')
36
+ gem 'urbanopt-core', path: '../urbanopt-core-gem'
37
+ elsif allow_local
38
+ gem 'urbanopt-core', github: 'URBANopt/urbanopt-core-gem', branch: 'develop'
39
+ end
40
+
41
+ # simplecov has an unnecessary dependency on native json gem, use fork that does not require this
42
+ gem 'simplecov', github: 'NREL/simplecov'
43
+ # gem 'rdoc'
@@ -0,0 +1,10 @@
1
+ //Jenkins pipelines are stored in shared libaries. Please see: https://github.com/tijcolem/nrel_cbci_jenkins_libs
2
+
3
+ @Library('cbci_shared_libs') _
4
+
5
+ // Build for PR to develop branch only.
6
+ if ((env.CHANGE_ID) && (env.CHANGE_TARGET) ) { // check if set
7
+
8
+ openstudio_extension_gems()
9
+
10
+ }
@@ -0,0 +1,27 @@
1
+ URBANopt, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
2
+ contributors. All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without modification,
5
+ are permitted provided that the following conditions are met:
6
+
7
+ Redistributions of source code must retain the above copyright notice, this list
8
+ of conditions and the following disclaimer.
9
+
10
+ Redistributions in binary form must reproduce the above copyright notice, this
11
+ list of conditions and the following disclaimer in the documentation and/or other
12
+ materials provided with the distribution.
13
+
14
+ Neither the name of the copyright holder nor the names of its contributors may be
15
+ used to endorse or promote products derived from this software without specific
16
+ prior written permission.
17
+
18
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21
+ IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
23
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
26
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
27
+ OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,39 @@
1
+ # URBANopt Scenario Gem
2
+
3
+ ### [back to main docs](../)
4
+
5
+ The URBANopt Scenario Gem includes functionality for defining scenarios, running simulations, and post-processing results. User defined SimulationMapper classes translate each Feature to a SimulationDir which is a directory containing simulation input files. A ScenarioRunner is used to perform simulations for each SimulationDir. Finally, a ScenarioPostProcessor can run on a Scenario to generate scenario level results.
6
+
7
+ [RDoc Documentation](https://urbanopt.github.io/urbanopt-scenario-gem/)
8
+
9
+ ## Installation
10
+
11
+ Add this line to your application's Gemfile:
12
+
13
+ ```ruby
14
+ gem 'urbanopt-scenario'
15
+ ```
16
+
17
+ And then execute:
18
+
19
+ $ bundle install
20
+ $ bundle update
21
+
22
+ Or install it yourself as:
23
+
24
+ $ gem install 'urbanopt-scenario'
25
+
26
+ ## Testing
27
+
28
+ Check out the repository and then execute:
29
+
30
+ $ bundle install
31
+ $ bundle update
32
+ $ bundle exec rake
33
+
34
+ ## Releasing
35
+
36
+ * Update change log
37
+ * Update version in `/lib/urbanopt/scenario/version.rb`
38
+ * Merge down to master
39
+ * run `rake release` from master
@@ -0,0 +1,39 @@
1
+ # URBANopt Scenario Gem
2
+
3
+ The URBANopt Scenario Gem includes functionality for defining scenarios, running simulations, and post-processing results. User defined SimulationMapper classes translate each Feature to a SimulationDir which is a directory containing simulation input files. A ScenarioRunner is used to perform simulations for each SimulationDir. Finally, a ScenarioPostProcessor can run on a Scenario to generate scenario level results.
4
+
5
+ [RDoc Documentation](https://urbanopt.github.io/urbanopt-scenario-gem/)
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'urbanopt-scenario'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle install
18
+ $ bundle update
19
+
20
+ Or install it yourself as:
21
+
22
+ $ gem install 'urbanopt-scenario'
23
+
24
+ ## Testing
25
+
26
+ Check out the repository and then execute:
27
+
28
+ $ bundle install
29
+ $ bundle update
30
+ $ bundle exec rake
31
+
32
+ ## Releasing
33
+
34
+ * Update CHANGELOG.md
35
+ * Run `rake rubocop:auto_correct`
36
+ * Update version in `/lib/urbanopt/scenario/version.rb`
37
+ * Create PR to master, after tests and reviews complete, then merge
38
+ * Locally - from the master branch, run `rake release`
39
+ * On GitHub, go to the releases page and update the latest release tag. Name it “Version x.y.z” and copy the CHANGELOG entry into the description box.
@@ -0,0 +1,51 @@
1
+ # *********************************************************************************
2
+ # URBANopt, Copyright (c) 2019, Alliance for Sustainable Energy, LLC, and other
3
+ # contributors. All rights reserved.
4
+ #
5
+ # Redistribution and use in source and binary forms, with or without modification,
6
+ # are permitted provided that the following conditions are met:
7
+ #
8
+ # Redistributions of source code must retain the above copyright notice, this list
9
+ # of conditions and the following disclaimer.
10
+ #
11
+ # Redistributions in binary form must reproduce the above copyright notice, this
12
+ # list of conditions and the following disclaimer in the documentation and/or other
13
+ # materials provided with the distribution.
14
+ #
15
+ # Neither the name of the copyright holder nor the names of its contributors may be
16
+ # used to endorse or promote products derived from this software without specific
17
+ # prior written permission.
18
+ #
19
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20
+ # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21
+ # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22
+ # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
23
+ # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24
+ # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25
+ # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26
+ # 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
28
+ # OF THE POSSIBILITY OF SUCH DAMAGE.
29
+ # *********************************************************************************
30
+ #
31
+ require 'bundler/gem_tasks'
32
+ require 'rspec/core/rake_task'
33
+
34
+ RSpec::Core::RakeTask.new(:spec)
35
+
36
+ # Load in the rake tasks from the base extension gem
37
+ require 'openstudio/extension/rake_task'
38
+ require 'urbanopt/scenario'
39
+ rake_task = OpenStudio::Extension::RakeTask.new
40
+ rake_task.set_extension_class(URBANopt::Scenario::Extension)
41
+
42
+ require 'rubocop/rake_task'
43
+ RuboCop::RakeTask.new
44
+
45
+ task :clear_all do
46
+ Dir.glob(File.join(File.dirname(__FILE__), '/spec/test/example_scenario/*')).each do |f|
47
+ FileUtils.rm_rf(f)
48
+ end
49
+ end
50
+
51
+ task default: :spec