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
Los mantenedores suelen responder en 2 días
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
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
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.
- Lenguaje dominante
- Python
- Estrellas
- 171
- Forks
- 220
- Merge medio
- 4 d 15 h
- PR fusionados (30 d)
- 283
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de PolicyEngine/policyengine-us
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
PolicyEngine/policyengine-us#10894 ·
Los mantenedores suelen responder en 2 días
-
The model denies Medicaid to expansion-group adults in Virginia, Maine, Idaho and Utah in 2019 or 2020, when those states covered themPosiblemente ocupada @MaxGhenis la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
PolicyEngine/policyengine-us#10791 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
PolicyEngine/policyengine-us#10652 ·
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
PolicyEngine/policyengine-us#10552 ·
Los mantenedores suelen responder en 2 días
-
South Carolina OSS: require SSI's citizen or qualified-noncitizen test (S.C. Code Regs. 126-920)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
PolicyEngine/policyengine-us#10545 ·
Los mantenedores suelen responder en 2 días
Todos los issues de PolicyEngine/policyengine-us
Issues similares
-
Contributing instructionsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
dbt-labs/spark-utils#51 ·
-
bug pydanty:is-working
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
pydantic/pydantic-ai#13444 ·
Los mantenedores suelen responder en 1 día
-
good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
good first issue help wanted
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
-
changelog investigate
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
ramnes/notion-sdk-py#502 ·