-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Study childcare entitlement #1016
base: master
Are you sure you want to change the base?
Conversation
metadata: | ||
unit: year | ||
period: year | ||
label: Maximum age to be eligible for care to learn scheme |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Always refer to proper nouns in capitalisation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -0,0 +1,10 @@ | |||
description: The Department for Education sets a maximum age for carers to be eligible for care to learn scheme. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the
Care to Learn scheme. Please run all text additions through Claude for grammar in future- bit repetitive! Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: The Department for Education sets a maximum age for carers to be eligible for care to learn scheme. | |
description: The Department for Education limits Care to Learn eligibility to carers younger than this age. |
@@ -0,0 +1,24 @@ | |||
description: Amount of support available through the Care to Learn scheme | |||
in_london: | |||
description: Maximum weekly amount available per child for those living in London |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Always end descriptions with full stops, as in previous PRs :)
period: week | ||
label: Maximum weekly amount per child in London | ||
reference: | ||
- title: none |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
none?
lives_in_england = country == countries.ENGLAND | ||
|
||
# Return eligibility - must be a parent AND meet all other criteria | ||
return ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clean, nice formula!
# Check basic eligibility conditions | ||
has_children = person.benunit.any(person("is_child", period)) | ||
p = parameters(period).gov.hmrc.study_childcare_entitlement | ||
under_20 = person("age", period) < p.care_to_learn_age_eligible |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid parameter values in variable names
under_20 = person("age", period) < p.care_to_learn_age_eligible | |
age_eligible = person("age", period) < p.care_to_learn_age_eligible |
|
||
def formula(person, period, parameters): | ||
# Only parents can be eligible, not children | ||
is_parent = ~person("is_child", period) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then use ~is_child
below. ~is_child
does not imply is_parent
.
is_parent = ~person("is_child", period) | |
is_child = person("is_child", period) |
eligible = person("care_to_learn_eligible", period) | ||
|
||
# Check if in London using region | ||
household_region = person.household("region", period) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't need the extra variable
household_region = person.household("region", period) | |
region = person.household("region", period) | |
p = parameters(period).gov.hmrc.study_childcare_entitlement.care_to_learn.amount | |
max_amount = where( | |
region == region.possible_values.LONDON, | |
p.in_london, | |
p.outside_london, | |
) | |
return eligible * max_amount * WEEKS_IN_YEAR |
@@ -0,0 +1,10 @@ | |||
description: The Department for Education sets a maximum age for carers to be eligible for care to learn scheme. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: The Department for Education sets a maximum age for carers to be eligible for care to learn scheme. | |
description: The Department for Education limits Care to Learn eligibility to carers younger than this age. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move to care_to_learn/age_limit.yaml
(and care_to_learn/amount.yaml
)
Quality Gate passedIssues Measures |
Overview
This PR Implements the study childcare entitlement schemes in PolicyEngine UK:
Note
Both schemes apply to England only. Different programs operate in Scotland, Wales, and Northern Ireland.
Key Features
Care to Learn:
Childcare Grant:
Fixes #1017
Depends on #1004