Skip to content

Commit 9af40f9

Browse files
Update the check compliance to check UA compliance
1 parent 530869b commit 9af40f9

7 files changed

Lines changed: 15 additions & 15 deletions

File tree

‎comcheck_api/ai/skill/SKILL.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ print(result["performanceRating"])
159159
`get_simulation_status`, `get_simulation_result`, `set_api_key`)
160160
are fully supported and
161161
fine to use. The compliance/report client methods
162-
(`check_compliance`, `check_requirements`, `generate_report`) are
162+
(`check_UA_compliance`, `check_requirements`, `generate_report`) are
163163
also fully supported. If asked for an unsupported mutation area,
164164
tell the user it's not implemented and offer building-area /
165165
envelope / simulation instead. Confirm operation scope with
@@ -247,7 +247,7 @@ directly.
247247

248248
```python
249249
# Per-category compliance status
250-
compliance = client.check_compliance(project)
250+
compliance = client.check_UA_compliance(project)
251251
if compliance["mandatoryRequirementsMet"]:
252252
...
253253

‎comcheck_api/ai/skill/reference/compliance.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ client = COMcheckClient(api_key="...")
1111

1212
| Method | Returns | Purpose |
1313
|---|---|---|
14-
| `client.check_compliance(project)` | `dict` | Per-category compliance status for the project. |
14+
| `client.check_UA_compliance(project)` | `dict` | Per-category compliance status for the project. |
1515
| `client.check_requirements(project)` | `dict` | The applicable requirements for the project. |
1616
| `client.generate_report(project, ...)` | `dict` | Generate a PDF report; returns `{url, expires, fileName}`. |
1717

18-
## check_compliance
18+
## check_UA_compliance
1919

2020
Returns a dict with a top-level `mandatoryRequirementsMet` flag and a
2121
status object for each category:
@@ -27,15 +27,15 @@ status object for each category:
2727
- `energyCreditStatus`
2828

2929
```python
30-
compliance = client.check_compliance(project)
30+
compliance = client.check_UA_compliance(project)
3131
if compliance["mandatoryRequirementsMet"]:
3232
...
3333
```
3434

3535
## check_requirements
3636

3737
Returns the applicable requirements payload for the project. Like
38-
`check_compliance`, it's a single synchronous call — no polling.
38+
`check_UA_compliance`, it's a single synchronous call — no polling.
3939

4040
```python
4141
requirements = client.check_requirements(project)

‎comcheck_api/api/api_services.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,8 @@ def assemblies_uvalue(
214214
except Exception as error:
215215
self._handle_api_error(error)
216216

217-
def check_compliance(self, project_data: Dict[str, Any]) -> Dict[str, Any]:
218-
"""Check compliance for a project.
217+
def check_UA_compliance(self, project_data: Dict[str, Any]) -> Dict[str, Any]:
218+
"""Check UA path compliance for a project.
219219
220220
Args:
221221
project_data: The project data to send in the request body

‎comcheck_api/client/comcheck_client.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@ def update_uvalues(self, project: ComBuilding) -> ComBuilding:
288288

289289
return project
290290

291-
def check_compliance(self, project: ComBuilding) -> Any:
292-
"""Check code compliance for a project.
291+
def check_UA_compliance(self, project: ComBuilding) -> Any:
292+
"""Check UA path compliance for a project.
293293
294294
Args:
295295
project: The project data to evaluate.
@@ -298,7 +298,7 @@ def check_compliance(self, project: ComBuilding) -> Any:
298298
The compliance results payload returned by the API.
299299
"""
300300
project_data = project.model_dump(mode="json", exclude_unset=True)
301-
response = self._service.check_compliance(project_data)
301+
response = self._service.check_UA_compliance(project_data)
302302
return response.get("data")
303303

304304
def check_requirements(self, project: ComBuilding) -> Any:

‎docs_site/api/compliance.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ and a PDF report generator.
55

66
## Check compliance
77

8-
`check_compliance(project)` evaluates a project against its energy code and
8+
`check_UA_compliance(project)` evaluates a project against its energy code and
99
returns the per-category compliance status.
1010

1111
```python
@@ -15,7 +15,7 @@ from comcheck_api.defaults import get_default_project_template
1515
client = COMcheckClient(api_key="your-key")
1616
project = get_default_project_template()
1717

18-
compliance = client.check_compliance(project)
18+
compliance = client.check_UA_compliance(project)
1919
# {
2020
# "mandatoryRequirementsMet": ...,
2121
# "envelopeStatus": {...}, "interiorLightingStatus": {...},

‎examples/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ python examples/client/simulation.py
3838
Demonstrates compliance checks, requirements lookup, and PDF report generation.
3939

4040
**What it demonstrates:**
41-
- `check_compliance()` - Checking code compliance for a project
41+
- `check_UA_compliance()` - Checking code compliance for a project
4242
- `check_requirements()` - Retrieving applicable requirements
4343
- `generate_report()` - Generating a PDF report (presigned S3 URL, optional download)
4444

‎examples/client/compliance_and_report.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
project.control.code = EnergyCodeOptions.CEZ_90_1_2022
1818

1919
# Example 1: Check code compliance for the project
20-
compliance = client.check_compliance(project)
20+
compliance = client.check_UA_compliance(project)
2121
print(f"Compliance: {compliance}")
2222

2323
# Example 2: Check the applicable requirements for the project

0 commit comments

Comments
 (0)