Skip to content
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

Extended childcare entitlement #1007

Draft
wants to merge 48 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
adf96a0
Implement tax free childcare
vahid-ahmadi Jan 10, 2025
ee24d61
Parameterize values
vahid-ahmadi Jan 13, 2025
12d24be
Reformatting to pass the tests
vahid-ahmadi Jan 13, 2025
235fd08
Reformatting with black
vahid-ahmadi Jan 13, 2025
b3b1967
Reformatting with black
vahid-ahmadi Jan 13, 2025
55ce6c3
Format code with black
vahid-ahmadi Jan 13, 2025
9952ed9
Format code with black using 79-char line length
vahid-ahmadi Jan 13, 2025
d6b22e5
Fix YAML structure
vahid-ahmadi Jan 13, 2025
b06a47c
Fix age condition YAML file
vahid-ahmadi Jan 13, 2025
90eb823
Fix age condition YAML file
vahid-ahmadi Jan 13, 2025
0c871a5
Fix other YAML files
vahid-ahmadi Jan 13, 2025
b28b5f8
Edit parameterization
vahid-ahmadi Jan 13, 2025
ff1f456
Fix formatting
vahid-ahmadi Jan 13, 2025
d3ad685
Edit age in YAML files
vahid-ahmadi Jan 13, 2025
5c6d359
Replace if with where
vahid-ahmadi Jan 13, 2025
e0221f8
Format with black
vahid-ahmadi Jan 13, 2025
fc83a03
Edit for test passing
vahid-ahmadi Jan 13, 2025
4421154
Edit format with black
vahid-ahmadi Jan 13, 2025
b4e8d1a
Edit format of benefit py file
vahid-ahmadi Jan 13, 2025
cf7f6e6
Edit child as not being boolean
vahid-ahmadi Jan 13, 2025
d4ff3b2
Change if to where
vahid-ahmadi Jan 14, 2025
0058402
Change disability definition
vahid-ahmadi Jan 14, 2025
37c7228
Solve .values problem
vahid-ahmadi Jan 14, 2025
af96f3a
Edit .values error
vahid-ahmadi Jan 14, 2025
e96bc2e
Edit vectorization problem
vahid-ahmadi Jan 14, 2025
153c2f6
Change folder from hmrc to dwp
vahid-ahmadi Jan 14, 2025
c9fbd0c
Use is_disabled_for_benefits variable
vahid-ahmadi Jan 14, 2025
a2f73d2
Add .astype(bool) to fix error
vahid-ahmadi Jan 14, 2025
a061877
Fix bitwise AND operation error
vahid-ahmadi Jan 14, 2025
a9ca8a7
Add .astype(bool) to conditions
vahid-ahmadi Jan 14, 2025
c7c6762
Add unit tests
vahid-ahmadi Jan 14, 2025
59e1b78
Reformat with black
vahid-ahmadi Jan 14, 2025
cebaace
Fix the folders
vahid-ahmadi Jan 15, 2025
c1a5cf0
Fix the folders
vahid-ahmadi Jan 15, 2025
49ec556
Merge branch 'tax-free-childcare-new' of https://github.com/policyeng…
vahid-ahmadi Jan 15, 2025
4a5cad5
Implement free childcare program
vahid-ahmadi Jan 15, 2025
4432db2
Format with black
vahid-ahmadi Jan 15, 2025
c7c1998
Change tests
vahid-ahmadi Jan 15, 2025
7c34576
Edit folders
vahid-ahmadi Jan 22, 2025
d3adae9
Edit folders
vahid-ahmadi Jan 22, 2025
bb62fe2
Edit files directories
vahid-ahmadi Jan 22, 2025
ade2a50
Merge branch 'free_childcare' of https://github.com/policyengine/poli…
vahid-ahmadi Jan 22, 2025
014f8d3
Edit labels
vahid-ahmadi Jan 22, 2025
6a8fd46
Edit extended childcare entitlement py files based on comments
vahid-ahmadi Jan 23, 2025
3985b32
Check with black
vahid-ahmadi Jan 23, 2025
1750e05
Edit extended childcare based on Max's comments
vahid-ahmadi Jan 27, 2025
f534147
Merge branch 'master' into free_childcare
vahid-ahmadi Feb 4, 2025
59c21f2
Edit income condition
vahid-ahmadi Feb 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
description: The Department for Education provides the extended childcare entitlement to children this age or older
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Always end in a full stop please.

