honeybee-openstudio 0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.github/workflows/ci.yaml +88 -0
- data/.gitignore +33 -0
- data/.releaserc.json +7 -0
- data/Gemfile +14 -0
- data/LICENSE.md +23 -0
- data/README.md +95 -0
- data/Rakefile +16 -0
- data/doc_templates/LICENSE.md +23 -0
- data/doc_templates/README.md.erb +42 -0
- data/doc_templates/copyright_erb.txt +32 -0
- data/doc_templates/copyright_js.txt +5 -0
- data/doc_templates/copyright_ruby.txt +30 -0
- data/honeybee-openstudio.gemspec +38 -0
- data/lib/files/Honeybee.rb +113 -0
- data/lib/files/honeybee_workflow.osw +48 -0
- data/lib/files/urbanopt_Gemfile +32 -0
- data/lib/from_openstudio.rb +49 -0
- data/lib/from_openstudio/geometry/aperture.rb +136 -0
- data/lib/from_openstudio/geometry/door.rb +136 -0
- data/lib/from_openstudio/geometry/face.rb +174 -0
- data/lib/from_openstudio/geometry/room.rb +121 -0
- data/lib/from_openstudio/geometry/shade.rb +87 -0
- data/lib/from_openstudio/model.rb +123 -0
- data/lib/from_openstudio/model_object.rb +43 -0
- data/lib/from_openstudio/simulation/design_day.rb +123 -0
- data/lib/from_openstudio/simulation/parameter_model.rb +93 -0
- data/lib/from_openstudio/simulation/simulation_output.rb +67 -0
- data/lib/honeybee.rb +93 -0
- data/lib/honeybee/_defaults/energy_default.json +1682 -0
- data/lib/honeybee/_defaults/model.json +11311 -0
- data/lib/honeybee/_defaults/simulation-parameter.json +973 -0
- data/lib/honeybee/construction/air.rb +42 -0
- data/lib/honeybee/construction/opaque.rb +42 -0
- data/lib/honeybee/construction/shade.rb +42 -0
- data/lib/honeybee/construction/window.rb +51 -0
- data/lib/honeybee/construction/windowshade.rb +43 -0
- data/lib/honeybee/construction_set.rb +42 -0
- data/lib/honeybee/extension.rb +129 -0
- data/lib/honeybee/geometry/aperture.rb +42 -0
- data/lib/honeybee/geometry/door.rb +42 -0
- data/lib/honeybee/geometry/face.rb +48 -0
- data/lib/honeybee/geometry/room.rb +56 -0
- data/lib/honeybee/geometry/shade.rb +42 -0
- data/lib/honeybee/hvac/ideal_air.rb +42 -0
- data/lib/honeybee/hvac/template.rb +73 -0
- data/lib/honeybee/load/electric_equipment.rb +42 -0
- data/lib/honeybee/load/gas_equipment.rb +42 -0
- data/lib/honeybee/load/infiltration.rb +42 -0
- data/lib/honeybee/load/lighting.rb +43 -0
- data/lib/honeybee/load/people.rb +42 -0
- data/lib/honeybee/load/setpoint_humidistat.rb +46 -0
- data/lib/honeybee/load/setpoint_thermostat.rb +46 -0
- data/lib/honeybee/load/ventilation.rb +42 -0
- data/lib/honeybee/material/opaque.rb +42 -0
- data/lib/honeybee/material/opaque_no_mass.rb +42 -0
- data/lib/honeybee/material/window_blind.rb +42 -0
- data/lib/honeybee/material/window_gas.rb +42 -0
- data/lib/honeybee/material/window_gas_custom.rb +42 -0
- data/lib/honeybee/material/window_gas_mixture.rb +42 -0
- data/lib/honeybee/material/window_glazing.rb +42 -0
- data/lib/honeybee/material/window_shade.rb +42 -0
- data/lib/honeybee/material/window_simpleglazsys.rb +42 -0
- data/lib/honeybee/model.rb +87 -0
- data/lib/honeybee/model_object.rb +108 -0
- data/lib/honeybee/program_type.rb +56 -0
- data/lib/honeybee/schedule/fixed_interval.rb +42 -0
- data/lib/honeybee/schedule/ruleset.rb +42 -0
- data/lib/honeybee/schedule/type_limit.rb +42 -0
- data/lib/honeybee/simulation/design_day.rb +42 -0
- data/lib/honeybee/simulation/parameter_model.rb +86 -0
- data/lib/honeybee/simulation/simulation_output.rb +42 -0
- data/lib/honeybee/ventcool/control.rb +42 -0
- data/lib/honeybee/ventcool/opening.rb +46 -0
- data/lib/honeybee/ventcool/simulation.rb +42 -0
- data/lib/measures/.gitkeep +0 -0
- data/lib/measures/from_honeybee_model/LICENSE.md +23 -0
- data/lib/measures/from_honeybee_model/README.md +32 -0
- data/lib/measures/from_honeybee_model/measure.rb +91 -0
- data/lib/measures/from_honeybee_model/measure.xml +80 -0
- data/lib/measures/from_honeybee_model/tests/from_honeybee_model_test.rb +126 -0
- data/lib/measures/from_honeybee_simulation_parameter/LICENSE.md +23 -0
- data/lib/measures/from_honeybee_simulation_parameter/README.md +32 -0
- data/lib/measures/from_honeybee_simulation_parameter/measure.rb +95 -0
- data/lib/measures/from_honeybee_simulation_parameter/measure.xml +86 -0
- data/lib/measures/from_honeybee_simulation_parameter/tests/from_honeybee_simulation_parameter_test.rb +109 -0
- data/lib/to_openstudio.rb +92 -0
- data/lib/to_openstudio/construction/air.rb +56 -0
- data/lib/to_openstudio/construction/opaque.rb +67 -0
- data/lib/to_openstudio/construction/shade.rb +99 -0
- data/lib/to_openstudio/construction/window.rb +70 -0
- data/lib/to_openstudio/construction/windowshade.rb +196 -0
- data/lib/to_openstudio/construction_set.rb +266 -0
- data/lib/to_openstudio/geometry/aperture.rb +157 -0
- data/lib/to_openstudio/geometry/door.rb +150 -0
- data/lib/to_openstudio/geometry/face.rb +178 -0
- data/lib/to_openstudio/geometry/room.rb +442 -0
- data/lib/to_openstudio/geometry/shade.rb +79 -0
- data/lib/to_openstudio/hvac/Model.hvac.rb +641 -0
- data/lib/to_openstudio/hvac/ideal_air.rb +141 -0
- data/lib/to_openstudio/hvac/template.rb +169 -0
- data/lib/to_openstudio/load/electric_equipment.rb +87 -0
- data/lib/to_openstudio/load/gas_equipment.rb +88 -0
- data/lib/to_openstudio/load/infiltration.rb +86 -0
- data/lib/to_openstudio/load/lighting.rb +89 -0
- data/lib/to_openstudio/load/people.rb +91 -0
- data/lib/to_openstudio/load/setpoint_humidistat.rb +66 -0
- data/lib/to_openstudio/load/setpoint_thermostat.rb +62 -0
- data/lib/to_openstudio/load/ventilation.rb +87 -0
- data/lib/to_openstudio/material/opaque.rb +85 -0
- data/lib/to_openstudio/material/opaque_no_mass.rb +85 -0
- data/lib/to_openstudio/material/window_blind.rb +229 -0
- data/lib/to_openstudio/material/window_gas.rb +67 -0
- data/lib/to_openstudio/material/window_gas_custom.rb +108 -0
- data/lib/to_openstudio/material/window_gas_mixture.rb +70 -0
- data/lib/to_openstudio/material/window_glazing.rb +157 -0
- data/lib/to_openstudio/material/window_shade.rb +151 -0
- data/lib/to_openstudio/material/window_simpleglazsys.rb +64 -0
- data/lib/to_openstudio/model.rb +497 -0
- data/lib/to_openstudio/model_object.rb +52 -0
- data/lib/to_openstudio/program_type.rb +104 -0
- data/lib/to_openstudio/schedule/fixed_interval.rb +105 -0
- data/lib/to_openstudio/schedule/ruleset.rb +164 -0
- data/lib/to_openstudio/schedule/type_limit.rb +76 -0
- data/lib/to_openstudio/simulation/design_day.rb +96 -0
- data/lib/to_openstudio/simulation/parameter_model.rb +243 -0
- data/lib/to_openstudio/ventcool/control.rb +185 -0
- data/lib/to_openstudio/ventcool/opening.rb +189 -0
- data/lib/to_openstudio/ventcool/simulation.rb +101 -0
- metadata +301 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 216430c5628ea722c0197ff3477739ac84246710e97968c651aa450bc0f2b87d
|
4
|
+
data.tar.gz: 16edc5b366b2d43987f4a6092647f9f83caaca94033bd4d529abadd171cfb07f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8c68e4d78c76278088ce64bab960fcacbc9147fa559887fc4476f6d2b7511f62902a7bd01dd77241fb49ecb3dbe524270a32e0af396b5713b211591574ad35bf
|
7
|
+
data.tar.gz: f7764c5076949ce9935957a43e5f56d020fb25bb90b7e14cf8decd2451f38a9e00624b396e80b27ef0393b43e2ba7d58d14f0caf1fd2a827d5e2d9fa3f169073
|
@@ -0,0 +1,88 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on: [push, pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
|
7
|
+
test:
|
8
|
+
name: Unit tests
|
9
|
+
runs-on: ubuntu-18.04
|
10
|
+
|
11
|
+
steps:
|
12
|
+
- name: Check out repository
|
13
|
+
uses: actions/checkout@v2
|
14
|
+
- name: Run Tests
|
15
|
+
run: |
|
16
|
+
echo $(pwd)
|
17
|
+
echo $(ls)
|
18
|
+
docker pull nrel/openstudio:3.1.0
|
19
|
+
docker run --name test --rm -d -t -v $(pwd):/work -w /work nrel/openstudio:3.1.0
|
20
|
+
docker exec -t test pwd
|
21
|
+
docker exec -t test ls
|
22
|
+
docker exec -t test bundle update
|
23
|
+
docker exec -t test bundle exec rake
|
24
|
+
docker kill test
|
25
|
+
|
26
|
+
deploy_github:
|
27
|
+
name: Deploy to GitHub
|
28
|
+
runs-on: ubuntu-latest
|
29
|
+
needs: test
|
30
|
+
if: github.ref == 'refs/heads/master' && github.repository_owner == 'ladybug-tools'
|
31
|
+
steps:
|
32
|
+
- uses: actions/checkout@v2
|
33
|
+
- name: set up node # we need node for for semantic release
|
34
|
+
uses: actions/setup-node@v2.1.2
|
35
|
+
with:
|
36
|
+
node-version: 14.2.0
|
37
|
+
- name: install semantic-release
|
38
|
+
run:
|
39
|
+
npm install @semantic-release/exec
|
40
|
+
- name: run semantic release
|
41
|
+
run: |
|
42
|
+
git config --global user.email "releases@ladybug.tools"
|
43
|
+
git config --global user.name "ladybugbot"
|
44
|
+
npx semantic-release
|
45
|
+
env:
|
46
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
47
|
+
|
48
|
+
deploy_rubygems:
|
49
|
+
name: Deploy to Rubygems.org
|
50
|
+
runs-on: ubuntu-latest
|
51
|
+
needs: deploy_github
|
52
|
+
steps:
|
53
|
+
- uses: actions/checkout@v2
|
54
|
+
- name: Update gemspec
|
55
|
+
env:
|
56
|
+
RELEASE_TAG: ${{ github.event.release.tag_name }}
|
57
|
+
run: |
|
58
|
+
export CLEAN_TAG=$(echo $RELEASE_TAG | sed 's/v//g')
|
59
|
+
sed -i 's/"0.0.0"/'"'$CLEAN_TAG'"'/g' honeybee-openstudio.gemspec
|
60
|
+
- name: Release Gem
|
61
|
+
uses: dawidd6/action-publish-gem@v1
|
62
|
+
with:
|
63
|
+
api_key: ${{secrets.RUBYGEMS_API_KEY}}
|
64
|
+
|
65
|
+
dispatch_schema:
|
66
|
+
name: Dispatch Schema to Clients
|
67
|
+
runs-on: ubuntu-latest
|
68
|
+
needs: deploy_github
|
69
|
+
strategy:
|
70
|
+
matrix:
|
71
|
+
client_repo:
|
72
|
+
- ladybug-tools/lbt-grasshopper
|
73
|
+
steps:
|
74
|
+
- name: Send repo dispatch to lbt-grasshopper
|
75
|
+
env:
|
76
|
+
RELEASE_TAG: ${{ github.event.release.tag_name }}
|
77
|
+
DISPATCH_URL: https://api.github.com/repos/${{ matrix.client_repo }}/dispatches
|
78
|
+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
79
|
+
run: |
|
80
|
+
curl -X POST $DISPATCH_URL \
|
81
|
+
-H "Accept: application/vnd.github.everest-preview+json" \
|
82
|
+
-d '{
|
83
|
+
"event_type": "honeybee_openstudio_gem_release",
|
84
|
+
"client_payload": {
|
85
|
+
"version" : "'$RELEASE_TAG'"
|
86
|
+
}
|
87
|
+
}' \
|
88
|
+
-u ladybugbot:$GH_TOKEN
|
data/.gitignore
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
/.bundle/
|
2
|
+
/.yardoc
|
3
|
+
/.ruby-version
|
4
|
+
/Gemfile.lock
|
5
|
+
/gems
|
6
|
+
/_yardoc/
|
7
|
+
/coverage/
|
8
|
+
/doc/
|
9
|
+
/pkg/
|
10
|
+
/spec/output/
|
11
|
+
/spec/reports/
|
12
|
+
/spec/test/
|
13
|
+
/tmp/
|
14
|
+
/test/
|
15
|
+
/lib/measures/test_results
|
16
|
+
/lib/measures/.rubocop*
|
17
|
+
/.vscode
|
18
|
+
/.vs
|
19
|
+
|
20
|
+
# rspec failure tracking
|
21
|
+
.rspec_status
|
22
|
+
.rakeTasks
|
23
|
+
|
24
|
+
# Ignore IDE files
|
25
|
+
/.idea
|
26
|
+
*.rubocop-http*
|
27
|
+
|
28
|
+
# measures tests
|
29
|
+
lib/measures/.rubocop.yml
|
30
|
+
lib/measures/test_results/*
|
31
|
+
lib/measures/*/tests/output
|
32
|
+
|
33
|
+
out.txt
|
data/.releaserc.json
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
source 'http://rubygems.org'
|
2
|
+
|
3
|
+
# Specify your gem's dependencies
|
4
|
+
gemspec
|
5
|
+
|
6
|
+
# get the openstudio-extension gem
|
7
|
+
if File.exist?('../OpenStudio-extension-gem') # local development copy
|
8
|
+
gem 'openstudio-extension', path: '../OpenStudio-extension-gem'
|
9
|
+
else # get it from rubygems.org
|
10
|
+
gem 'openstudio-extension', '0.2.5'
|
11
|
+
end
|
12
|
+
|
13
|
+
# coveralls gem is used to generate coverage reports through CI
|
14
|
+
gem 'coveralls_reborn', require: false
|
data/LICENSE.md
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
Honeybee OpenStudio Gem, Copyright (c) 2020, Alliance for Sustainable Energy, LLC,
|
2
|
+
Ladybug Tools LLC and other contributors. All rights reserved.
|
3
|
+
|
4
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
|
5
|
+
following conditions are met:
|
6
|
+
|
7
|
+
(1) Redistributions of source code must retain the above copyright notice, this list of conditions and the following
|
8
|
+
disclaimer.
|
9
|
+
|
10
|
+
(2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
|
11
|
+
disclaimer in the documentation and/or other materials provided with the distribution.
|
12
|
+
|
13
|
+
(3) Neither the name of the copyright holder nor the names of any contributors may be used to endorse or promote products
|
14
|
+
derived from this software without specific prior written permission from the respective party.
|
15
|
+
|
16
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
17
|
+
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
18
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE UNITED STATES GOVERNMENT, OR THE UNITED
|
19
|
+
STATES DEPARTMENT OF ENERGY, NOR ANY OF THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
20
|
+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
21
|
+
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
22
|
+
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
23
|
+
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/README.md
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
[](https://github.com/ladybug-tools/honeybee-openstudio-gem/actions)
|
2
|
+
[](https://coveralls.io/github/ladybug-tools/honeybee-openstudio-gem)
|
3
|
+
|
4
|
+

|
5
|
+
|
6
|
+
# honeybee-openstudio-gem
|
7
|
+
|
8
|
+
Library and measures for translating between Honeybee JSON schema and OpenStudio Model schema (OSM).
|
9
|
+
|
10
|
+
|
11
|
+
## Run the measures of this repo using OpenStudio CLI
|
12
|
+
|
13
|
+
Running the measures using OpenStudio CLI requires no installation other than cloning
|
14
|
+
this repo and installing OpenStudio.
|
15
|
+
|
16
|
+
1. Write an OpenStudio Workflow (osw) JSON that passes honeybee model and simulation
|
17
|
+
parameter JSON files to the measures. Here is a sample where the items in parentheses
|
18
|
+
should be replaced with specific file paths:
|
19
|
+
|
20
|
+
```
|
21
|
+
{
|
22
|
+
"measure_paths": [(PATH TO THIS REPOSITORY)/lib/measures"],
|
23
|
+
"steps": [
|
24
|
+
{
|
25
|
+
"arguments": {"model_json": (PATH TO MODEL JSON)},
|
26
|
+
"measure_dir_name": "from_honeybee_model"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"arguments": {"simulation_parameter_json": (PATH TO SIMULATION PARAMETER JSON)},
|
30
|
+
"measure_dir_name": "from_honeybee_simulation_parameter"
|
31
|
+
}
|
32
|
+
]
|
33
|
+
}
|
34
|
+
```
|
35
|
+
|
36
|
+
2. Call the OpenStudio CLI from command line, making sure to pass this repository's
|
37
|
+
lib folder to the CLI using the `-I` (or `--include`) option. Here is a sample
|
38
|
+
where the items in parentheses should be replaced with specific file paths:
|
39
|
+
|
40
|
+
```
|
41
|
+
"(OPENSTUDIO INSTALLATION PATH)/bin/openstudio.exe" -I (PATH TO THIS REPOSITORY)/lib run -m -w (PATH TO OSW FILE)
|
42
|
+
|
43
|
+
```
|
44
|
+
|
45
|
+
|
46
|
+
## Local Development
|
47
|
+
1. Clone this repo locally
|
48
|
+
```
|
49
|
+
git clone git@github.com:ladybug-tools/honeybee-openstudio-gem
|
50
|
+
|
51
|
+
# or
|
52
|
+
|
53
|
+
git clone https://github.com/ladybug-tools/honeybee-openstudio-gem
|
54
|
+
```
|
55
|
+
|
56
|
+
2. Install dependencies:
|
57
|
+
First install the OpenStudio Extension Gem following the
|
58
|
+
[installation instructions on the gem's github](https://github.com/NREL/openstudio-extension-gem#installation)
|
59
|
+
This will involve both the installation of OpenStudio and Ruby.
|
60
|
+
Then, you must install the OpenStudio Extension Gem itself with:
|
61
|
+
```
|
62
|
+
gem install openstudio-extension
|
63
|
+
```
|
64
|
+
Then, the specific dependencies of this repository can be installed by running:
|
65
|
+
```
|
66
|
+
cd honeybee-openstudio-gem
|
67
|
+
bundle update
|
68
|
+
```
|
69
|
+
|
70
|
+
3. Run Core Library Tests:
|
71
|
+
```
|
72
|
+
cd honeybee-openstudio-gem
|
73
|
+
bundle exec rake
|
74
|
+
```
|
75
|
+
|
76
|
+
4. Run Measure Tests:
|
77
|
+
```
|
78
|
+
cd honeybee-openstudio-gem/lib/measures/from_honeybee_model/tests/
|
79
|
+
bundle exec ruby from_honeybee_model_test.rb
|
80
|
+
|
81
|
+
cd honeybee-openstudio-gem/lib/measures/from_honeybee_simulation_parameter/tests/
|
82
|
+
bundle exec ruby from_honeybee_simulation_parameter_test.rb
|
83
|
+
```
|
84
|
+
|
85
|
+
5. Update doc_templates:
|
86
|
+
```
|
87
|
+
cd honeybee-openstudio-gem
|
88
|
+
bundle exec rake openstudio:update_copyright
|
89
|
+
```
|
90
|
+
|
91
|
+
6. See all available rake tasks:
|
92
|
+
```
|
93
|
+
cd honeybee-openstudio-gem
|
94
|
+
bundle exec rake -T
|
95
|
+
```
|
data/Rakefile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
require 'rspec/core/rake_task'
|
3
|
+
|
4
|
+
RSpec::Core::RakeTask.new(:spec)
|
5
|
+
|
6
|
+
require 'rubocop/rake_task'
|
7
|
+
RuboCop::RakeTask.new
|
8
|
+
|
9
|
+
# Load in the rake tasks from the base openstudio-extension gem
|
10
|
+
require 'openstudio/extension/rake_task'
|
11
|
+
require 'honeybee/extension'
|
12
|
+
|
13
|
+
os_extension = OpenStudio::Extension::RakeTask.new
|
14
|
+
os_extension.set_extension_class(Honeybee::Extension)
|
15
|
+
|
16
|
+
task default: :spec
|
@@ -0,0 +1,23 @@
|
|
1
|
+
Honeybee OpenStudio Gem, Copyright (c) 2020, Alliance for Sustainable Energy, LLC,
|
2
|
+
Ladybug Tools LLC and other contributors. All rights reserved.
|
3
|
+
|
4
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
|
5
|
+
following conditions are met:
|
6
|
+
|
7
|
+
(1) Redistributions of source code must retain the above copyright notice, this list of conditions and the following
|
8
|
+
disclaimer.
|
9
|
+
|
10
|
+
(2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
|
11
|
+
disclaimer in the documentation and/or other materials provided with the distribution.
|
12
|
+
|
13
|
+
(3) Neither the name of the copyright holder nor the names of any contributors may be used to endorse or promote products
|
14
|
+
derived from this software without specific prior written permission from the respective party.
|
15
|
+
|
16
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
17
|
+
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
18
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE UNITED STATES GOVERNMENT, OR THE UNITED
|
19
|
+
STATES DEPARTMENT OF ENERGY, NOR ANY OF THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
20
|
+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
21
|
+
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
22
|
+
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
23
|
+
ADVISED 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,32 @@
|
|
1
|
+
<%
|
2
|
+
# *******************************************************************************
|
3
|
+
# Honeybee OpenStudio Gem, Copyright (c) 2020, Alliance for Sustainable
|
4
|
+
# Energy, LLC, Ladybug Tools LLC and other contributors. All rights reserved.
|
5
|
+
#
|
6
|
+
# Redistribution and use in source and binary forms, with or without
|
7
|
+
# modification, are permitted provided that the following conditions are met:
|
8
|
+
#
|
9
|
+
# (1) Redistributions of source code must retain the above copyright notice,
|
10
|
+
# this list of conditions and the following disclaimer.
|
11
|
+
#
|
12
|
+
# (2) Redistributions in binary form must reproduce the above copyright notice,
|
13
|
+
# this list of conditions and the following disclaimer in the documentation
|
14
|
+
# and/or other materials provided with the distribution.
|
15
|
+
#
|
16
|
+
# (3) Neither the name of the copyright holder nor the names of any contributors
|
17
|
+
# may be used to endorse or promote products derived from this software without
|
18
|
+
# specific prior written permission from the respective party.
|
19
|
+
#
|
20
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS
|
21
|
+
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
22
|
+
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
23
|
+
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE
|
24
|
+
# UNITED STATES GOVERNMENT, OR THE UNITED STATES DEPARTMENT OF ENERGY, NOR ANY OF
|
25
|
+
# THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
26
|
+
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
27
|
+
# OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
28
|
+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
29
|
+
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
30
|
+
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
31
|
+
# *******************************************************************************
|
32
|
+
%>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# *******************************************************************************
|
2
|
+
# Honeybee OpenStudio Gem, Copyright (c) 2020, Alliance for Sustainable
|
3
|
+
# Energy, LLC, Ladybug Tools LLC and other contributors. All rights reserved.
|
4
|
+
#
|
5
|
+
# Redistribution and use in source and binary forms, with or without
|
6
|
+
# modification, are permitted provided that the following conditions are met:
|
7
|
+
#
|
8
|
+
# (1) Redistributions of source code must retain the above copyright notice,
|
9
|
+
# this list of conditions and the following disclaimer.
|
10
|
+
#
|
11
|
+
# (2) Redistributions in binary form must reproduce the above copyright notice,
|
12
|
+
# this list of conditions and the following disclaimer in the documentation
|
13
|
+
# and/or other materials provided with the distribution.
|
14
|
+
#
|
15
|
+
# (3) Neither the name of the copyright holder nor the names of any contributors
|
16
|
+
# may be used to endorse or promote products derived from this software without
|
17
|
+
# specific prior written permission from the respective party.
|
18
|
+
#
|
19
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS
|
20
|
+
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
21
|
+
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
22
|
+
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE
|
23
|
+
# UNITED STATES GOVERNMENT, OR THE UNITED STATES DEPARTMENT OF ENERGY, NOR ANY OF
|
24
|
+
# THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
25
|
+
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
26
|
+
# OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
27
|
+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
28
|
+
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
29
|
+
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
30
|
+
# *******************************************************************************
|
@@ -0,0 +1,38 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path('lib', __dir__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'honeybee-openstudio'
|
7
|
+
spec.version = ''
|
8
|
+
spec.authors = ['Tanushree Charan', 'Dan Macumber', 'Chris Mackey', 'Mostapha Sadeghipour Roudsari']
|
9
|
+
spec.email = ['tanushree.charan@nrel.gov', 'chris@ladybug.tools']
|
10
|
+
|
11
|
+
spec.summary = 'Gem for translating between Honeybee JSON and OpenStudio Model.'
|
12
|
+
spec.description = 'Library and measures for translating between Honeybee JSON schema and OpenStudio Model schema (OSM).'
|
13
|
+
spec.homepage = 'https://github.com/ladybug-tools/honeybee-openstudio-gem'
|
14
|
+
|
15
|
+
# Specify which files should be added to the gem when it is released.
|
16
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
17
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
18
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
19
|
+
end
|
20
|
+
spec.bindir = 'exe'
|
21
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
+
spec.require_paths = ['lib']
|
23
|
+
|
24
|
+
if /^2.5/.match(RUBY_VERSION)
|
25
|
+
spec.required_ruby_version = "~> 2.5.0"
|
26
|
+
|
27
|
+
spec.add_development_dependency "bundler", "~> 2.1"
|
28
|
+
spec.add_development_dependency "public_suffix", "~> 3.1.1"
|
29
|
+
spec.add_development_dependency "json-schema", "~> 2.8.1"
|
30
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
31
|
+
spec.add_development_dependency "rspec", "~> 3.9"
|
32
|
+
spec.add_development_dependency "rubocop", "~> 0.54.0"
|
33
|
+
end
|
34
|
+
|
35
|
+
spec.add_dependency 'json_pure'
|
36
|
+
spec.add_dependency 'openstudio-extension', '0.2.5'
|
37
|
+
spec.add_dependency 'openstudio-standards', '~> 0.2.12'
|
38
|
+
end
|