Library and measures for translating between Honeybee JSON schema and OpenStudio Model schema (OSM).
Running the measures using OpenStudio CLI requires no installation other than cloning this repo and installing OpenStudio.
- Write an OpenStudio Workflow (osw) JSON that passes honeybee model and simulation parameter JSON files to the measures. Here is a sample where the items in parentheses should be replaced with specific file paths:
{
"measure_paths": [(PATH TO THIS REPOSITORY)/lib/measures"],
"steps": [
{
"arguments": {"model_json": (PATH TO MODEL JSON)},
"measure_dir_name": "from_honeybee_model"
},
{
"arguments": {"simulation_parameter_json": (PATH TO SIMULATION PARAMETER JSON)},
"measure_dir_name": "from_honeybee_simulation_parameter"
}
]
}
- Call the OpenStudio CLI from command line, making sure to pass this repository's
lib folder to the CLI using the
-I
(or--include
) option. Here is a sample where the items in parentheses should be replaced with specific file paths:
"(OPENSTUDIO INSTALLATION PATH)/bin/openstudio.exe" -I (PATH TO THIS REPOSITORY)/lib run -m -w (PATH TO OSW FILE)
- Clone this repo locally
git clone [email protected]:ladybug-tools/honeybee-openstudio-gem
# or
git clone https://github.com/ladybug-tools/honeybee-openstudio-gem
- Install dependencies: First install the OpenStudio Extension Gem following the installation instructions on the gem's github This will involve both the installation of OpenStudio and Ruby. Then, you must install the OpenStudio Extension Gem itself with:
gem install openstudio-extension
Then, the specific dependencies of this repository can be installed by running:
cd honeybee-openstudio-gem
bundle update
- Run Core Library Tests:
cd honeybee-openstudio-gem
bundle exec rake
- Run Measure Tests:
cd honeybee-openstudio-gem/lib/measures/from_honeybee_model/tests/
bundle exec ruby from_honeybee_model_test.rb
cd honeybee-openstudio-gem/lib/measures/from_honeybee_simulation_parameter/tests/
bundle exec ruby from_honeybee_simulation_parameter_test.rb
- Update doc_templates:
cd honeybee-openstudio-gem
bundle exec rake openstudio:update_copyright
- See all available rake tasks:
cd honeybee-openstudio-gem
bundle exec rake -T