Nebraska's school readiness credit raises an error for an eligible child care worker who lives with a child or an adult without a level, where Nebraska bases the credit on the worker's own level
Maintainers usually reply within 2 days
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start with ne_school_readiness_credit.py, the rating input, and the refundable amount table; the issue identifies the lookup that fails for level 0. Read the existing baseline tests in ne_school_readiness_credit.yaml and add household cases with a worker and a child or spouse. Done when those simulations calculate the credit, ne_income_tax, and household_net_income without the missing parameter error, while existing level amounts still pass.
Written by the indexing model from the issue text.
Description
ne_school_readiness_credit raises ParameterNotFoundError when an eligible child care worker shares a simulation with any person whose ne_school_readiness_credit_child_care_worker_rating equals 0, the input's default. The worker's own child or spouse meets that condition. The model lists the credit among Nebraska's refundable credits from 2024, so ne_income_tax and household_net_income raise for that household too.
For example, for a Nebraska child care worker at level 3 who lives alone, ne_school_readiness_credit returns $2,900 for 2026. Add a 3-year-old child to the household, and the credit, ne_income_tax and household_net_income each raise ParameterNotFoundError for gov.states.ne.tax.income.credits.school_readiness.amount.refundable.0.
The formula raises only when someone in the simulation has ne_school_readiness_credit_eligible_worker set to true. That input defaults to false, and the model computes a household that leaves it there.
What Nebraska's law says
Under Neb. Rev. Stat. 77-3605(1), "The amount of the credit shall be based on the eligible staff member's classification". Nebraska sets the amount by the worker's own level, whoever else lives in the household.
The code
ne_school_readiness_creditlooks up the amount at every person's level. Itsdefined_forkeeps the result to eligible workers. Once one person passes it, though, policyengine-core runs the formula over everyone and applies the mask afterwards.- The level input has no formula and defaults to 0, and the amount table holds levels 1 to 5.
- Nebraska's refundable credit list names the credit from 2024.
ne_refundable_creditsadds that list, andne_income_taxsubtracts it. - The credit's three tests each hold one person.
Reproduction
This script runs the worker alone and then with a child, at commit 3f6e604b14798e0971ad2cd510bb5fa1698a8e0b:
from policyengine_us import Simulation
YEAR = 2026
GROUPS = ["households", "tax_units", "spm_units", "families"]
worker = {
"age": 30,
"ne_school_readiness_credit_eligible_worker": True,
"ne_school_readiness_credit_child_care_worker_rating": 3,
}
child = {"age": 3}
def simulate(people):
names = list(people)
situation = {
"people": {
name: {k: {YEAR: v} for k, v in person.items()}
for name, person in people.items()
},
"marital_units": {f"{name}_unit": {"members": [name]} for name in names},
**{group: {"unit": {"members": names}} for group in GROUPS},
}
situation["households"]["unit"]["state_code"] = {YEAR: "NE"}
return Simulation(situation=situation)
for label, people in [
("worker alone:", {"worker": worker}),
("worker and child:", {"worker": worker, "child": child}),
]:
for variable in [
"ne_school_readiness_credit",
"ne_income_tax",
"household_net_income",
]:
try:
print(label, variable, simulate(people).calculate(variable, YEAR))
except Exception as error:
print(label, variable, type(error).__name__, error)
It prints:
worker alone: ne_school_readiness_credit [2900.]
worker alone: ne_income_tax [-2900.]
worker alone: household_net_income [2900.]
worker and child: ne_school_readiness_credit ParameterNotFoundError The parameter 'gov.states.ne.tax.income.credits.school_readiness.amount.refundable.0' was not found in the 2026-01-01 tax and benefit system.
worker and child: ne_income_tax ParameterNotFoundError The parameter 'gov.states.ne.tax.income.credits.school_readiness.amount.refundable.0' was not found in the 2026-01-01 tax and benefit system.
worker and child: household_net_income ParameterNotFoundError The parameter 'gov.states.ne.tax.income.credits.school_readiness.amount.refundable.0' was not found in the 2026-01-01 tax and benefit system.
We ran it with policyengine-core 3.33.2. Main's lock file pins 3.34.2, the version the two core links point at, and both versions order the mask and the formula the same way.
In further runs, the formula raises the same error for a worker with a spouse, and for a worker with a child in 2024 and 2025. It returns [2900. 3500.] for two workers at levels 3 and 5. It also raises for a worker who lives alone with ne_school_readiness_credit_eligible_worker set and no level.
Fix
Clip the level into the table's range before the lookup and return 0 for a level below 1; defined_for still keeps the credit to eligible workers. With that change applied as a reform, ne_school_readiness_credit returns [2900. 0.] for the worker and child above, and ne_income_tax and household_net_income compute.
Related
- #4788 requested the credit, and #5820 added it.
- Dominant language
- Python
- Stars
- 171
- Forks
- 220
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 283
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PolicyEngine/policyengine-us
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
PolicyEngine/policyengine-us#10894 ·
Maintainers usually reply within 2 days
-
The model denies Medicaid to expansion-group adults in Virginia, Maine, Idaho and Utah in 2019 or 2020, when those states covered themPossibly taken @MaxGhenis claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
PolicyEngine/policyengine-us#10791 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
PolicyEngine/policyengine-us#10652 ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
PolicyEngine/policyengine-us#10552 ·
Maintainers usually reply within 2 days
-
South Carolina OSS: require SSI's citizen or qualified-noncitizen test (S.C. Code Regs. 126-920)Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PolicyEngine/policyengine-us#10545 ·
Maintainers usually reply within 2 days
All issues in PolicyEngine/policyengine-us
Similar issues
-
fleet size/m
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sipyourdrink-ltd/bernstein#7548 ·
Maintainers usually reply within 1 day
-
good first issue help wanted level 1 wocs
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
GianlucaBave/murmury#73 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
G-nn-r/lg_heatpump#52 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
agno-agi/agno#11657 · 1 comment ·
Maintainers usually reply within 1 day
-
category:codebase:gpi category:codebase:handle type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day