Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@

All notable changes to this project are documented in this file.

## [2.1.0] - 2026-10-16

### Added

- **`use_backstop_compliance` option for `generate_report()`.** Set
`use_backstop_compliance=True` to evaluate the report using envelope backstop
compliance; the generated PDF then includes an Envelope Backstop Compliance
Certificate page. Sent to the API as `useBackstopCompliance` and defaults to
`False`, so existing calls are unchanged.

### Documentation

- Documented the backstop compliance option in the Compliance & Reports page,
the AI skill references, and `examples/client/compliance_and_report.py`.

## [2.0.1] - 2026-09-18

Reverts the enum renames introduced in 2.0.0. If you updated code to use the
Expand Down
3 changes: 3 additions & 0 deletions comcheck_api/ai/skill/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,9 @@ report = client.generate_report(project, download=True, download_dir="./out")
report = client.generate_report(
project, envelope=True, intlighting=True, extlighting=False, mechanical=True
)

# Use backstop compliance (defaults to False)
report = client.generate_report(project, use_backstop_compliance=True)
```

`generate_report` deliberately does **not** open a browser — it's a
Expand Down
3 changes: 3 additions & 0 deletions comcheck_api/ai/skill/reference/compliance.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,16 @@ client.generate_report(
extlighting=True,
intlighting=True,
mechanical=True,
use_backstop_compliance=False,
download=False,
download_dir=None,
)
```

- The four section flags toggle which sections appear in the report
(all default to `True`).
- `use_backstop_compliance=True` evaluates the report using backstop
compliance (sent to the API as `useBackstopCompliance`; defaults to `False`).
- `download=True` fetches the PDF from the presigned URL and saves it
using the server-provided `fileName`. `download_dir` defaults to the
user's `~/Downloads` folder.
Expand Down
3 changes: 2 additions & 1 deletion comcheck_api/api/api_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,8 @@ def generate_report(self, report_data: Dict[str, Any]) -> Dict[str, Any]:
Args:
report_data: The report request body, containing ``building`` (the
project data) and the ``envelope``, ``extlighting``,
``intlighting``, and ``mechanical`` section flags.
``intlighting``, and ``mechanical`` section flags, plus the
``useBackstopCompliance`` flag.

Returns:
API response as a dictionary with ``url`` (the presigned S3 URL),
Expand Down
4 changes: 4 additions & 0 deletions comcheck_api/client/comcheck_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ def generate_report(
extlighting: bool = True,
intlighting: bool = True,
mechanical: bool = True,
use_backstop_compliance: bool = False,
download: bool = False,
download_dir: Optional[str] = None,
) -> Optional[Dict[str, Any]]:
Expand All @@ -382,6 +383,8 @@ def generate_report(
extlighting: Whether to include the exterior lighting section.
intlighting: Whether to include the interior lighting section.
mechanical: Whether to include the mechanical section.
use_backstop_compliance: Whether to evaluate the report using
backstop compliance (sent as ``useBackstopCompliance``).
download: When ``True``, fetch the PDF from the presigned URL and
save it using the server-provided ``fileName``.
download_dir: Directory to save the PDF into when *download* is
Expand All @@ -397,6 +400,7 @@ def generate_report(
"extlighting": extlighting,
"intlighting": intlighting,
"mechanical": mechanical,
"useBackstopCompliance": use_backstop_compliance,
}
response = self._service.generate_report(report_data)
if response and download:
Expand Down
11 changes: 11 additions & 0 deletions docs_site/api/compliance.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,17 @@ report = client.generate_report(
)
```

### Backstop compliance

Pass `use_backstop_compliance=True` to evaluate the report using envelope
backstop compliance. The report then includes an additional **Envelope Backstop
Compliance Certificate** page. Defaults to `False`; the flag is sent to the API
as `useBackstopCompliance`.

```python
report = client.generate_report(project, use_backstop_compliance=True)
```

### Downloading the PDF

Pass `download=True` to fetch the PDF from the presigned URL and save it using
Expand Down
1 change: 1 addition & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Demonstrates compliance checks, requirements lookup, and PDF report generation.
- `check_UA_compliance()` - Checking code compliance for a project
- `check_requirements()` - Retrieving applicable requirements
- `generate_report()` - Generating a PDF report (presigned S3 URL, optional download)
- `generate_report(use_backstop_compliance=True)` - Generating a report using backstop compliance

**Usage:**
```bash
Expand Down
9 changes: 7 additions & 2 deletions examples/client/compliance_and_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

If your project only needs to verify the envelope trade-off path, Example 1 is
sufficient. If you need an ASHRAE 90.1 Compliance Check determination (e.g. to generate an
official report), run Example 1 first; if it passes, proceed with Example 6.
official report), run Example 1 first; if it passes, proceed with Example 7.
"""

import os
Expand Down Expand Up @@ -67,7 +67,12 @@
if report:
print(f"Saved report to ./reports/{report['fileName']}")

# Example 6: ASHRAE 90.1 Compliance Check (ASHRAE 90.1-based codes)
# Example 6: Generate a report using backstop compliance (defaults to False)
report = client.generate_report(project, use_backstop_compliance=True)
if report:
print(f"Backstop compliance report: {report['fileName']}")

# Example 7: ASHRAE 90.1 Compliance Check (ASHRAE 90.1-based codes)
# For a complete compliance determination, first verify the UA path passes,
# then run the full simulation.
ua_result = client.check_UA_compliance(project)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "comcheck_api"
version = "2.0.1"
version = "2.1.0"
description = "COMcheck API Python Package"
readme = "README.md"
requires-python = ">=3.12"
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading