urbanopt-geojson 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +24 -0
- data/.rakeTasks +7 -0
- data/.rdoc_options +43 -0
- data/.rspec +2 -0
- data/.rubocop.yml +10 -0
- data/.travis.yml +35 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +27 -0
- data/Jenkinsfile +10 -0
- data/LICENSE.md +27 -0
- data/RDOC_MAIN.md +48 -0
- data/README.md +40 -0
- data/Rakefile +45 -0
- data/deploy_docs.sh +4 -0
- data/doc_templates/LICENSE.md +27 -0
- data/doc_templates/README.md.erb +42 -0
- data/doc_templates/copyright_erb.txt +31 -0
- data/doc_templates/copyright_js.txt +4 -0
- data/doc_templates/copyright_ruby.txt +29 -0
- data/docs/.gitignore +3 -0
- data/docs/.vuepress/components/BuildingProperties.vue +12 -0
- data/docs/.vuepress/components/DistrictSystemProperties.vue +12 -0
- data/docs/.vuepress/components/ElectricalConnectorProperties.vue +12 -0
- data/docs/.vuepress/components/ElectricalJunctionProperties.vue +12 -0
- data/docs/.vuepress/components/InnerJsonSchema.vue +80 -0
- data/docs/.vuepress/components/JsonSchema.vue +12 -0
- data/docs/.vuepress/components/RegionProperties.vue +12 -0
- data/docs/.vuepress/components/SiteProperties.vue +12 -0
- data/docs/.vuepress/components/StaticLink.vue +8 -0
- data/docs/.vuepress/components/ThermalConnectorProperties.vue +12 -0
- data/docs/.vuepress/components/ThermalJunctionProperties.vue +12 -0
- data/docs/.vuepress/config.js +22 -0
- data/docs/.vuepress/highlight.js +8 -0
- data/docs/.vuepress/public/custom_rdoc_styles.css +64 -0
- data/docs/.vuepress/utils.js +17 -0
- data/docs/README.md +30 -0
- data/docs/doc/created.rid +0 -0
- data/docs/package-lock.json +11771 -0
- data/docs/package.json +22 -0
- data/docs/schemas/building-properties.md +3 -0
- data/docs/schemas/district-system-properties.md +3 -0
- data/docs/schemas/electrical-connector-properties.md +3 -0
- data/docs/schemas/electrical-junction-properties.md +3 -0
- data/docs/schemas/region-properties.md +3 -0
- data/docs/schemas/site-properties.md +3 -0
- data/docs/schemas/thermal-connector-properties.md +3 -0
- data/docs/schemas/thermal-junction-properties.md +3 -0
- data/lib/measures/.rubocop.yml +5 -0
- data/lib/measures/urban_geometry_creation/LICENSE.md +27 -0
- data/lib/measures/urban_geometry_creation/README.md +48 -0
- data/lib/measures/urban_geometry_creation/README.md.erb +42 -0
- data/lib/measures/urban_geometry_creation/measure.rb +199 -0
- data/lib/measures/urban_geometry_creation/measure.xml +139 -0
- data/lib/measures/urban_geometry_creation/tests/nrel_stm_footprints.geojson +3238 -0
- data/lib/measures/urban_geometry_creation/tests/shadowed_tests.rb +80 -0
- data/lib/measures/urban_geometry_creation/tests/urban_geometry_creation_test.rb +143 -0
- data/lib/measures/urban_geometry_creation_zoning/LICENSE.md +27 -0
- data/lib/measures/urban_geometry_creation_zoning/README.md +48 -0
- data/lib/measures/urban_geometry_creation_zoning/README.md.erb +42 -0
- data/lib/measures/urban_geometry_creation_zoning/measure.rb +203 -0
- data/lib/measures/urban_geometry_creation_zoning/measure.xml +133 -0
- data/lib/measures/urban_geometry_creation_zoning/tests/nrel_stm_footprints.geojson +3238 -0
- data/lib/measures/urban_geometry_creation_zoning/tests/urban_geometry_creation_test.rb +143 -0
- data/lib/urbanopt/geojson.rb +41 -0
- data/lib/urbanopt/geojson/building.rb +341 -0
- data/lib/urbanopt/geojson/district_system.rb +53 -0
- data/lib/urbanopt/geojson/extension.rb +63 -0
- data/lib/urbanopt/geojson/feature.rb +206 -0
- data/lib/urbanopt/geojson/geo_file.rb +154 -0
- data/lib/urbanopt/geojson/helper.rb +340 -0
- data/lib/urbanopt/geojson/logging.rb +46 -0
- data/lib/urbanopt/geojson/mapper_classes.rb +85 -0
- data/lib/urbanopt/geojson/model.rb +133 -0
- data/lib/urbanopt/geojson/region.rb +55 -0
- data/lib/urbanopt/geojson/schema/building_properties.json +358 -0
- data/lib/urbanopt/geojson/schema/district_system_properties.json +137 -0
- data/lib/urbanopt/geojson/schema/electrical_connector_properties.json +77 -0
- data/lib/urbanopt/geojson/schema/electrical_junction_properties.json +64 -0
- data/lib/urbanopt/geojson/schema/geojson_schema.json +323 -0
- data/lib/urbanopt/geojson/schema/region_properties.json +93 -0
- data/lib/urbanopt/geojson/schema/site_properties.json +87 -0
- data/lib/urbanopt/geojson/schema/thermal_connector_properties.json +107 -0
- data/lib/urbanopt/geojson/schema/thermal_junction_properties.json +83 -0
- data/lib/urbanopt/geojson/update_areas.rb +102 -0
- data/lib/urbanopt/geojson/validate_geojson.rb +147 -0
- data/lib/urbanopt/geojson/version.rb +35 -0
- data/lib/urbanopt/geojson/workflows/building.osw +187 -0
- data/lib/urbanopt/geojson/workflows/building.osw.out +2806 -0
- data/lib/urbanopt/geojson/workflows/district_system.osw +84 -0
- data/lib/urbanopt/geojson/workflows/district_system.osw.out +646 -0
- data/lib/urbanopt/geojson/zoning.rb +134 -0
- data/package-lock.json +3 -0
- data/urbanopt-geojson-gem.gemspec +39 -0
- metadata +238 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2afe9730a81071fc7bcf3a584298c6771d3d4766
|
4
|
+
data.tar.gz: 48a7b0ec274e3f6494d5855e75ab3c74caf8d5c4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 332c02871d7688938821dcfdcadef5181a2305b0b5e2fefef31d6332ea57ee4dff21009f7cd469843c1b30e2280b44422cf86820b4f1e4ff1e590d06d3418caf
|
7
|
+
data.tar.gz: d98d982d60a8242eaee9007bf7e7944c7b7014edc994ce4c2efb480e7a102cd3fe2100d5eed2843e74e46947e89ae8ad3f545fcbb515cd88e4e25b4c5d7ace1d
|
data/.gitignore
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
/.bundle/
|
2
|
+
/.yardoc
|
3
|
+
/.ruby-version
|
4
|
+
/Gemfile.lock
|
5
|
+
/gems
|
6
|
+
/_yardoc/
|
7
|
+
/coverage/
|
8
|
+
/doc/
|
9
|
+
/pkg/
|
10
|
+
/spec/reports/
|
11
|
+
/tmp/
|
12
|
+
/test/
|
13
|
+
/lib/measures/test_results
|
14
|
+
/lib/measures/*/tests/output
|
15
|
+
out.txt
|
16
|
+
.rubocop*s3*
|
17
|
+
|
18
|
+
# rspec failure tracking
|
19
|
+
.rspec_status
|
20
|
+
|
21
|
+
# Ignore IDE files
|
22
|
+
/.idea
|
23
|
+
.DS_Store
|
24
|
+
urbanopt-geojson-*.gem
|
data/.rakeTasks
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<Settings><!--This file was automatically generated by Ruby plugin.
|
3
|
+
You are allowed to:
|
4
|
+
1. Remove rake task
|
5
|
+
2. Add existing rake tasks
|
6
|
+
To add existing rake tasks automatically delete this file and reload the project.
|
7
|
+
--><RakeGroup description="" fullCmd="" taksId="rake" /></Settings>
|
data/.rdoc_options
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
--- !ruby/object:RDoc::Options
|
2
|
+
encoding: UTF-8
|
3
|
+
static_path: []
|
4
|
+
rdoc_include:
|
5
|
+
- lib
|
6
|
+
charset: UTF-8
|
7
|
+
exclude:
|
8
|
+
- docs
|
9
|
+
- node_modules
|
10
|
+
- Gemfile
|
11
|
+
- Gemfile.lock
|
12
|
+
- LICENSE
|
13
|
+
- Rakefile
|
14
|
+
- Jenkinsfile
|
15
|
+
- README.md
|
16
|
+
- !ruby/regexp /(copyright)/
|
17
|
+
- !ruby/regexp /(\.css)/
|
18
|
+
- !ruby/regexp /(\.erb)/
|
19
|
+
- !ruby/regexp /(\.html)/
|
20
|
+
- !ruby/regexp /(\.geojson)/
|
21
|
+
- !ruby/regexp /(\.json)/
|
22
|
+
- !ruby/regexp /(\.js)/
|
23
|
+
- !ruby/regexp /(\.osw)/
|
24
|
+
- !ruby/regexp /(\.osw.out)/
|
25
|
+
- !ruby/regexp /(\.osm)/
|
26
|
+
- !ruby/regexp /(\.xml)/
|
27
|
+
- !ruby/regexp /(lib\/measures)/
|
28
|
+
- urbanopt-geojson-gem.gemspec
|
29
|
+
hyperlink_all: false
|
30
|
+
line_numbers: false
|
31
|
+
locale:
|
32
|
+
locale_dir: locale
|
33
|
+
locale_name:
|
34
|
+
main_page: RDOC_MAIN.md
|
35
|
+
#markup: markdown
|
36
|
+
output_decoration: true
|
37
|
+
op_dir: ./docs/.vuepress/public/rdoc
|
38
|
+
show_hash: false
|
39
|
+
tab_width: 8
|
40
|
+
template_stylesheets: ["./docs/.vuepress/public/custom_rdoc_styles.css"]
|
41
|
+
title:
|
42
|
+
visibility: :protected
|
43
|
+
webcvs:
|
data/.rspec
ADDED
data/.rubocop.yml
ADDED
data/.travis.yml
ADDED
@@ -0,0 +1,35 @@
|
|
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
|
+
- bash -c 'cd docs && npm i'
|
16
|
+
before_script:
|
17
|
+
- curl -sLO https://raw.githubusercontent.com/NREL/OpenStudio-server/develop/docker/deployment/scripts/install_openstudio.sh
|
18
|
+
- chmod +x install_openstudio.sh
|
19
|
+
- sudo ./install_openstudio.sh $OPENSTUDIO_VERSION $OPENSTUDIO_SHA
|
20
|
+
- sudo ./install_openstudio.sh $OPENSTUDIO_VERSION $OPENSTUDIO_SHA
|
21
|
+
script:
|
22
|
+
- bundle exec rake
|
23
|
+
- bundle exec rake openstudio:list_measures
|
24
|
+
- bundle exec rake openstudio:update_measures
|
25
|
+
- bundle exec rake openstudio:test_with_openstudio
|
26
|
+
- bundle exec rake
|
27
|
+
- bundle exec rdoc
|
28
|
+
- bash -c 'cd docs && npm run build'
|
29
|
+
deploy:
|
30
|
+
provider: pages
|
31
|
+
local-dir: docs/.vuepress/dist
|
32
|
+
skip-cleanup: true
|
33
|
+
github-token: $GITHUB_TOKEN
|
34
|
+
on:
|
35
|
+
branch: master
|
data/CHANGELOG.md
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
source 'http://rubygems.org'
|
2
|
+
|
3
|
+
# Specify your gem's dependencies in urbanopt-geojson-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
|
+
if allow_local && File.exist?('../OpenStudio-extension-gem')
|
15
|
+
gem 'openstudio-extension', path: '../OpenStudio-extension-gem'
|
16
|
+
elsif allow_local
|
17
|
+
gem 'openstudio-extension', github: 'NREL/OpenStudio-extension-gem', branch: 'develop'
|
18
|
+
end
|
19
|
+
|
20
|
+
if allow_local && File.exist?('../urbanopt-core-gem')
|
21
|
+
gem 'urbanopt-core', path: '../urbanopt-core-gem'
|
22
|
+
elsif allow_local
|
23
|
+
gem 'urbanopt-core', github: 'URBANopt/urbanopt-core-gem', branch: 'develop'
|
24
|
+
end
|
25
|
+
|
26
|
+
# simplecov has an unnecessary dependency on native json gem, use fork that does not require this
|
27
|
+
gem 'simplecov', github: 'NREL/simplecov'
|
data/Jenkinsfile
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
//Jenkins pipelines are stored in shared libraries. 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
|
+
}
|
data/LICENSE.md
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
URBANopt, Copyright (c) 2019, 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.
|
data/RDOC_MAIN.md
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
# UrbanOpt GeoJSON Gem
|
2
|
+
|
3
|
+
### [back to main docs](../)
|
4
|
+
|
5
|
+
The URBANopt GeoJSON Gem has been developed by restructuring methods extracted from the
|
6
|
+
[urban_geometry_creation](https://github.com/NREL/openstudio-urban-measures/tree/develop/measures/urban_geometry_creation)
|
7
|
+
and
|
8
|
+
[urban_geometry_creation_zoning.](https://github.com/NREL/openstudio-urban-measures/tree/develop/measures/urban_geometry_creation_zoning)
|
9
|
+
|
10
|
+
The +urban_geometry_creation+ measure can be used to create an OpenStudio Model for the
|
11
|
+
building feature and create the surrounding buildings as shading objects.
|
12
|
+
|
13
|
+
The +urban_geometry_creation_zoning+ measure is under development and would be used for creating an OpenStudio
|
14
|
+
Model with zoning in the future.
|
15
|
+
|
16
|
+
The main components of the gem are:
|
17
|
+
|
18
|
+
- geojson.rb : Base gem file that imports all modules and classes.
|
19
|
+
- extension.rb : The extension class inherits from OpenStudio::Extension::Extension, and
|
20
|
+
overrides the following methods as needed -
|
21
|
+
- _measures_dir_
|
22
|
+
- _files_dir_
|
23
|
+
- _doc_templates_dir_
|
24
|
+
- Gemfile and .gemspec : Describe the extension dependencies on other gems.
|
25
|
+
- Classes and Modules within +lib/urbanopt/geojson+ -
|
26
|
+
|
27
|
+
|
28
|
+
*Modules that do not require instances for calling the methods:*
|
29
|
+
|
30
|
+
- URBANopt::GeoJSON::Helper : Contains methods extracted from the two measures to
|
31
|
+
perform utility-like tasks like - +is_shaded+ and +is_shadowed+.
|
32
|
+
- URBANopt::GeoJSON::Zoning : Contains methods extracted from
|
33
|
+
+urban_geometry_creation_zoning+ .
|
34
|
+
- URBANopt::GeoJSON::Model : Contains methods that perform tasks on an instance of
|
35
|
+
+OpenStudio::Model::Model+.
|
36
|
+
|
37
|
+
*Classes and subclasses that contain instance-dependant methods and private methods
|
38
|
+
that perform tasks on the given feature.*
|
39
|
+
|
40
|
+
- URBANopt::GeoJSON::GeoFile : Contains a +get_feature+ method that returns an
|
41
|
+
instance of a Feature Subclass for the the feature type. Also contains methods to validate the GeoJSON
|
42
|
+
file against the GeoJSON schema.
|
43
|
+
- URBANopt::GeoJSON::Feature : Contains methods to return +feature+ +id+ , +name+ ,
|
44
|
+
+multiple+ +polygons+ +coordinates+ which are inherited by classes for all feature types.
|
45
|
+
- URBANopt::GeoJSON::Building : A subclass of Feature, contains class methods that
|
46
|
+
are specific to handling features of the Building type.
|
47
|
+
- URBANopt::GeoJSON::DistrictSystem : A subclass of Feature, contains class methods
|
48
|
+
that are specific to handling features of District System type. *Note: This subclass does not contain any methods yet*.
|
data/README.md
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
# URBANopt GeoJSON Gem
|
2
|
+
|
3
|
+
Library and measures to translate URBANopt GeoJSON format to OpenStudio. See the [developer documentation](https://urbanopt.github.io/urbanopt-geojson-gem/) for more details.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'urbanopt-geojson'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install 'urbanopt-geojson'
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
The URBANopt GeoJSON Gem is an OpenStudio Extension Gem with functionality to translate
|
24
|
+
information in a GeoJSON format to energy model inputs. GeoJSON is a commonly used format
|
25
|
+
for describing geospatial data related to the built environment.
|
26
|
+
|
27
|
+
The current functionalities of the URBANopt GeoJSON gem include:
|
28
|
+
|
29
|
+
* Validate a GeoJSON file
|
30
|
+
* Calculate available roof area for photovoltaics.
|
31
|
+
* Translate Building Feature to an OpenStudio Model.
|
32
|
+
* Translate Building Feature to OpenStudio Shading Objects.
|
33
|
+
|
34
|
+
# Releasing
|
35
|
+
|
36
|
+
* Update change log
|
37
|
+
* Update version in `/lib/urbanopt/geojson/version.rb`
|
38
|
+
* Merge down to master
|
39
|
+
* Release via github
|
40
|
+
* run `rake release` from master
|
data/Rakefile
ADDED
@@ -0,0 +1,45 @@
|
|
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/geojson'
|
39
|
+
rake_task = OpenStudio::Extension::RakeTask.new
|
40
|
+
rake_task.set_extension_class(URBANopt::GeoJSON::Extension)
|
41
|
+
|
42
|
+
require 'rubocop/rake_task'
|
43
|
+
RuboCop::RakeTask.new
|
44
|
+
|
45
|
+
task default: :spec
|
data/deploy_docs.sh
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
URBANopt, Copyright (c) 2019, 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,42 @@
|
|
1
|
+
<%#= README.md.erb is used to auto-generate README.md. %>
|
2
|
+
<%#= To manually maintain README.md throw away README.md.erb and manually edit README.md %>
|
3
|
+
###### (Automatically generated documentation)
|
4
|
+
|
5
|
+
# <%= name %>
|
6
|
+
|
7
|
+
## Description
|
8
|
+
<%= description %>
|
9
|
+
|
10
|
+
## Modeler Description
|
11
|
+
<%= modelerDescription %>
|
12
|
+
|
13
|
+
## Measure Type
|
14
|
+
<%= measureType %>
|
15
|
+
|
16
|
+
## Taxonomy
|
17
|
+
<%= taxonomy %>
|
18
|
+
|
19
|
+
## Arguments
|
20
|
+
|
21
|
+
<% arguments.each do |argument| %>
|
22
|
+
### <%= argument[:display_name] %>
|
23
|
+
<%= argument[:description] %>
|
24
|
+
**Name:** <%= argument[:name] %>,
|
25
|
+
**Type:** <%= argument[:type] %>,
|
26
|
+
**Units:** <%= argument[:units] %>,
|
27
|
+
**Required:** <%= argument[:required] %>,
|
28
|
+
**Model Dependent:** <%= argument[:model_dependent] %>
|
29
|
+
<% end %>
|
30
|
+
|
31
|
+
<% if arguments.size == 0 %>
|
32
|
+
<%= "This measure does not have any user arguments" %>
|
33
|
+
<% end %>
|
34
|
+
|
35
|
+
<% if outputs.size > 0 %>
|
36
|
+
## Outputs
|
37
|
+
<% output_names = [] %>
|
38
|
+
<% outputs.each do |output| %>
|
39
|
+
<% output_names << output[:display_name] %>
|
40
|
+
<% end %>
|
41
|
+
<%= output_names.join(", ") %>
|
42
|
+
<% end %>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<%
|
2
|
+
# *********************************************************************************
|
3
|
+
# URBANopt, Copyright (c) 2019, Alliance for Sustainable Energy, LLC, and other
|
4
|
+
# contributors. All rights reserved.
|
5
|
+
#
|
6
|
+
# Redistribution and use in source and binary forms, with or without modification,
|
7
|
+
# are permitted provided that the following conditions are met:
|
8
|
+
#
|
9
|
+
# Redistributions of source code must retain the above copyright notice, this list
|
10
|
+
# of conditions and the following disclaimer.
|
11
|
+
#
|
12
|
+
# Redistributions in binary form must reproduce the above copyright notice, this
|
13
|
+
# list of conditions and the following disclaimer in the documentation and/or other
|
14
|
+
# materials provided with the distribution.
|
15
|
+
#
|
16
|
+
# Neither the name of the copyright holder nor the names of its contributors may be
|
17
|
+
# used to endorse or promote products derived from this software without specific
|
18
|
+
# prior written permission.
|
19
|
+
#
|
20
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
21
|
+
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
22
|
+
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
23
|
+
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
24
|
+
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
25
|
+
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
26
|
+
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
27
|
+
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
28
|
+
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
29
|
+
# OF THE POSSIBILITY OF SUCH DAMAGE.
|
30
|
+
# *********************************************************************************
|
31
|
+
%>
|