diff --git a/infrastructure/condition/parsing/calico_parser.py b/infrastructure/condition/parsing/calico_parser.py index bc41a8c42..e6a106f78 100644 --- a/infrastructure/condition/parsing/calico_parser.py +++ b/infrastructure/condition/parsing/calico_parser.py @@ -36,12 +36,11 @@ class CalicoParser(Parser): rows = sheet.iter_rows(values_only=True) column_index = CalicoParser._column_indexes(next(rows)) - assets = CalicoParser._parse_assets(rows, column_index) + assets = self._parse_assets(rows, column_index) return self._group_assets_into_properties(assets) - @staticmethod def _parse_assets( - rows: Any, column_index: Dict[str, int] + self, rows: Any, column_index: Dict[str, int] ) -> List[CalicoAssetCondition]: assets: List[CalicoAssetCondition] = [] for row in rows: @@ -49,6 +48,7 @@ class CalicoParser(Parser): if covering_type is None: # A blank covering type is a placeholder row (no roof-covering # record captured), not an observation -- drop on parse. + self._blank_placeholder_count += 1 continue assets.append( CalicoAssetCondition( @@ -77,6 +77,7 @@ class CalicoParser(Parser): for reference, grouped_assets in assets_by_ref.items(): uprn = ref_to_uprn.get(str(reference)) if uprn is None: + self._unmatched_reference_count += 1 logger.debug( f"[CalicoParser] No UPRN for asset reference {reference}; dropping" )