Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Serve economy reports on the v2 routes and save v2 report and simulation IDs

Aberta
#4,107 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 2 dias

@anth-volk já está trabalhando nisso.

Desde 28/10/2026.

  • #4108 de @anth-volk — aberto

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
35/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
python
Domínio
api, backend

Direção de pesquisa

Start with the existing Public API v2 routes for saved reports and simulations, then read the simulation service routes that create, run, and read economy reports and simulations. Trace how country settings are checked before service calls and how saved IDs are validated. Done means the v2 economy report routes support the listed read, submit, list, rerun, and run-history operations, reject household-only countries with a 422 before calling the service, and accept validated v2 IDs for saved records.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

The Public API's v2 routes can save a user's reports and simulations, but only as references to v1 records, and there is no v2 route that calculates or reads an economy (society-wide) report. The simulation service is gaining routes that create, run and read economy reports and their simulations in its own database.

This adds /v2/reports for economy reports on top of those routes: submit a report, read it (by ID or by the v1 report number it was migrated from), list chosen reports, run it again on the current catalog version (optionally recalculating both simulations), and list its runs with the versions each used. A report migrated from v1 has no run, so it is calculated the first time it is read.

It also lets saved reports and saved simulations hold the v2 IDs of those records, checked with the simulation service before they are saved, since the tables keep no foreign key to another service's database.

A country whose countries row does not allow society-wide calculations (a household-only country) must be refused with a 422 naming it, before anything is sent to the simulation service.

Nothing in the app calls these routes yet.

Linguagem predominante
Python
Estrelas
18
Forks
33
Merge médio
2d 7h
PRs com merge (30d)
64

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de PolicyEngine/policyengine-api

Todas as issues de PolicyEngine/policyengine-api

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.