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

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

Mantenedores costumam responder em até 1 dia

@anth-volk já está trabalhando nisso.

Desde 10/11/2026.

  • #4274 de @anth-volk — aberto

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
35/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Stack de tecnologia
python
Domínio
api

Direção de pesquisa

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.

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

Descrição

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.

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

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.