Skip to content

Commit 026891c

Browse files
authored
Refactor universal childcare age parameters (#1598)
1 parent 7112285 commit 026891c

6 files changed

Lines changed: 5 additions & 3 deletions

File tree

changelog.d/1055.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Refactored universal childcare entitlement age parameters into an `age` folder.

policyengine_uk/parameters/gov/dfe/universal_childcare_entitlement/max_age.yaml renamed to policyengine_uk/parameters/gov/dfe/universal_childcare_entitlement/age/max.yaml

File renamed without changes.

policyengine_uk/parameters/gov/dfe/universal_childcare_entitlement/min_age.yaml renamed to policyengine_uk/parameters/gov/dfe/universal_childcare_entitlement/age/min.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ metadata:
55
reference:
66
- title: Childcare (Early Years Provision Free of Charge) (Extended Entitlement) Regulations 2016 - Regulation 35(3)
77
href: https://www.legislation.gov.uk/uksi/2016/1257/part/4/made
8+
# Section 7 establishes the free early years provision duty; Regulation 35(3) supplies the third-birthday timing threshold.
89
- title: Childcare Act 2006 - Section 7.1 (Duty to secure free early years provision)
910
href: https://www.legislation.gov.uk/ukpga/2006/21/section/7
1011
values:

policyengine_uk/variables/gov/dfe/universal_childcare_entitlement/is_child_receiving_universal_childcare.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def formula(person, period, parameters):
1515
p = parameters(period).gov.dfe.universal_childcare_entitlement
1616

1717
# Check if age is within eligible range
18-
meets_age_condition = (age >= p.min_age) & (age < p.max_age)
18+
meets_age_condition = (age >= p.age.min) & (age < p.age.max)
1919

2020
# Get the universal childcare entitlement amount
2121
entitlement_amount = person("universal_childcare_entitlement", period)

policyengine_uk/variables/gov/dfe/universal_childcare_entitlement/universal_childcare_entitlement_eligible.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def formula(person, period, parameters):
1717

1818
age = person("age", period)
1919
p = parameters(period).gov.dfe.universal_childcare_entitlement
20-
meets_age_condition = (age >= p.min_age) & (age < p.max_age)
20+
meets_age_condition = (age >= p.age.min) & (age < p.age.max)
2121
not_compulsory_age = ~person("is_of_compulsory_school_age", period)
2222

2323
# Check if person has extended childcare. If so, they are not eligible. Combining extended childcare and universal childcare is not allowed.

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)