Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Calculate a household under several policies in one call on Modal (v2 household functions)

Aperta
#902 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@anth-volk ci sta già lavorando.

Dal 22/10/2026.

  • #903 di @anth-volk — aperta

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
20/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
api, backend

Direzione di ricerca

Start by reading the open pull request #903, which is already working on this issue. The issue describes the v2 household functions, version manifest, release validation, and image checks, but does not name specific files or tests. Done means both country functions, manifest and validation changes, and the pre-merge image check meet the listed behavior.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

What

Add Modal functions that calculate one household under several policies in one call, for the US and the UK, in the versioned v2 Modal application:

  • A versioned household contract: a household in the Public API's situation shape, with optional axes; one to ten policies per request, so a baseline and its reform are calculated together; a schema version; the PolicyEngine.py bundle the caller expects; an optional SPM selection; and an option to add every missing variable, as the Public API's /calculate-full route does. The result carries each policy's calculated household, warnings and SPM receipt, the applied SPM selection and the bundle provenance, or a typed failure.
  • calculate_household_us and calculate_household_uk, which reproduce the Public API's household calculation (input preparation, unrecognized-input errors and their order, deprecated-input warnings, value formatting, SPM handling) and run in their own image with no datasets and no secrets, sized for large households with axes.
  • Schema version 2 of the v2 version manifest, which records for each country whether it can run economy reports and which function calculates its households. The comparison adapter gives the report coordinator only countries marked economy-capable.
  • Release validation that calls each household function with a small household before the manifest names it.
  • The pre-merge image check builds every v2 image (report coordinator, country workers, household functions) and imports their entry points.

Why

Household calculations run inside the Public API's web process today. Moving them to Modal lets the Simulation Entrypoint calculate and store households the same way it handles economy reports, and computes a baseline and its reform in a single call. Nothing calls these functions yet: they are deployed but unused until the Simulation Entrypoint gains household routes.

Lingua principale
Python
Stelle
1
Fork
1
Merge medio
1g 18h
PR unite (30g)
59

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PolicyEngine/policyengine-sim-api

Tutte le issue di PolicyEngine/policyengine-sim-api

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.