label: Age eligibility for extended childcare first entitlement
metadata:
type: single_amount
threshold_unit: year
reference:
- title: The Childcare (Free of Charge for Working Parents) (England) Regulations 2022 - Regulations 13
href: https://www.legislation.gov.uk/uksi/2022/1134/regulation/13
- title: Extended childcare entitlement guidance
href: https://www.gov.uk/check-eligible-free-childcare-if-youre-working?step-by-step-nav=f517cd57-3c18-4b...
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be ...?


brackets:
- threshold:
2015-01-01: 0
amount:
2015-01-01: false
- threshold:
2015-01-01: 0.75
amount:
2015-01-01: true
- threshold:
2015-01-01: 3
amount:
2015-01-01: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
description: The Department for Education provides the extended childcare entitlement to children this age or older
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd just have two parameters, min and max age. Your description is inconsistent anyway with this current format (this age or older-> bracket?).

label: Age eligibility for extended childcare second entitlement
metadata:
type: single_amount
threshold_unit: year
reference:
- title: The Childcare (Free of Charge for Working Parents) (England) Regulations 2022 - Regulations 14 and section 7(1)(b) of the 2006 Act
href: https://www.legislation.gov.uk/uksi/2014/2147/regulation/3/made
- title: Extended childcare entitlement guidance
href: https://www.gov.uk/check-eligible-free-childcare-if-youre-working?step-by-step-nav=f517cd57-3c18-4b...
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this have a ...?


brackets:
- threshold:
2015-01-01: 0
amount:
values:
2015-01-01: false
- threshold:
2015-01-01: 3
amount:
values:
2015-01-01: true
- threshold:
2015-01-01: 5
amount:
values:
2015-01-01: false


Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
description: The department for education requires minimum earnings thresholds for extended childcare entitlement eligibility based on the age of parents.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Always capitalise proper nouns like 'Department for Education'

metadata:
period: year
type: single_amount
amount_unit: currency-GBP
threshold_unit: year
label: Extended childcare entitlement minimum earnings threshold
reference:
- title: Childcare Payments Act 2014 - c. 28 - section 9 (national minimum wage for 8 hours a week)
href: https://www.legislation.gov.uk/ukpga/2014/28/notes/division/6/3/4
- title: Extended childcare entitlement guidance
href: https://www.gov.uk/check-eligible-free-childcare-if-youre-working?step-by-step-nav=f517cd57-3c18-4bb9-aa8b-1b907e279bf9

brackets:
- threshold:
2015-01-01: 0
amount:
2015-01-01: 1_331
- threshold:
2015-01-01: 18
amount:
2015-01-01: 1_788
- threshold:
2015-01-01: 21
amount:
2015-01-01: 2_379
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
description: The department for education limits extended childcare entitlement eligibility to households where individual adjusted income does not exceed this yearly threshold.
metadata:
unit: currency-GBP
period: year
label: Extended childcare entitlement maximum adjusted income threshold
reference:
- title: The Childcare Payments (Eligibility) Regulations 2015 - Regulation 15
href: https://www.legislation.gov.uk/uksi/2015/448/regulation/15#commentary-key-e27c923eee152accd495af8425536e29
- title: Extended childcare entitlement guidance
href: https://www.gov.uk/check-eligible-free-childcare-if-youre-working?step-by-step-nav=f517cd57-3c18-4bb9-aa8b-1b907e279bf9
values:
2015-01-01: 100_000
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
- name: eligible
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proper names everywhere please

period: 2025
input:
extended_childcare_second_entitlement_age_condition: true
extended_childcare_entitlement_income_eligible: true
extended_childcare_entitlement_work_condition: true
output:
extended_childcare_second_entitlement_eligibility: true

- name: non eligible
period: 2025
input:
extended_childcare_second_entitlement_age_condition: false
extended_childcare_entitlement_income_eligible: true
extended_childcare_entitlement_work_condition: true
output:
extended_childcare_second_entitlement_eligibility: false


- name: non eligible
period: 2025
input:
extended_childcare_first_entitlement_age_condition: false
extended_childcare_entitlement_income_eligible: true
extended_childcare_entitlement_work_condition: true
output:
extended_childcare_first_entitlement_eligibility: false


- name: eligible
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proper names

period: 2025
input:
extended_childcare_first_entitlement_age_condition: true
extended_childcare_entitlement_income_eligible: true
extended_childcare_entitlement_work_condition: true
output:
extended_childcare_first_entitlement_eligibility: true

Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
- name: Under 18 meeting yearly threshold
period: 2025
input:
age: 17
total_income: 5400 # Above £1,331 * 4 = £5,324 yearly threshold
private_pension_income: 0
savings_interest_income: 0
dividend_income: 0
property_income: 0
output:
extended_childcare_entitlement_income_eligible: true

