mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-27 23:35:01 +00:00
Band every continuous SAP score through the published-rating rule 🟪
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
07a71ad504
commit
27060f4d81
3 changed files with 6 additions and 6 deletions
|
|
@ -91,13 +91,13 @@ class Plan:
|
|||
|
||||
@property
|
||||
def post_epc_rating(self) -> Epc:
|
||||
"""The post-retrofit EPC band, from the rounded SAP rating."""
|
||||
return Epc.from_sap_score(round(self.post_retrofit.sap_continuous))
|
||||
"""The post-retrofit EPC band, as it would be published."""
|
||||
return Epc.from_sap_continuous(self.post_retrofit.sap_continuous)
|
||||
|
||||
@property
|
||||
def baseline_epc_rating(self) -> Epc:
|
||||
"""The baseline EPC band, from the rounded baseline SAP rating."""
|
||||
return Epc.from_sap_score(round(self.baseline.sap_continuous))
|
||||
"""The baseline EPC band, as it would be published."""
|
||||
return Epc.from_sap_continuous(self.baseline.sap_continuous)
|
||||
|
||||
@property
|
||||
def valuation(self) -> ValuationUplift:
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ _KG_PER_TONNE = 1000.0
|
|||
|
||||
|
||||
def _band(sap_continuous: float) -> str:
|
||||
return Epc.from_sap_score(round(sap_continuous)).value
|
||||
return Epc.from_sap_continuous(sap_continuous).value
|
||||
|
||||
|
||||
def _signed_gbp(value: Optional[float]) -> str:
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ def _band_rank(band: Optional[str]) -> Optional[int]:
|
|||
def _band_of(score: Optional[float]) -> Optional[str]:
|
||||
if score is None:
|
||||
return None
|
||||
return Epc.from_sap_score(round(score)).value
|
||||
return Epc.from_sap_continuous(score).value
|
||||
|
||||
|
||||
def _int_or_none(value: object) -> Optional[int]:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue