Calculate stored households through /v2/household-calculations on the simulation service's household jobs

Abierto
#4,273 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@anth-volk ya está trabajando en esto.

Desde el 10/11/2026.

  • #4274 de @anth-volk — abierto

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python
Área
api

Línea de trabajo

Start by reading the existing /calculate routes, the household_jobs model, and /v2/model-catalog in the Public API, then compare their behavior with the simulation service. Implement the listed submission checks and job read route, and update live staging checks with a parity set. Done when both routes, catalog SPM availability, and the requested checks work as described; pull request #4274 is already open.

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

Descripción

The detailed-save API calculates single households as household jobs in the simulation service, which stores each in the Public API's household_jobs table. The Public API needs routes that v3 and callers without an account can use, to replace /calculate for stored households.

Wanted: POST /v2/household-calculations and GET /v2/household-calculations/{id}.

  • Before calling the simulation service, the submission checks, in order:
    • the country's household_enabled;
    • that the household, and a named policy, are stored in that country (404 otherwise);
    • that the household has a default_year;
    • that the policy sets no parameter the running catalog version no longer has (422 missing_parameters, listing them).
  • Reading returns the job from household_jobs directly, without calling the simulation service.
  • /v2/model-catalog also says whether each catalog version offers SPM settings.
  • Live staging checks include a parity set against the Public API's own calculation.

This replaces #4092, whose migration chain and reads no longer fit master.

Lenguaje dominante
Python
Estrellas
18
Forks
33
Merge medio
2 d 10 h
PR fusionados (30 d)
124

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-api

Todos los issues de PolicyEngine/policyengine-api

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.