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

Abierto Apto para principiantes
#10,785 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

@MaxGhenis ya está trabajando en esto.

Desde el 12/11/2026.

  • #10819 de @MaxGhenis — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
78/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python

Línea de trabajo

Empieza por ne_school_readiness_credit.py, la entrada de calificación y la tabla de importes reembolsables; el issue identifica la consulta que falla para el nivel 0. Lee las pruebas de referencia existentes en ne_school_readiness_credit.yaml y añade casos de hogares con una persona trabajadora y un hijo o cónyuge. El trabajo estará terminado cuando esas simulaciones calculen el crédito, ne_income_tax y household_net_income sin el error de parámetro ausente, y los importes existentes por nivel sigan pasando.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

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.
Lenguaje dominante
Python
Estrellas
171
Forks
220
Merge medio
4 d 15 h
PR fusionados (30 d)
283

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de PolicyEngine/policyengine-us

Todos los issues de PolicyEngine/policyengine-us

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.