Use HBAI population groups for UK poverty breakdowns; stop requesting the deprecated is_child/is_adult
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start with src/policyengine/tax_benefit_models/uk/model.py and uk/household.py, then inspect src/policyengine/outputs/poverty.py and cliff_impact.py. Confirm the policyengine-uk pin includes the HBAI variables, and run the existing snapshot and poverty tests before changing the UK output keys. Done means deprecated UK variables are no longer read, HBAI groups reproduce the enhanced FRS split, and snapshots, poverty tests, executor keys, and labels are consistent.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Why
PolicyEngine/policyengine-uk#1896 replaces the generic is_child (age < 18) and is_adult (age >= 18) flags inside the UK model with each programme's legal definition, and adds explicit HBAI (Households Below Average Income) variables for statistics. UK law has no single definition of a child: Child Benefit, Universal Credit, tax credits, Pension Credit, the legacy benefits and student support each define their own, and HBAI defines a dependent child as under 16, or 16-19, unpartnered, living with parents and in full-time non-advanced education or unwaged government training.
is_child, is_adult, family_type and the other generic variables stay in policyengine-uk as deprecated shims with their old age-18 formulas, so nothing breaks. This issue moves policyengine.py onto the explicit variables once its policyengine-uk pin moves past the release containing that PR.
Changes
src/policyengine/tax_benefit_models/uk/model.py: dropis_adultandis_childfrom the UK person output columns (lines ~63-65) and addhbai_person_type(enum:CHILD,WORKING_AGE_ADULT,PENSIONER) oris_hbai_dependent_child. Replace the benunitfamily_typecolumn (line ~94; deprecated, age-18 split) withrelation_type(claimant has a partner) if a family column is still wanted. Updateuk/household.pyaccordingly and regenerate the UK household snapshot fixtures.src/policyengine/outputs/poverty.py: UK poverty by group should use the HBAI population groups, not the age bands inAGE_GROUPS(child <= 17, adult 18-64, senior 65+). HBAI groups: dependent children, working-age adults (below State Pension age) and pensioners (at or above State Pension age), i.e.hbai_person_type. Keep age bands where an age band is meant, but label them as age bands (for exampleaged_0_to_17,aged_18_to_64,aged_65_and_over), and keep the US groups separate from the UK ones. The api-v2 simulation executor and the app's "Children / Working-age adults / Seniors" labels read these groups: coordinate the key change (for the UK, "Seniors" should read "Pensioners").src/policyengine/outputs/cliff_impact.py: the cliff-share denominator sumsis_adult. Make it an explicit per-country predicate (for the UK, people aged 18 or over viaage, oris_hbai_adultif the intended population is HBAI adults) and document it; the numerator currently counts everyone.
Acceptance
- No policyengine.py code reads a deprecated UK variable (
is_child,is_adult,num_children,num_adults,family_type,child_index,adult_indexexcepted). - UK poverty-by-group outputs reproduce HBAI's population split on the enhanced FRS.
- Snapshot and poverty tests updated.
🤖 Generated with Claude Code
- Lingua principale
- Python
- Stelle
- 8
- Fork
- 10
- Merge medio
- 12h 26m
- PR unite (30g)
- 22
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PolicyEngine/policyengine.py
-
Raise the simulation cache memory warning to 16 GiBForse già presa @anth-volk l’ha presa 13 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
PolicyEngine/policyengine.py#549 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
PolicyEngine/policyengine.py#473 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
PolicyEngine/policyengine.py#436 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Certify populace-uk as the UK certified defaultForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
PolicyEngine/policyengine.py#408 ·
I maintainer di solito rispondono entro 1 giorno
-
Temporarily supply the certified SPM independence role for ACS-local ASEC and PUF recordsForse già presa @anth-volk l’ha presa oggi. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
PolicyEngine/policyengine.py#598 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di PolicyEngine/policyengine.py
Issue simili
-
[Bug]: LangGraph Store sync put bypasses namespace validationForse già presa @ktz03 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
volcengine/OpenViking#6050 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: Streamed /v1/chat/completions sends unredacted agent error text (keys) in the final chunkForse già presa @rodricksz4h5 l’ha presa oggi. Apertaarea/streaming comp/gateway P2 type/security
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
NousResearch/hermes-agent#138245 ·
I maintainer di solito rispondono entro 1 giorno
-
[oblt-aw][autodoc] Update user onboarding guide for mandatory trigger CODEOWNERS stepForse già presa @github-actions l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
correction metadata
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 68/100
acl-org/acl-anthology#10378 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
cloudtrail_multi_region_enabled_logging_management_events fails when the advanced event selector has a custom nameForse già presa @12YYCCYY16 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
prowler-cloud/prowler#13033 ·
I maintainer di solito rispondono entro 1 giorno