All notable changes to this project are documented in this file.
use_backstop_complianceoption forgenerate_report(). Setuse_backstop_compliance=Trueto evaluate the report using envelope backstop compliance; the generated PDF then includes an Envelope Backstop Compliance Certificate page. Sent to the API asuseBackstopComplianceand defaults toFalse, so existing calls are unchanged.
- Documented the backstop compliance option in the Compliance & Reports page,
the AI skill references, and
examples/client/compliance_and_report.py.
Reverts the enum renames introduced in 2.0.0. If you updated code to use the
*OptionsEnum names or .root accessors, those changes must be undone —
upgrading from 2.0.0 is otherwise a drop-in.
- The four
*OptionsEnumrenames are reverted.WallTypeOptions,FanSystemComplianceMethodOptions,FanEfficiencyExceptionTypeOptions, andTrackLightingWattageBasisTypeOptionsare plain enum classes again, and theWallTypeOptionsEnum/FanSystemComplianceMethodOptionsEnum/FanEfficiencyExceptionTypeOptionsEnum/TrackLightingWattageBasisTypeOptionsEnumclasses no longer exist. Member access works directly (WallTypeOptions.WOOD_FRAME_16_AG_WALL) and the.rootaccessor is gone. NoRootModelenum wrappers remain.- Three are
StrEnumand compare equal to their string values again:WallTypeOptions(11 members),FanEfficiencyExceptionTypeOptions(16),FanSystemComplianceMethodOptions(2). TrackLightingWattageBasisTypeOptions(7 members) is a plainEnum, so it does not compare equal to plain strings — aStrEnumcannot hold theNonemember this field still requires (see below).
- Three are
- Root cause of the 2.0.0 enum churn. The renames were never a deliberate
design change:
core_types.pyis generated bydatamodel-codegen(tools/generate_core_types.py), which must wrap an enum in aRootModelwhen a schema definition declares"type": "string"and listsnullas an enum member — a contradictory combination, since aStrEnumcannot holdNone. Codegen renamed the enum to*OptionsEnumto free the name for the wrapper. Exactly four definitions incomCheck.schema.jsonhad that combination; all four are now fixed at the schema level, so the generated types are clean. - Nullability made explicit for
TrackLightingWattageBasisTypeOptions. The API returnsnullfortrackLightingWattageBasisTypeon real projects, so removingnulloutright madeget_project()raiseValidationErroron existing data. The definition now declares"type": ["string", "null"]— matchingAdvancedControlsAllowanceTypeOptions— which keepsnullvalid without a wrapper. - Removed the redundant
nullenum member fromFanEfficiencyExceptionTypeOptions(which already has explicitUNSPECIFIEDandNONEmembers),WallTypeOptions, andFanSystemComplianceMethodOptions. These three fields now reject an explicitnull; leaving them unset is still valid and serializes as omitted.
- Replace
<Name>OptionsEnum.MEMBERwith<Name>Options.MEMBER, and drop any.rootaccess on these four types. - String comparisons work again for
WallTypeOptions,FanEfficiencyExceptionTypeOptions, andFanSystemComplianceMethodOptions. Keep using.valueor enum members forTrackLightingWattageBasisTypeOptions. - Stop sending an explicit
nullforwallType,fanEfficiencyExceptionType, orfanSystemComplianceMethod; omit the field instead.
This release tracks a breaking update to the COMcheck Web API schema. Projects
created or updated with comcheck-api < 2.0.0 are not compatible with the current
API — upgrade with:
pip install --upgrade comcheck-api- Enum types restructured. 26 options enums in
comcheck_api.types.core_types(e.g.BgWallTypeOptions,FuelTypeOptions,RequirementAnswerStatus,OrientationOptions) changed fromStrEnumto plainEnum, so they no longer compare equal to their plain-string values — use.valueor the enum member instead. The remaining ~73 options enums are stillStrEnumand are unaffected. Separately, four enums (WallTypeOptions,FanEfficiencyExceptionTypeOptions,FanSystemComplianceMethodOptions,TrackLightingWattageBasisTypeOptions) are nowRootModelwrappers around a renamed*Enumclass (e.g.WallTypeOptionsEnum); the wrapper holds the member in.root, so code that used these as enums directly must be updated. Superseded in 2.0.1 — these four renames were reverted; prefer upgrading straight to 2.0.1 rather than adopting the*OptionsEnumnames. - Serialization now uses pydantic's
MISSINGsentinel instead ofexclude_unset. Unset fields incore_typesmodels default toMISSINGandCustomBaseModeldefines a plain@model_serializerthat drops them, somodel_dump()on its own omits fields that were never set. Two consequences:exclude_unset=Trueis now a no-op on anyCustomBaseModel, because a plain (mode="plain") serializer bypasses pydantic's field-exclusion logic. Code passingexclude_unset/exclude_defaultstomodel_dump()no longer changes the output.- Fields with a concrete (non-
MISSING) default — such asProject.projectTitle, which defaults to"New Project"— are now emitted even when never explicitly set, whereasexclude_unset=Truepreviously dropped them. This changes request payload shape for code that relied on partial submissions.
- Removed
ActivityTypeOptions.ACTIVITY_COMMON_OFFICEfrom the schema and generated types. UseACTIVITY_COMMON_OFFICE_OPENorACTIVITY_COMMON_OFFICE_ENCLOSED. Older projects that still carry the removed value are preserved verbatim rather than rejected — seedocs/schema.md. areaDescriptionmust now be unique acrosslighting.wholeBldgUse.add_building_area_to_project()andupdate_building_area_in_project()raiseValueErroron a duplicate description, where they previously accepted it.- New required interior/exterior lighting fields and enums were added to the
schema (
comcheck_api/schemas/comCheck.schema.json), backing the newproject_interior_lighting_operations/project_exterior_lighting_operationsmodules. Projects built against the old schema may fail server-side validation until re-serialized with this version. - Renamed interior/exterior lighting operations and constants to
consistently use
InteriorSpace/ExteriorAreaterminology instead of the schema-generatedActivityUse/ExteriorUsenames (new type aliasescomcheck_api.types.common_types.InteriorSpaceandExteriorAreawere introduced for this):project_interior_lighting_operations:add_interior_lighting_space_to_project()→add_interior_space_to_project(),update_interior_lighting_space_in_project()→update_interior_space_in_project(),remove_interior_lighting_space_from_project()→remove_interior_space_from_project(),get_interior_lighting_space_keys_from_project()→get_interior_space_keys_from_project().project_exterior_lighting_operations:add_exterior_lighting_area_to_project()→add_exterior_area_to_project(),update_exterior_lighting_area_in_project()→update_exterior_area_in_project(),remove_exterior_lighting_area_from_project()→remove_exterior_area_from_project(),get_exterior_lighting_area_keys_from_project()→get_exterior_area_keys_from_project().comcheck_api.defaults:get_default_interior_lighting_space_template()→get_default_interior_space_template(),get_default_exterior_lighting_area_template()→get_default_exterior_area_template().- Internal constants
DEFAULT_INTERIOR_LIGHTING_SPACE_AREA→DEFAULT_INTERIOR_SPACE_AREAandDEFAULT_EXTERIOR_LIGHTING_AREA→DEFAULT_EXTERIOR_AREA.
- Renamed allowed-wattage client/service methods to match the same
InteriorSpaceterminology:COMcheckClient.calculate_activity_use_allowed_wattage()→calculate_interior_space_allowed_wattage(), andcalculate_activity_uses_allowed_wattage()→calculate_interior_spaces_allowed_wattage(). The matchingCOMCheckApiServicemethods were renamed fromactivity_use_allowed_wattage()/activity_uses_allowed_wattage()tointerior_space_allowed_wattage()/interior_spaces_allowed_wattage(). The underlying HTTP endpoints (/{energy_code}/activity-use/allowed-wattage,/{energy_code}/activity-uses/allowed-wattage) are unchanged.
- Interior lighting allowed-wattage calculation:
COMcheckClient.calculate_interior_space_allowed_wattage()andcalculate_interior_spaces_allowed_wattage(), backed by new/{energy_code}/activity-use/allowed-wattageand/{energy_code}/activity-uses/allowed-wattageAPI endpoints. project_exterior_lighting_operationsandproject_interior_lighting_operationsmodules for building up lighting sections of a project.update_fixtures_in_interior_space()andupdate_fixtures_in_exterior_area()for batch adding, updating, and removing fixtures on a lighting space in one call, matched byfixtureType(the schema-documented uniqueness key for fixtures within a lighting space, notid). RaisesValueErroron duplicatefixtureTypes within a batch or an unmatched removal.- New energy code options (
CEZ_IECC2009,CEZ_IECC2012,CEZ_IECC2024_APPXCF,CEZ_90_1_2007,CEZ_90_1_2010,NONE). docs/schema.md, documenting the schema and how unknown/removed enum values from older projects are handled.x-client-versionrequest header, sent on every API call so the server can identify the client version. Resolved from the installed package metadata, and falls back to"unknown"when running from a source checkout with no installed distribution.
- Updated
docs_site(interior/exterior lighting operations pages, types-guide), the AI skill (SKILL.md,reference/operations.md,reference/types.md), andexamples/to reflect the renamed functions/constants and to document the new batch fixture operations and the renamed allowed-wattage methods.
- If you pin
comcheck-api, bump the pin to>=2.0.0and re-test any code that imports enum types fromcomcheck_api.types.core_typesor that relies on partial (exclude_unset) payloads. Note thatexclude_unset=Trueis now ignored — if you need to suppress a field, leave it unset so it staysMISSINGrather than assigningNone. - Requires
pydantic>=2.12.5for theMISSINGsentinel (pydantic.experimental.missing_sentinel). This is an experimental pydantic API; if it is unavailable the serializer falls back to emitting all fields. - Projects saved with an older client version should be re-fetched and re-submitted with 2.0.0+ to pick up the new required lighting fields.
- Update any code calling the renamed interior/exterior lighting operations, defaults, or allowed-wattage client/service methods listed above.
- Replace
ACTIVITY_COMMON_OFFICEwithACTIVITY_COMMON_OFFICE_OPENorACTIVITY_COMMON_OFFICE_ENCLOSED, and ensure each building area has a uniqueareaDescription.
Latest version published on PyPI prior to this release was 1.0.7. See git
history prior to this file's creation for details on earlier releases.