_normalise_period_key drops the stop date of start.stop reform keys
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 68/100
Línea de trabajo
Start at _normalise_period_key and _normalise_policy in projects/policyengine-simulation-executor/src/policyengine_simulation_executor/simulation_runtime.py, then trace how the normalised key flows into policyengine.core.Simulation(policy=...). Read compile_reform_to_policy in tax_benefit_models/common/reform.py and reform_dict_from_parameter_values in utils/parametric_reforms.py to see where end_date is dropped. Done when a bounded key like 2026-01-01.2026-12-31 stops applying after its stop date in a multi-year budget run; note the author has not executed this, so first reproduce with a small two-year simulation.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
_normalise_period_key (projects/policyengine-simulation-executor/src/policyengine_simulation_executor/simulation_runtime.py) reduces a start.stop period key to its start date:
def _normalise_period_key(period_key: Any) -> str:
"""Convert legacy ``start.stop`` period keys to v4 effective dates."""
text = str(period_key)
parts = text.split(".")
if len(parts) > 1 and len(parts[0]) == 10:
return parts[0]
return text
_normalise_policy applies it to both the baseline and the reform policy before they reach policyengine.core.Simulation(policy=...). In policyengine.py main:
compile_reform_to_policyturns each{path: {date: value}}entry into aParameterValuewithend_date=None(tax_benefit_models/common/reform.py);reform_dict_from_parameter_values(utils/parametric_reforms.py) runs such an open-ended value until the day before the next value of the same parameter starts, or to 2100-12-31.
So the stop date of a bounded app value never reaches the simulation. For example, {"2026-01-01.2026-12-31": 0.05} stays in force after 2026, until the next start date the policy gives that parameter, or to 2100. In a budget window, later years then use the reform value instead of the baseline.
This comes from reading sim-api main and policyengine.py main on 2026-10-06; I have not run it. The release bundle sim-api pins may resolve an older policyengine.py. Found while reviewing PolicyEngine/policyengine-us#9628.
- Lenguaje dominante
- Python
- Estrellas
- 1
- Forks
- 1
- Merge medio
- 1 d 7 h
- PR fusionados (30 d)
- 24
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-sim-api
-
Integration tests fail due to missing UV virtual environment setupPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
PolicyEngine/policyengine-sim-api#314 ·
Los mantenedores suelen responder en 1 día
-
Update policyengine to 6.2.3Posiblemente ocupada @policyengine la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 15/100
PolicyEngine/policyengine-sim-api#734 ·
Los mantenedores suelen responder en 1 día
-
Upgrade simulation workers to the forthcoming UK region-filter fixPosiblemente ocupada @anth-volk la tomó hoy. Abierto
Dificultad 3/5 1-3 horas Aptitud para principiantes 15/100
PolicyEngine/policyengine-sim-api#732 ·
Los mantenedores suelen responder en 1 día
-
Update policyengine to 6.2.2Posiblemente ocupada @policyengine la tomó hace 1 día. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 20/100
PolicyEngine/policyengine-sim-api#730 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
PolicyEngine/policyengine-sim-api#729 ·
Los mantenedores suelen responder en 1 día
Todos los issues de PolicyEngine/policyengine-sim-api
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
NVIDIA/earth2studio#1241 ·
Los mantenedores suelen responder en 3 días
-
docs(types): update the collection binding note now that typed collections shipped in pycubrid 1.9.0Abiertodocumentation priority: low size: S
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
cubrid-lab/sqlalchemy-cubrid#768 ·
Los mantenedores suelen responder en 1 día
-
--csv-bom was never wired up: PR #850 added an unused helper parameter, so #846 is not fixedAbiertobug help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Broken link in index.rstAbiertodocumentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 65/100
ansys/pydpf-core#3547 ·
Los mantenedores suelen responder en 1 día
-
good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
OktoLabsAI/okto-pulse#114 ·
Los mantenedores suelen responder en 1 día