PolicyEngine / PolicyEngine/policyengine-uk

Refactor age-related variables

Open
#167 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
50
Forks
33
Avg merge
20h 58m
Merged PRs (30d)
14

Description

variables/demographic/person.py includes four age-related variables:

One issue is that over_16 is inconsistently defined with over_64 (>= vs >). I think a couple of these can also use between().

But more generally, terms like young_child and even child can be ambiguous (sometimes a person under 18 isn't a child if they're not in a family). Can we remove or rename the variables that don't specify their criteria? We could also set a standard around only defining under_* and between_*_* to avoid redundancy. For example, all the above could be shrunk down to:

  • under_14
  • between_15_17
  • under_17
  • under_18
  • between_18_SPA
  • between_18_64
  • under_65

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 in openfisca_uk/variables/demographic/person.py and review the listed age-related variables and their criteria. Compare the boundary definitions and naming options, then identify the consistent set of variables the project should retain or rename. Done means the age-variable scheme is agreed and the file reflects that decision without ambiguous or redundant definitions.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.