Skip to content

Take household report variables and serve extra calculations of household report runs at API v2's /v2/reports #4403

Backlog

Description

@anth-volk

App v3's Household tab on the detailed-save API needs API v2's report routes to calculate only the variables a household report's default view lists, and to calculate more variables (or an earnings variation) of a run later, with identical requests sharing one stored calculation. The tables for both come from #4395; the simulation service's routes come from PolicyEngine/policyengine-sim-api#1202.

In API v1's /v2/ routes:

  • POST /v2/reports (household reports) and POST /v2/reports/{report_id}/runs take an optional variables list, checked against the running catalog version and sent to the simulation service; null or omitted keeps today's behaviour (every variable).
  • Report reads show the variables each side's simulation run calculates (calculated_variables).
  • POST /v2/reports/{report_id}/runs/{run_id}/household-calculations asks the simulation service to find or create each side's extra calculation, and GET /v2/household-run-calculations/{id} reads one.
  • The migration contract files list the new routes, and the policyengine-api-simulation-client pin moves to the release that has the new operation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions