You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Household calculations accept a list of variables to calculate #4382
API v1's POST /v2/household-calculations has no way to ask for only some variables: a caller either sets add_missing_variables: true, which adds and calculates every variable the household lacks, or gets only the values the household leaves empty. App v3's Household tab reads about 330 variables, and calculating every variable made one household calculation take 100–154 seconds where the listed variables take 4–20 seconds in local measurements.
POST /v2/household-calculations accepts variables, an optional list of at most 10,000 distinct variable names of 1 to 255 characters, for a stored household and for one given in the request.
API v1 checks each name against its running catalog version (the catalog of the .py version it runs, as policy parameters are checked) and refuses unknown names with a 422 naming them, before anything is sent. Nothing is checked when that version has no published catalog for the country.
A list given with add_missing_variables: true is refused with a 422.
The list is sent to the simulation service only when given, so a request without it is sent exactly as today.
Activity