Skip to main content

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 bindings
  • oslg — 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 — validates tbd.json inputs against tbd.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 venv cannot bootstrap pip, create it with python3 -m venv --without-pip .venv and bootstrap pip via curl -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.

Metadata

Release files for canmet-tbd 3.5.2

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

Source distribution (sdist)

Source distribution for canmet-tbd 3.5.2
File Size Uploaded Provenance Actions
canmet_tbd-3.5.2.tar.gz 644.1 kB With provenance Details for canmet_tbd-3.5.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for canmet-tbd 3.5.2
File Interpreter ABI Platform Actions
canmet_tbd-3.5.2-py3-none-any.whl Python 3 none any Details for canmet_tbd-3.5.2-py3-none-any.whl

Total release size: 693.0 kB

Release files / canmet_tbd-3.5.2.tar.gz

Download URL canmet_tbd-3.5.2.tar.gz
Size 644.1 kB
Tags Source
SHA-256 checksum
How to use checksums
fb307ae5488a408503a70a4a363bdc55398ca9a17b264d827c097beaaef11db6
BLAKE2b-256 checksum
How to use checksums
c074856242c5f4eaee8d9284f92ab4f81fe3bbddbbce75bfd16754d39582f076
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Release files / canmet_tbd-3.5.2-py3-none-any.whl

Download URL canmet_tbd-3.5.2-py3-none-any.whl
Size 48.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f16a21ace21996e209d74fff2fbf793a29ba50b018106d9fb7034769255f986f
BLAKE2b-256 checksum
How to use checksums
e9d15ae2904b7ab3bf461f2a57366dc4a5263f1916122abf1b5adcbf0ca2e31e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Security for canmet-tbd 3.5.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for canmet_tbd-3.5.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

3.5.2 This release

2 release files Full provenance

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