Skip to content

Add monthly Universal Credit element caseload sources - #188

Merged
juaristi22 merged 3 commits into
mainfrom
issue-187-dwp-uc-element-caseloads
Aug 21, 2026
Merged

Add monthly Universal Credit element caseload sources#188
juaristi22 merged 3 commits into
mainfrom
issue-187-dwp-uc-element-caseloads

Conversation

@juaristi22

Copy link
Copy Markdown
Collaborator

Summary

  • Add monthly DWP Universal Credit caseload packages for the childcare, housing, LCWRA, and carer elements
  • Replace the May-only family-type and number-of-children packages with April–December 2025 histories
  • Register all six packages in Chronicle's source aliases and UK bundle
  • Preserve publisher provenance, monthly periods, benefit-unit entities, and Great Britain geography

The six packages add 198 publisher-sourced facts. Chronicle does not annualize, reconcile, or otherwise transform the published values.

Testing

  • All six validate-package checks passed
  • All six build-suite checks passed
  • 120 passed in the source-package regression suite
  • 8 passed in the source-package alias-drift suite
  • UK bundle registration and CLI tests passed
  • Ruff formatting and lint checks passed
  • git diff --check passed

Fixes #187

@juaristi22
juaristi22 marked this pull request as ready for review August 21, 2026 14:32
@vahid-ahmadi

Copy link
Copy Markdown

Automated review pass (Claude Code, low-effort single diff pass). One finding:

db/data/dwp/uc_childcare_element_march_2021_august_2025/manifest.yaml:9source_url has a doubled segment (...march-2021-to-to-august-2025.ods) that doesn't match the recorded filename / R2 key; any re-fetch or provenance check against this URL will 404.

Nothing else qualifies — the chronicle/bundle.py and chronicle/source_package.py changes are consistent registry edits, and the removed *_may_2025 package IDs are dropped from both files together with their manifests.

@juaristi22

Copy link
Copy Markdown
Collaborator Author

Addressed Vahid's review comment in c8bb280.

The GOV.UK attachment URL itself uses the to-to-august-2025.ods basename, so I aligned the manifest filename, checked-in ODS filename, and raw R2 key/URI to that official basename rather than changing source_url to the cleaned filename, which returns 404.

Verification:

  • uv run --locked pytest tests/test_chronicle_source_package.py::test_dwp_uc_childcare_element_package_preserves_monthly_publisher_series
  • uv run --locked chronicle validate-package dwp-uc-childcare-element-march-2021-august-2025 --year 2025
  • Confirmed the GOV.UK source_url returns content with an HTTP 206 range request.
  • Uploaded the aligned raw artifact to ledger-raw.

I skipped a full bundle rebuild because this only changes artifact provenance metadata and a checked-in filename.

@juaristi22
juaristi22 merged commit 7754c8c into main Aug 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UC element-count and monthly composition facts for the microcosm UK target surface

2 participants