Model/infrastructure
Jun-te Kim 7aea692521 historic EPC: read via infrastructure/s3, not the utils.s3 utility
HistoricEpcS3Repository reached into utils/s3.py (read_csv_gz_from_s3 +
parse_s3_uri), the legacy utility that self-constructs boto3 inside free
functions. The other S3 repositories deliberately depend on the
infrastructure/s3 layer instead (UnstandardisedAddressListCsvS3Repository
injects a CsvS3Client). Bring historic EPC into line.

- Add GzipCsvS3Client(S3Client) in infrastructure/s3: read_csv_gz(key) ->
  DataFrame (get_object + gzip decode).
- Inject it into HistoricEpcS3Repository; the bucket lives in the client and
  the repo only builds the per-postcode key + maps rows (no S3/HTTP code).
  Add with_default_s3_client(s3_root) for composition roots.
- Update main.py and the match_addresses_for_postcode seam to the factory.
- Repo tests inject a real GzipCsvS3Client over a controlled boto stub
  (exact key assertions + AccessDenied); add a moto-based client test and a
  factory test covering s3_root -> bucket+key.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MQE5TsSuQTeNSCSz9A9GQf
2026-06-30 09:19:57 +00:00
..
chatgpt moved classifier data transformation to an easy one 2026-06-01 14:53:34 +00:00
epc_client docs(adr): record nearby-postcode broadening (0034) + share HTTP retry primitive 2026-06-23 16:54:06 +00:00
landlord_overrides Classify the landlord Hot Water and Heating columns into categories 🟩 2026-06-19 14:09:05 +00:00
magic_plan define MagicPlanConfig class to get environment variables 2026-06-05 15:46:32 +00:00
openai updated rdsap option; seperated s3 location in infrastrucutre; added open ai api 2026-06-01 16:33:14 +00:00
postcodes_io docs(adr): record nearby-postcode broadening (0034) + share HTTP retry primitive 2026-06-23 16:54:06 +00:00
postgres feat: persist 7 calculator-read EPC fields 🟩 2026-06-26 18:46:42 +00:00
s3 historic EPC: read via infrastructure/s3, not the utils.s3 utility 2026-06-30 09:19:57 +00:00
solar Pace Solar calls per container to stay under the 600 QPM fleet cap 🟩 2026-06-25 16:00:33 +00:00
__init__.py added postcode splitter rewrite to ddd 2026-05-19 16:35:09 +00:00
address2uprn_queue_client.py get rid of comments 2026-05-20 13:21:11 +00:00
http_retry.py Add opt-in full-jitter backoff to de-synchronise concurrent retries 🟩 2026-06-25 10:45:00 +00:00
sqs_client.py get rid of comments 2026-05-20 13:21:11 +00:00