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

Offen
#4,273 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@anth-volk arbeitet bereits daran.

Seit 10.11.2026.

  • #4274 von @anth-volk — offen

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
python
Bereich
api

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
Python
Sterne
18
Forks
33
Ø Merge
2 T. 10 Std.
Gemergte PRs (30 T.)
124

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus PolicyEngine/policyengine-api

Alle Issues in PolicyEngine/policyengine-api

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.