- name: Just turning 18 with yearly threshold
period: 2025
input:
age: 18
total_income: 7200 # Above £1,788 * 4 = £7,152 yearly threshold
private_pension_income: 0
savings_interest_income: 0
dividend_income: 0
property_income: 0
output:
extended_childcare_entitlement_income_eligible: true

- name: Age 20 meeting 18-20 yearly threshold
period: 2025
input:
age: 20
total_income: 22000
private_pension_income: 10
savings_interest_income: 0
dividend_income: 0
property_income: 0
output:
extended_childcare_entitlement_income_eligible: true

- name: Age 21+ meeting higher yearly threshold
period: 2025
input:
age: 25
total_income: 29600 # Above £2,379 * 4 = £9,516 yearly threshold
private_pension_income: 0
savings_interest_income: 0
dividend_income: 0
property_income: 0
output:
extended_childcare_entitlement_income_eligible: true

- name: Below yearly threshold after investment deductions
period: 2025
input:
age: 30
total_income: 12000
private_pension_income: 2000
savings_interest_income: 1000
dividend_income: 500 # Leaving £8,500 yearly < £9,516 threshold
property_income: 0
output:
extended_childcare_entitlement_income_eligible: false


- name: Under 18 below yearly threshold
period: 2025
input:
age: 16
total_income: 5000 # Below £5,324 yearly threshold
private_pension_income: 0
savings_interest_income: 0
dividend_income: 0
property_income: 0
output:
extended_childcare_entitlement_income_eligible: false

- name: Age 18-20 with investment reducing below yearly threshold
period: 2025
input:
age: 19
total_income: 8000
private_pension_income: 0
savings_interest_income: 1000 # Leaving £7,000 < £7,152 yearly threshold
dividend_income: 0
property_income: 0
output:
extended_childcare_entitlement_income_eligible: false

- name: All investment income
period: 2025
input:
age: 25
total_income: 15000
private_pension_income: 5000
savings_interest_income: 4000
dividend_income: 3000
property_income: 3000 # All income is investment = £0 eligible
output:
extended_childcare_entitlement_income_eligible: false

- name: At maximum threshold
period: 2025
input:
age: 35
total_income: 1000000 # At assumed maximum threshold
adjusted_net_income: 1000000
private_pension_income: 0
savings_interest_income: 0
dividend_income: 0
property_income: 0
output:
extended_childcare_entitlement_income_eligible: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
- name: Couple both working - eligible
period: 2025
input:
people:
person:
is_adult: true
in_work: true
incapacity_benefit: 0
spouse:
is_adult: true
in_work: true
incapacity_benefit: 0
benunits:
benunit:
members: [person, spouse]
output:
extended_childcare_entitlement_work_condition: true

- name: Couple neither working - ineligible
period: 2025
input:
people:
person:
is_adult: true
in_work: false
incapacity_benefit: 0
spouse:
is_adult: true
in_work: false
incapacity_benefit: 0
benunits:
benunit:
members: [person, spouse]
output:
extended_childcare_entitlement_work_condition: false

- name: Couple one working one with disability - eligible
period: 2025
input:
people:
person:
is_adult: true
in_work: true
incapacity_benefit: 0
spouse:
is_adult: true
in_work: false
incapacity_benefit: 100
benunits:
benunit:
members: [person, spouse]
output:
extended_childcare_entitlement_work_condition: true

- name: Couple one working without qualifying condition - ineligible
period: 2025
input:
people:
person:
is_adult: true
in_work: true
incapacity_benefit: 0
spouse:
is_adult: true
in_work: false
incapacity_benefit: 0
benunits:
benunit:
members: [person, spouse]
output:
extended_childcare_entitlement_work_condition: false

- name: Single working adult - eligible
period: 2025
input:
people:
person:
is_adult: true
in_work: true
incapacity_benefit: 0
benunits:
benunit:
members: [person]
output:
extended_childcare_entitlement_work_condition: true

- name: Single non-working adult - ineligible
period: 2025
input:
people:
person:
is_adult: true
in_work: false
incapacity_benefit: 0
benunits:
benunit:
members: [person]
output:
extended_childcare_entitlement_work_condition: false

- name: Single working adult with disability - eligible
period: 2025
input:
people:
person:
is_adult: true
in_work: true
incapacity_benefit: 100
benunits:
benunit:
members: [person]
output:
extended_childcare_entitlement_work_condition: true

- name: Single disabled non-working adult - ineligible
period: 2025
input:
people:
person:
is_adult: true
in_work: false
incapacity_benefit: 100
benunits:
benunit:
members: [person]
output:
extended_childcare_entitlement_work_condition: false
Loading