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

Targeted childcare entitlement #1013

Draft
wants to merge 47 commits into
base: master
Choose a base branch
from

Conversation

vahid-ahmadi
Copy link
Collaborator

@vahid-ahmadi vahid-ahmadi commented Jan 24, 2025

Overview

This PR implements the 15-hour targeted childcare entitlement in PolicyEngine UK. The scheme provides government-funded childcare for eligible 2-year-olds in England whose families meet certain criteria. (Documentation link)

Note

It applies to England only. Different programs operate in Scotland, Wales, and Northern Ireland.

Key Features

  • Output type: yearly hours (0 or 570) for each child

Fixes #1014

Depends on #1004

@MaxGhenis MaxGhenis marked this pull request as draft January 24, 2025 18:21

# Get tax credits receipt specifically for income test
receives_child_tax_credit = benunit("child_tax_credit", period) > 0
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
receives_child_tax_credit = benunit("child_tax_credit", period) > 0
ctc_wtc = add(benunit, period, ["child_tax_credit", "working_tax_credit"])
receives_ctc_wtc = ctc_wtc > 0

)
# Get eligibility status for targeted entitlement
targeted_eligible = benunit(
"targeted_childcare_entitlement_combine_benefits", # Changed this line
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
"targeted_childcare_entitlement_combine_benefits", # Changed this line
"targeted_childcare_entitlement_combine_benefits",

reference:
- title: The Local Authority (Duty to Secure Early Years Provision Free of Charge) Regulations 2014 - regulation 3
href: https://www.legislation.gov.uk/uksi/2014/2147/regulation/3/made
- title: Document for 15 hours free education and childcare for 2-year old
Copy link
Collaborator

Choose a reason for hiding this comment

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

title should always be as close as possible to just the official title, like you have above. GOV.UK | Claim benefits for free childcare etc

output:
targeted_childcare_entitlement_eligibility: false

- name: ineligible child age 4
Copy link
Collaborator

Choose a reason for hiding this comment

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

Capitalise etc

class targeted_childcare_entitlement_combine_benefits(Variable):
value_type = bool
entity = BenUnit
label = "Eligible for Targeted childcare entitlement based on benefits"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Grammar

from policyengine_uk.model_api import *


class targeted_childcare_entitlement_combine_benefits(Variable):
Copy link
Collaborator

Choose a reason for hiding this comment

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

A rule of thumb to exercise here is 'if I take out underscores and replace with spaces', this should fit natural into "I'm going to calculate this household's {variable name}".

This one doesn't

class targeted_childcare_entitlement_eligibility(Variable):
value_type = bool
entity = BenUnit
label = "targeted childcare entitlement eligibility"
Copy link
Collaborator

Choose a reason for hiding this comment

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

No notes on this file- clean, follows style rules, well documented!

Copy link

sonarqubecloud bot commented Feb 7, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add targeted childcare entitlement
3 participants