Skip to content

v3 report household section: US and UK households with SPM geography, calculation provenance and UK input suggestions #1336

Closed as not planned

Description

@anth-volk

What

v3's report has a household section: the reader describes households, and each runs under the report's baseline and reform through the Public API's v1 household routes. Since commit 15d4b45, the section runs UK households in the UK, but several pieces still treat it as a US-only feature:

  • The result code falls back to the US result rows (the taxes and benefits it lists) for any country without its own, and HouseholdImpactResult defaults its currency to us. An unused simple-input run (buildHouseholdPayload, runFlagshipHousehold) still builds a US household with a US state.
  • The run drops each calculation's policyengine_bundle, spm_config and spm_provenance from the response.
  • The section hides the household builder's Supplemental Poverty Measure geography choice (hideSpmGeography), so every US household runs on national thresholds, and the SPM methodology footnote is hidden.
  • The household input suggestions ("Related to this reform") come from a parameter dependency map traced only from policyengine-us, so UK reports suggest nothing.

Scope

  1. Make the country required through householdRun, useFlagshipHousehold, HouseholdImpactSection and HouseholdImpactResult, and remove the unused US-only run.
  2. Keep the .py bundle and SPM provenance from each calculation response.
  3. Show the US SPM geography choice (national, or local thresholds by county), carry spm through, and show the SPM methodology footnote.
  4. Trace a UK dependency map from policyengine-uk and suggest UK household inputs from it.
  5. Acceptance checks for UK households from Bug in UK household calculation [MOVE TO API] #358 and UAT: UK Household (PR #556) #562 (saved households, UAT: UK Household (PR #556) #562's second item, are a separate change).

This is live as soon as it merges, still on the Public API's v1 household calculations. It overlaps with draft #1240 (UK claimant roles): once that merges, the section should apply the same claimant roles before sending a UK household.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions