Skip to main content

OpenStudio™ HPXML Calibration

ci

A package to automatically calibrate an OpenStudio-HPXML residential building model against utility bills.

The implementation relies heavily on BPI-2400-S-2015 v.2 Standard Practice for Standardized Qualification of Whole-House Energy Savings Predictions by Calibration to Energy Use. However, it is not currently a complete implementation of BPI-2400.

Documentation & usage

Full documentation is available at https://natlabrockies.github.io/OpenStudio-HPXML-Calibration

Create a custom config file (based on default_calibration_config.yaml) that is specific to the home being calibrated.

Then run: uv run openstudio-hpxml-calibration calibrate --hpxml-filepath hpxml.xml --config-filepath my_config.yaml

See uv run openstudio-hpxml-calibration calibrate --help or uv run openstudio-hpxml-calibration --help for more options.

Developer installation

  • Clone the repository: git clone https://github.com/NatLabRockies/OpenStudio-HPXML-Calibration.git

  • Move into the repository: cd OpenStudio-HPXML-Calibration

  • Install OpenStudio 3.11.0

  • Uv is used to manage the project & dependencies (and may also be used to manage Python if you want). After cloning, ensure you have uv installed, then run uv sync to install the package and all development dependencies.

    • Some Windows developers have reported version conflicts using the default strategy. If this occurs, consider changing the resolution strategy using uv sync --resolution=lowest-direct
  • Download all weather files using uv run openstudio-hpxml-calibration download-weather

  • Developers can then call uv run pytest to confirm all dev dependencies have been installed and everything is working as expected. (If you need to restrict the number of concurrent workers, you can use e.g. uv run pytest -n <NUM>.)

  • Activate pre-commit (only required once, after cloning the repo) with: uv run pre-commit install. On your first commit it will install the pre-commit environments, then run pre-commit hooks at every commit.

  • Before pushing to Github, run pre-commit on all files with uv run pre-commit run -a to highlight any linting/formatting errors that will cause CI to fail.

  • Pycharm users may need to add Ruff as a 3rd-party plugin or install it as an external tool to their IDE to ensure linting & formatting is consistent.

  • Developers can test in-process functionality by prepending uv run to a terminal command. For instance, to see the CLI help menu with local changes not yet committed, run: uv run openstudio-hpxml-calibration --help

Alternative Dev Container Environment

There's a Dev Container configuration in this repo which installs all the necessary dependencies in a docker container and attaches to VSCode to it. To use it:

  • Install VSCode
  • Install the Dev Containers extension.
  • Install Docker Desktop or something compatible.
  • Click the little blue "><" icon in the lower left of VSCode, and select "Reopen in Container". The window will reload. It may take a few minutes the first time.

Testing

Project tests can be run with uv run pytest from the repo root. (If you need to restrict the number of concurrent workers, you can use e.g. uv run pytest -n <NUM>.)

Ruby Measure tests can be run with openstudio src/measures/ModifyXML/tests/modify_xml_test.rb

Developing documentation

During development we can serve docs locally and view updates as they are made.

  1. Start a documentation update branch: git switch -c <branch_name>
  2. uv run mkdocs serve
  3. Point browser to http://127.0.0.1:8000/
  • To deploy, push a commit in the docs folder to the main branch
  • Wait a few minutes, then verify the new documentation on the docs website

License

This project is available under a BSD-3-like license, which is a free, open-source, and permissive license. For more information, check out the license file.

This project is NLR Software Record SWR-25-94

Metadata

Release files for openstudio-hpxml-calibration 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openstudio-hpxml-calibration 0.3.0
File Size Uploaded
openstudio_hpxml_calibration-0.3.0.tar.gz 36.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for openstudio-hpxml-calibration 0.3.0
File Interpreter ABI Platform
openstudio_hpxml_calibration-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 41.3 kB

Release files / openstudio_hpxml_calibration-0.3.0.tar.gz

Download URL openstudio_hpxml_calibration-0.3.0.tar.gz
Size 36.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6ecbc7662559fb2de697c871bb8b87176ec6fb089cd33a576ed927d29873de9c
BLAKE2b-256 checksum
How to use checksums
dd0e52a2cfd0c47de7663b6dacf98a9855122b9f405c09da1c553709b155f4f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / openstudio_hpxml_calibration-0.3.0-py3-none-any.whl

Download URL openstudio_hpxml_calibration-0.3.0-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fdc994b1f302fabb8965d0d2f0f61337d6ef3cf9dbf4f29d6801c73d18e3e0ca
BLAKE2b-256 checksum
How to use checksums
973a9a04e65b95bfbeea97ce9638790ceb9733593eece62d108c289a055debb3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page