Skip to content

Record household report runs' variables and run extra calculations of a run #1200

In progress

Description

@anth-volk

API v2's household reports need two things from the simulation service, on the tables API v1 adds in PolicyEngine/policyengine-api#4396:

  • The variables each run calculates. A household report's create (POST /reports) and re-run (POST /reports/{report_id}/runs) should take an optional variables list, record it in household_run_variables for each simulation run the request creates, and have the household function calculate each side with its run's recorded list (every variable without one).
  • Extra calculations of a run. API v1 needs other variables of a household report run, or its household across axes, under the run's household, policy, dynamic, year and versions, without re-running the report. The service should find or start such a calculation per simulation run (household_run_calculations), with identical requests sharing one, the household function recording the result, and the stuck-run sweep covering it. Only a run on the current versions that hasn't failed gets one.

policyengine-api-simulation-client should gain the new route and fields.

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