Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Serve household reports at /v2/reports

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

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

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

Línea de trabajo

Start by tracing the existing economy report routes and simulation service flow for POST /v2/reports, report reads, reruns, and saved reports. Then follow the household and policy validation paths described in the issue, including country checks and default-year handling. Done means household reports can be created, read, rerun, and saved by ID, including for household-only countries, while the specified invalid requests are rejected.

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

Descripción

What

Add the household kind of /v2/reports. A household report calculates a household stored through /v2/households under a baseline policy and an optional reform policy, each a stored /v2/policies policy or current law, for the household's default year. The simulation service calculates and stores it, as it does economy reports.

  • POST /v2/reports accepts kind: "household" with the household and the policies.
  • GET /v2/reports/{report_id} and GET /v2/reports?report_id=… read household reports beside economy reports.
  • POST /v2/reports/{report_id}/runs runs a household report again, with force to recalculate.
  • Saved reports (/v2/user-reports) accept household report IDs.

It works for any country whose countries row has household_enabled, including a household-only country, where economy reports are refused with 422.

Why

The newer app interface needs persisted, shareable household reports with their own IDs once it moves to the v2 routes, and the economy kind of /v2/reports cannot hold a household. Before asking the simulation service, the Public API checks what it decides itself: that the country has household calculations, that the household and policies are the country's, and that the household has a default year. The simulation service reads the household and policies from the Public API's tables itself, so the Public API sends only their IDs.

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

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.