py-tbd
Thermal Bridging & Derating (TBD) for OpenStudio — native Python port.
py-tbd is a line-for-line Python port of the rd2/tbd
Ruby gem. It autodetects major thermal bridges (balconies, parapets, corners, …)
in an OpenStudio model and derates the outside-facing opaque constructions
(walls, roofs, exposed floors) to account for the added heat loss.
This is the library (importable as tbd). The OpenStudio measure wrapper
that ships with the Ruby gem is out of scope for v1.
Status
Feature-complete port of TBD 3.6.0 (commit dd6f12f8 — see UPSTREAM.md).
All of psi.rb, geo.rb and ua.rb are ported: the KHI/PSI libraries, the
geometry/topology layer, the UA' reporting, and the full inputs/derate/
process/exit engine.
Parity is enforced by golden fixtures generated from the Ruby gem (OpenStudio
3.11.0) and asserted by 150+ tests, including exact process parity across all
nine .osm fixtures, JSON-override and uprating cases, and the bilingual UA'
report. The one deliverable intentionally left out of v1 is the OpenStudio
Measure wrapper (this is the importable library).
Install
py-tbd depends on the OpenStudio SDK Python bindings and the Python ports of
TBD's dependency gems:
openstudio— OpenStudio SDK bindingsoslg— logging (port of the OSlg gem)osut— OpenStudio utilities (port of the OSut gem / pyOSut)py-topolys— 3D topology (port of the Topolys gem)jsonschema— validatestbd.jsoninputs againsttbd.schema.json
python -m venv .venv
.venv/bin/pip install openstudio oslg osut jsonschema \
"py-topolys @ git+https://github.com/canmet-energy/py-topolys.git"
.venv/bin/pip install -e .
On Debian/Ubuntu Python (PEP 668), if
python -m venvcannot bootstrap pip, create it withpython3 -m venv --without-pip .venvand bootstrap pip viacurl -sS https://bootstrap.pypa.io/get-pip.py | .venv/bin/python.
Usage
import openstudio
import tbd
translator = openstudio.osversion.VersionTranslator()
model = translator.loadModel(openstudio.path("model.osm")).get()
argh = {"option": "poor (BETBG)"}
result = tbd.process(model, argh) # -> {"io": ..., "surfaces": ...}
Tests / parity
Parity with the Ruby gem is enforced by golden reference fixtures generated from
the gem (tools/gen_golden.rb) plus a unit test per public method. See the
plan and UPSTREAM.md.
.venv/bin/pytest tests/unit # fast, per-method
.venv/bin/pytest tests/e2e # end-to-end (ports of the Ruby RSpec suite)
License
MIT — © 2020-2026 Denis Bourgeois & Dan Macumber.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file canmet_tbd-3.5.2.tar.gz.
File metadata
- Download URL: canmet_tbd-3.5.2.tar.gz
- Upload date:
- Size: 644.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb307ae5488a408503a70a4a363bdc55398ca9a17b264d827c097beaaef11db6
|
|
| MD5 |
6bda85e5c0cbc77917525475ef54ae74
|
|
| BLAKE2b-256 |
c074856242c5f4eaee8d9284f92ab4f81fe3bbddbbce75bfd16754d39582f076
|
Provenance
The following attestation bundles were made for canmet_tbd-3.5.2.tar.gz:
Publisher:
publish.yml on canmet-energy/py-tbd
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
canmet_tbd-3.5.2.tar.gz -
Subject digest:
fb307ae5488a408503a70a4a363bdc55398ca9a17b264d827c097beaaef11db6 - Sigstore transparency entry: 2664297812
- Sigstore integration time:
-
Permalink:
canmet-energy/py-tbd@b47a733d4f2bea6003ff0cd44a12c907af0e998d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/canmet-energy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b47a733d4f2bea6003ff0cd44a12c907af0e998d -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file canmet_tbd-3.5.2-py3-none-any.whl.
File metadata
- Download URL: canmet_tbd-3.5.2-py3-none-any.whl
- Upload date:
- Size: 48.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f16a21ace21996e209d74fff2fbf793a29ba50b018106d9fb7034769255f986f
|
|
| MD5 |
88d8c5e97a84486f8fdb6de94fa90122
|
|
| BLAKE2b-256 |
e9d15ae2904b7ab3bf461f2a57366dc4a5263f1916122abf1b5adcbf0ca2e31e
|
Provenance
The following attestation bundles were made for canmet_tbd-3.5.2-py3-none-any.whl:
Publisher:
publish.yml on canmet-energy/py-tbd
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
canmet_tbd-3.5.2-py3-none-any.whl -
Subject digest:
f16a21ace21996e209d74fff2fbf793a29ba50b018106d9fb7034769255f986f - Sigstore transparency entry: 2664297857
- Sigstore integration time:
-
Permalink:
canmet-energy/py-tbd@b47a733d4f2bea6003ff0cd44a12c907af0e998d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/canmet-energy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b47a733d4f2bea6003ff0cd44a12c907af0e998d -
Trigger Event:
workflow_dispatch
-
Statement type: