btap (Python)
The Python port of the btap gem family — one distribution, five subpackages
mirroring the gems (btap.audit, btap.simulation, btap.modeling,
btap.costing, btap.necb), same one-way dependency direction (D-77).
The port is COMPLETE (M0–M8, 2026-08-28; the record is ../PORT_STATUS.md
and D-79), verified three ways: every Ruby suite ported, the Leg-C oracle
goldens consumed (frozen AND live), and the Leg-B corpus diff holding the
Ruby and Python btap-compliance CLIs equivalent at the none, sizing
and annual --quick tiers.
Since R3 (D-81) this implementation is primary and canonical, and
since the R4 handoff (D-82) it is the only one that changes: Ruby
backports have stopped. Behaviour changes land here with a re-frozen
scenario baseline in the same PR (verification/scenarios/freeze.py);
the frozen suite — not a live Ruby comparison — is the regression net.
cd python && python3 -m unittest discover tests # stdlib-only, no install needed (serial)
cd python && .venv/bin/pytest -n auto tests/ # parallel (pytest-xdist worker
# processes; ~10x on the E+ suites)
btap/_compat.py holds the cross-cutting Ruby-parity contracts (round-half-
away rounding, SDK Optional unwrapping, the NullAudit, determinism-critical
sorting, HTML escaping). New code uses those helpers, never the raw Python
equivalents — the differences they paper over are exactly the silent
Ruby-vs-Python drifts the census identified.
The CLI (M6)
The umbrella pipeline and its command line are ported:
pip install . # installs the btap-compliance console script
btap-compliance model.osm --epw weather.epw # full 8.4.1.2 determination
python3 -m btap.necb.cli model.osm --simulate none # no-install equivalent
Same seven exit codes as the Ruby CLI (0 compliant, 1 not compliant, 2
usage, 3 pre-flight, 4 simulation, 5 internal, 6 no determination), and the
same refusal to call a --quick week a determination. The Leg-B corpus gate
(CLI_B=python bash verification/selftest.sh) diffs this CLI's
audit.json/report.json against the Ruby CLI's over the whole corpus —
every pair equivalent at the none, sizing, and annual tiers.
Thermal bridging (M7)
NECB 3.1.1.7 runs through py-tbd (native Python, no Ruby subprocess),
pinned by commit SHA to its tbd-3.5.2-compat branch — the revision
verified against the family's frozen Ruby TBD 3.5.2 / OSut 0.8.2 oracle
baseline:
pip install '.[tbd]'
Without it the pipeline still works: thermal_bridging= degrades to the
same loud audited 3.1.1.7-not-accounted warning the Ruby gem emits without
its tbd gem — never a silent clear-field result.
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_btap-0.2.1.tar.gz.
File metadata
- Download URL: canmet_btap-0.2.1.tar.gz
- Upload date:
- Size: 1.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
448ce5dd59fe7ae8a7dc6e01bce33f8317fac5e794a9cc8323180f6b7cd44490
|
|
| MD5 |
da6cf5b5f56e1a3a532812a8d9aa820d
|
|
| BLAKE2b-256 |
8dcd398117a57be16e38dd76fd275f87db86e07718a371056d20a8c744003bb7
|
Provenance
The following attestation bundles were made for canmet_btap-0.2.1.tar.gz:
Publisher:
publish.yml on canmet-energy/btap
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
canmet_btap-0.2.1.tar.gz -
Subject digest:
448ce5dd59fe7ae8a7dc6e01bce33f8317fac5e794a9cc8323180f6b7cd44490 - Sigstore transparency entry: 2666652528
- Sigstore integration time:
-
Permalink:
canmet-energy/btap@fde427a1c86bd4d5aa70000362cdd7a486f85852 -
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@fde427a1c86bd4d5aa70000362cdd7a486f85852 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file canmet_btap-0.2.1-py3-none-any.whl.
File metadata
- Download URL: canmet_btap-0.2.1-py3-none-any.whl
- Upload date:
- Size: 1.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87de5e17cc244a416a8078075364fabcf62c4bf05a88f802274ba6d90c35729e
|
|
| MD5 |
076f9605af8be7f6b1e38b54380b4dec
|
|
| BLAKE2b-256 |
693437699cead70a4d44e09fdafb8f802f4f2a5a10768c3a00a760dc1e820434
|
Provenance
The following attestation bundles were made for canmet_btap-0.2.1-py3-none-any.whl:
Publisher:
publish.yml on canmet-energy/btap
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
canmet_btap-0.2.1-py3-none-any.whl -
Subject digest:
87de5e17cc244a416a8078075364fabcf62c4bf05a88f802274ba6d90c35729e - Sigstore transparency entry: 2666652571
- Sigstore integration time:
-
Permalink:
canmet-energy/btap@fde427a1c86bd4d5aa70000362cdd7a486f85852 -
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@fde427a1c86bd4d5aa70000362cdd7a486f85852 -
Trigger Event:
workflow_dispatch
-
Statement type: