honeybee-openstudio 1.8.1 → 1.8.2
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 +5 -5
- data/.coveralls.yml +1 -1
- data/.gitignore +32 -32
- data/.releaserc.json +7 -7
- data/.travis.yml +42 -41
- data/Gemfile +18 -18
- data/LICENSE.md +23 -23
- data/README.md +95 -95
- data/Rakefile +20 -20
- data/doc_templates/LICENSE.md +23 -23
- data/doc_templates/copyright_erb.txt +31 -31
- data/doc_templates/copyright_js.txt +4 -4
- data/doc_templates/copyright_ruby.txt +29 -29
- data/honeybee-openstudio.gemspec +35 -35
- data/lib/files/Honeybee.rb +112 -112
- data/lib/files/honeybee_workflow.osw +47 -47
- data/lib/files/urbanopt_Gemfile +32 -32
- data/lib/from_honeybee.rb +86 -86
- data/lib/from_honeybee/_openapi/model.json +8126 -8126
- data/lib/from_honeybee/_openapi/simulation-parameter.json +842 -842
- data/lib/from_honeybee/construction/air.rb +64 -64
- data/lib/from_honeybee/construction/opaque.rb +76 -76
- data/lib/from_honeybee/construction/shade.rb +107 -107
- data/lib/from_honeybee/construction/window.rb +80 -80
- data/lib/from_honeybee/construction_set.rb +278 -278
- data/lib/from_honeybee/extension.rb +109 -109
- data/lib/from_honeybee/geometry/aperture.rb +167 -167
- data/lib/from_honeybee/geometry/door.rb +160 -160
- data/lib/from_honeybee/geometry/face.rb +163 -163
- data/lib/from_honeybee/geometry/room.rb +392 -392
- data/lib/from_honeybee/geometry/shade.rb +89 -89
- data/lib/from_honeybee/hvac/ideal_air.rb +150 -150
- data/lib/from_honeybee/load/electric_equipment.rb +95 -95
- data/lib/from_honeybee/load/gas_equipment.rb +97 -97
- data/lib/from_honeybee/load/infiltration.rb +94 -94
- data/lib/from_honeybee/load/lighting.rb +98 -98
- data/lib/from_honeybee/load/people.rb +99 -99
- data/lib/from_honeybee/load/setpoint_humidistat.rb +74 -74
- data/lib/from_honeybee/load/setpoint_thermostat.rb +71 -71
- data/lib/from_honeybee/load/ventilation.rb +95 -95
- data/lib/from_honeybee/material/opaque.rb +94 -94
- data/lib/from_honeybee/material/opaque_no_mass.rb +94 -94
- data/lib/from_honeybee/material/window_blind.rb +238 -238
- data/lib/from_honeybee/material/window_gas.rb +76 -76
- data/lib/from_honeybee/material/window_gas_custom.rb +118 -118
- data/lib/from_honeybee/material/window_gas_mixture.rb +79 -79
- data/lib/from_honeybee/material/window_glazing.rb +166 -166
- data/lib/from_honeybee/material/window_shade.rb +160 -160
- data/lib/from_honeybee/material/window_simpleglazsys.rb +73 -73
- data/lib/from_honeybee/model.rb +434 -434
- data/lib/from_honeybee/model_object.rb +110 -110
- data/lib/from_honeybee/program_type.rb +124 -124
- data/lib/from_honeybee/schedule/fixed_interval.rb +115 -115
- data/lib/from_honeybee/schedule/ruleset.rb +164 -164
- data/lib/from_honeybee/schedule/type_limit.rb +88 -88
- data/lib/from_honeybee/simulation/designday.rb +105 -105
- data/lib/from_honeybee/simulation/extension.rb +46 -46
- data/lib/from_honeybee/simulation/parameter.rb +277 -277
- data/lib/from_honeybee/version.rb +34 -34
- data/lib/measures/from_honeybee_model/LICENSE.md +26 -26
- data/lib/measures/from_honeybee_model/README.md +32 -32
- data/lib/measures/from_honeybee_model/measure.rb +91 -91
- data/lib/measures/from_honeybee_model/measure.xml +103 -103
- data/lib/measures/from_honeybee_model/tests/from_honeybee_model_test.rb +126 -126
- data/lib/measures/from_honeybee_simulation_parameter/LICENSE.md +26 -26
- data/lib/measures/from_honeybee_simulation_parameter/README.md +32 -32
- data/lib/measures/from_honeybee_simulation_parameter/measure.rb +95 -95
- data/lib/measures/from_honeybee_simulation_parameter/measure.xml +91 -91
- data/lib/measures/from_honeybee_simulation_parameter/tests/from_honeybee_simulation_parameter_test.rb +109 -109
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 39f9a30d5777f0367f161e34b4bfc0f49702fc41af1a3aa89821924dd49b63b5
|
4
|
+
data.tar.gz: eadf07f13b84a182f77580a7928841f23c54c39e2520c1d2195a0dfbe748cd34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1421a546c720291ab848cc7fbc59b175ec82cbca4f7a42a698eac7869364dcfaa092391f886250619e10d3d0aee8c0f545e8924613872558ad860c5a83a95a08
|
7
|
+
data.tar.gz: 62ef9d4e855fd91cef1a4ba67ac7a55297c92ffd40932883ad79c37d1f82b43ad766fd068ac043b2c337ec69a33b38c203fca0e946827226a0d1c5a58805e085
|
data/.coveralls.yml
CHANGED
@@ -1 +1 @@
|
|
1
|
-
service_name: travis-ci
|
1
|
+
service_name: travis-ci
|
data/.gitignore
CHANGED
@@ -1,32 +1,32 @@
|
|
1
|
-
/.bundle/
|
2
|
-
/.yardoc
|
3
|
-
/.ruby-version
|
4
|
-
/Gemfile.lock
|
5
|
-
/gems
|
6
|
-
/_yardoc/
|
7
|
-
/coverage/
|
8
|
-
/doc/
|
9
|
-
/pkg/
|
10
|
-
/spec/reports/
|
11
|
-
/spec/test/
|
12
|
-
/tmp/
|
13
|
-
/test/
|
14
|
-
/lib/measures/test_results
|
15
|
-
/lib/measures/.rubocop*
|
16
|
-
/.vscode
|
17
|
-
/.vs
|
18
|
-
|
19
|
-
# rspec failure tracking
|
20
|
-
.rspec_status
|
21
|
-
.rakeTasks
|
22
|
-
|
23
|
-
# Ignore IDE files
|
24
|
-
/.idea
|
25
|
-
*.rubocop-http*
|
26
|
-
|
27
|
-
# measures tests
|
28
|
-
lib/measures/.rubocop.yml
|
29
|
-
lib/measures/test_results/*
|
30
|
-
lib/measures/*/tests/output
|
31
|
-
|
32
|
-
out.txt
|
1
|
+
/.bundle/
|
2
|
+
/.yardoc
|
3
|
+
/.ruby-version
|
4
|
+
/Gemfile.lock
|
5
|
+
/gems
|
6
|
+
/_yardoc/
|
7
|
+
/coverage/
|
8
|
+
/doc/
|
9
|
+
/pkg/
|
10
|
+
/spec/reports/
|
11
|
+
/spec/test/
|
12
|
+
/tmp/
|
13
|
+
/test/
|
14
|
+
/lib/measures/test_results
|
15
|
+
/lib/measures/.rubocop*
|
16
|
+
/.vscode
|
17
|
+
/.vs
|
18
|
+
|
19
|
+
# rspec failure tracking
|
20
|
+
.rspec_status
|
21
|
+
.rakeTasks
|
22
|
+
|
23
|
+
# Ignore IDE files
|
24
|
+
/.idea
|
25
|
+
*.rubocop-http*
|
26
|
+
|
27
|
+
# measures tests
|
28
|
+
lib/measures/.rubocop.yml
|
29
|
+
lib/measures/test_results/*
|
30
|
+
lib/measures/*/tests/output
|
31
|
+
|
32
|
+
out.txt
|
data/.releaserc.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
{
|
2
|
-
"plugins": [
|
3
|
-
"@semantic-release/commit-analyzer",
|
4
|
-
"@semantic-release/release-notes-generator",
|
5
|
-
"@semantic-release/github"
|
6
|
-
]
|
7
|
-
}
|
1
|
+
{
|
2
|
+
"plugins": [
|
3
|
+
"@semantic-release/commit-analyzer",
|
4
|
+
"@semantic-release/release-notes-generator",
|
5
|
+
"@semantic-release/github"
|
6
|
+
]
|
7
|
+
}
|
data/.travis.yml
CHANGED
@@ -1,41 +1,42 @@
|
|
1
|
-
language: ruby
|
2
|
-
|
3
|
-
rvm:
|
4
|
-
- 2.2
|
5
|
-
|
6
|
-
before_install:
|
7
|
-
# install openstudio
|
8
|
-
- wget http://security.ubuntu.com/ubuntu/pool/universe/w/wxwidgets3.0/libwxbase3.0-0_3.0.0-2_amd64.deb
|
9
|
-
- sudo apt install ./libwxbase3.0-0_3.0.0-2_amd64.deb
|
10
|
-
- wget http://security.ubuntu.com/ubuntu/pool/universe/w/wxwidgets3.0/libwxgtk3.0-0_3.0.0-2_amd64.deb
|
11
|
-
- sudo apt install ./libwxgtk3.0-0_3.0.0-2_amd64.deb
|
12
|
-
- wget https://github.com/NREL/OpenStudio/releases/download/v2.9.1/OpenStudio-2.9.1.3472e8b799-Linux.deb
|
13
|
-
- sudo dpkg -i ./OpenStudio-2.9.1.3472e8b799-Linux.deb
|
14
|
-
# install the openstudio extension gem
|
15
|
-
- export RUBYLIB=/usr/local/openstudio-2.9.1/Ruby
|
16
|
-
- gem install openstudio-extension -v 0.1.6
|
17
|
-
|
18
|
-
install:
|
19
|
-
- bundle install
|
20
|
-
|
21
|
-
jobs:
|
22
|
-
include:
|
23
|
-
- stage: test
|
24
|
-
script:
|
25
|
-
- rake
|
26
|
-
- stage: deploy
|
27
|
-
if: branch = master AND (NOT type IN (pull_request))
|
28
|
-
before_install:
|
29
|
-
- nvm install lts/* --latest-npm
|
30
|
-
install:
|
31
|
-
- npm install @semantic-release/exec
|
32
|
-
script:
|
33
|
-
- git config --global user.email "releases@ladybug.tools"
|
34
|
-
- git config --global user.name "ladybugbot"
|
35
|
-
- npx semantic-release
|
36
|
-
- stage: docs
|
37
|
-
if: branch = master AND (NOT type IN (pull_request))
|
38
|
-
deploy:
|
39
|
-
provider: rubygems
|
40
|
-
skip_cleanup: true
|
41
|
-
api_key: $API_KEY
|
1
|
+
language: ruby
|
2
|
+
|
3
|
+
rvm:
|
4
|
+
- 2.2
|
5
|
+
|
6
|
+
before_install:
|
7
|
+
# install openstudio
|
8
|
+
- wget http://security.ubuntu.com/ubuntu/pool/universe/w/wxwidgets3.0/libwxbase3.0-0_3.0.0-2_amd64.deb
|
9
|
+
- sudo apt install ./libwxbase3.0-0_3.0.0-2_amd64.deb
|
10
|
+
- wget http://security.ubuntu.com/ubuntu/pool/universe/w/wxwidgets3.0/libwxgtk3.0-0_3.0.0-2_amd64.deb
|
11
|
+
- sudo apt install ./libwxgtk3.0-0_3.0.0-2_amd64.deb
|
12
|
+
- wget https://github.com/NREL/OpenStudio/releases/download/v2.9.1/OpenStudio-2.9.1.3472e8b799-Linux.deb
|
13
|
+
- sudo dpkg -i ./OpenStudio-2.9.1.3472e8b799-Linux.deb
|
14
|
+
# install the openstudio extension gem
|
15
|
+
- export RUBYLIB=/usr/local/openstudio-2.9.1/Ruby
|
16
|
+
- gem install openstudio-extension -v 0.1.6
|
17
|
+
|
18
|
+
install:
|
19
|
+
- bundle install
|
20
|
+
|
21
|
+
jobs:
|
22
|
+
include:
|
23
|
+
- stage: test
|
24
|
+
script:
|
25
|
+
- rake
|
26
|
+
- stage: deploy
|
27
|
+
if: branch = master AND (NOT type IN (pull_request))
|
28
|
+
before_install:
|
29
|
+
- nvm install lts/* --latest-npm
|
30
|
+
install:
|
31
|
+
- npm install @semantic-release/exec
|
32
|
+
script:
|
33
|
+
- git config --global user.email "releases@ladybug.tools"
|
34
|
+
- git config --global user.name "ladybugbot"
|
35
|
+
- npx semantic-release
|
36
|
+
- stage: docs
|
37
|
+
if: branch = master AND (NOT type IN (pull_request))
|
38
|
+
deploy:
|
39
|
+
provider: rubygems
|
40
|
+
skip_cleanup: true
|
41
|
+
api_key: $API_KEY
|
42
|
+
gem: honeybee-openstudio
|
data/Gemfile
CHANGED
@@ -1,18 +1,18 @@
|
|
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.1.6'
|
11
|
-
end
|
12
|
-
|
13
|
-
# coveralls gem is used to generate coverage reports through CI
|
14
|
-
gem 'coveralls', require: false
|
15
|
-
|
16
|
-
# uncomment the following to run tests locally using `bundle exec rake`.
|
17
|
-
# simplecov has an unneccesary dependency on native json gem, use fork that does not require this
|
18
|
-
#gem 'simplecov', github: 'NREL/simplecov'
|
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.1.6'
|
11
|
+
end
|
12
|
+
|
13
|
+
# coveralls gem is used to generate coverage reports through CI
|
14
|
+
gem 'coveralls', require: false
|
15
|
+
|
16
|
+
# uncomment the following to run tests locally using `bundle exec rake`.
|
17
|
+
# simplecov has an unneccesary dependency on native json gem, use fork that does not require this
|
18
|
+
#gem 'simplecov', github: 'NREL/simplecov'
|
data/LICENSE.md
CHANGED
@@ -1,23 +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.
|
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
CHANGED
@@ -1,95 +1,95 @@
|
|
1
|
-
[](https://travis-ci.org/ladybug-tools/honeybee-openstudio-gem)
|
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 measure 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
|
-
```
|
1
|
+
[](https://travis-ci.org/ladybug-tools/honeybee-openstudio-gem)
|
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 measure 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
|
+
```
|