PolicyEngine / PolicyEngine/policyengine-core

Support projecting non-person variables down to person in `add`

Open
#343 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
22
Forks
30
Avg merge
14h 33m
Merged PRs (30d)
7

Description

For instance, the UK extended childcare entitlement adjusts work requirements for parents who participate in a disability program or are in benefit units that receive Universal Credit Carer's Allowance. We would like to call add(person, period, p.disability_programs) where disability_programs includes the UC Carer's Allowance, but that's at the benunit level, so @vahid-ahmadi reported the error can't pass a benunit level variable to person level (see https://github.com/PolicyEngine/policyengine-uk/pull/1007/files#r1954925673).

Let's support this projection.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the add(person, period, p.disability_programs) entry point and trace the code path that raises "can't pass a benunit level variable to person level." The work is done when this benunit-to-person projection is supported without that error, including coverage for the reported example.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.