-
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
Universal childcare entitlement #1010
base: master
Are you sure you want to change the base?
Changes from all commits
789f676
cd3ff72
e792de8
aacf564
d736589
295b6e3
91f4cde
65d0909
fb18cbc
c30d21a
30e4376
0245691
b307f43
38e5bcc
f8462e1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
description: The Department for Education converts childcare hours into expenses for universal childcare entitlement at this rate. | ||
metadata: | ||
type: single_amount | ||
threshold_unit: year | ||
amount_unit: currency-GBP | ||
label: universal childcare entitlement hourly rates | ||
reference: | ||
- title: House of Commons Library | ||
href: https://commonslibrary.parliament.uk/research-briefings/cbp-8052/ | ||
values: | ||
2015-01-01: 5.88 | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
description: The Department for Education provides universal childcare entitlement in England, specifying the eligible age range and number of hours per year. | ||
metadata: | ||
type: single_amount | ||
threshold_unit: year | ||
amount_unit: hour | ||
label: universal childcare entitlement hours | ||
reference: | ||
- title: Childcare (Early Years Provision Free of Charge) (Extended Entitlement) Regulations 2016 - Regulation 35(3) | ||
vahid-ahmadi marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you point more specifically? 570 is is in 35(1), i see the third birthday in (3) but not (quickly scanning) the compulsory school age part |
||
href: https://www.legislation.gov.uk/uksi/2016/1257/part/4/made | ||
- title: Education Act 1996 - Section 8 (Compulsory School Age) | ||
href: https://www.legislation.gov.uk/ukpga/1996/56/section/8 | ||
# In England, children are eligible for universal childcare entitlement from age 3 until they reach compulsory school age, which is defined as the start of the term after their fifth birthday. | ||
brackets: | ||
- threshold: | ||
2015-01-01: 0 | ||
amount: | ||
2015-01-01: 0 | ||
- threshold: | ||
2015-01-01: 3 | ||
amount: | ||
2015-01-01: 570 | ||
- threshold: | ||
2015-01-01: 5 | ||
amount: | ||
2015-01-01: 0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
- name: Child under 3 isn't eligible | ||
period: 2024 | ||
input: | ||
people: | ||
child: | ||
age: 2 | ||
benunits: | ||
benunit: | ||
members: ["child"] | ||
output: | ||
universal_childcare_entitlement: [0] | ||
|
||
- name: Child aged 3 is eligible | ||
period: 2024 | ||
input: | ||
people: | ||
child: | ||
age: 3 | ||
universal_childcare_entitlement_hours: 570 | ||
benunits: | ||
benunit: | ||
members: ["child"] | ||
output: | ||
universal_childcare_entitlement: [3351.60] | ||
|
||
- name: Child aged 4 is eligible | ||
period: 2024 | ||
input: | ||
people: | ||
child: | ||
age: 4 | ||
universal_childcare_entitlement_hours: 570 | ||
benunits: | ||
benunit: | ||
members: ["child"] | ||
output: | ||
universal_childcare_entitlement: [3351.60] | ||
|
||
- name: Multiple children different ages, some eligible | ||
period: 2024 | ||
input: | ||
people: | ||
parent: | ||
age: 35 | ||
child1: | ||
age: 2 | ||
child2: | ||
age: 3 | ||
universal_childcare_entitlement_hours: 570 | ||
child3: | ||
age: 4 | ||
universal_childcare_entitlement_hours: 570 | ||
child4: | ||
age: 5 | ||
benunits: | ||
benunit: | ||
members: ["parent", "child1", "child2", "child3", "child4"] | ||
output: | ||
universal_childcare_entitlement: [0, 0, 3351.60, 3351.60, 0] | ||
|
||
- name: Family with twins - both eligible for full entitlement | ||
vahid-ahmadi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
period: 2024 | ||
input: | ||
people: | ||
parent: | ||
age: 35 | ||
twin1: | ||
age: 3 | ||
universal_childcare_entitlement_hours: 570 | ||
twin2: | ||
age: 3 | ||
universal_childcare_entitlement_hours: 570 | ||
benunits: | ||
benunit: | ||
members: ["parent", "twin1", "twin2"] | ||
output: | ||
universal_childcare_entitlement: [0, 3351.60, 3351.60] |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. since these are person-level variables that don't depend on attributes of other household members, please simplify the unit tests to operate at the person level. some of these could still provide value as integration tests though |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
- name: Child under 3 - no entitlement | ||
period: 2024 | ||
input: | ||
people: | ||
child: | ||
age: 2 | ||
benunits: | ||
benunit: | ||
members: ["child"] | ||
output: | ||
universal_childcare_entitlement_hours: [0] | ||
|
||
- name: Child aged 3 - full entitlement | ||
period: 2024 | ||
input: | ||
people: | ||
child: | ||
age: 3 | ||
benunits: | ||
benunit: | ||
members: ["child"] | ||
output: | ||
universal_childcare_entitlement_hours: [570] | ||
|
||
- name: Child aged 4 - full entitlement | ||
period: 2024 | ||
input: | ||
people: | ||
child: | ||
age: 4 | ||
benunits: | ||
benunit: | ||
members: ["child"] | ||
output: | ||
universal_childcare_entitlement_hours: [570] | ||
|
||
- name: Child aged 5 - no entitlement | ||
period: 2024 | ||
input: | ||
people: | ||
child: | ||
age: 5 | ||
benunits: | ||
benunit: | ||
members: ["child"] | ||
output: | ||
universal_childcare_entitlement_hours: [0] | ||
|
||
- name: Family with multiple children - mixed entitlement | ||
period: 2024 | ||
input: | ||
people: | ||
parent: | ||
age: 35 | ||
child1: | ||
age: 2 | ||
child2: | ||
age: 3 | ||
child3: | ||
age: 4 | ||
child4: | ||
age: 5 | ||
benunits: | ||
benunit: | ||
members: ["parent", "child1", "child2", "child3", "child4"] | ||
output: | ||
universal_childcare_entitlement_hours: [0, 0, 570, 570, 0] |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,18 @@ | ||||||
from policyengine_uk.model_api import * | ||||||
|
||||||
|
||||||
class universal_childcare_entitlement(Variable): | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we limit to england? |
||||||
value_type = float | ||||||
entity = Person | ||||||
label = "universal childcare entitlement amount per year" | ||||||
definition_period = YEAR | ||||||
unit = "currency-GBP" | ||||||
|
||||||
def formula(person, period, parameters): | ||||||
# Get the hours entitled for this child | ||||||
hours = person("universal_childcare_entitlement_hours", period) | ||||||
|
||||||
# Get the funding rate from parameters | ||||||
p = parameters(period).gov.dwp.universal_childcare_entitlement | ||||||
rate = p.funding_rate | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use
Suggested change
|
||||||
return hours * rate |
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -0,0 +1,17 @@ | ||||
from policyengine_uk.model_api import * | ||||
|
||||
|
||||
class universal_childcare_entitlement_hours(Variable): | ||||
value_type = float | ||||
entity = Person | ||||
label = "universal childcare entitlement hours per year" | ||||
definition_period = YEAR | ||||
unit = "hour" | ||||
|
||||
def formula(person, period, parameters): | ||||
# Get parameters with the correct path | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
p = parameters(period).gov.dwp.universal_childcare_entitlement | ||||
|
||||
# Calculate hours based on age using the brackets structure | ||||
age = person("age", period) | ||||
return p.hours.calc(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.
What about other ages?