Skip to content

/v2/household-calculations and household reports take a dynamic #4342

Done

Description

@anth-volk

A dynamic is a stored set of model assumptions (every parameter under gov.simulation, plus the US top-level simulation.*), created through /v2/dynamics. Economy simulations, economy reports and budget windows already take a dynamic_id per side, and API v1 checks each one: 404 when the request's country doesn't store it, and 422 missing_parameters for parameters the running catalog version lacks. Household calculations and household reports take none yet, so a household calculated on the detailed-save routes can't apply model assumptions that API v1's older routes apply today from a policy.

Needed:

  • /v2/household-calculations and each household report side on /v2/reports accept an optional dynamic_id, checked exactly as the economy path checks one, through the same dynamic source.
  • API v1 sends a named dynamic to the simulation service, which applies it (Household calculations and reports apply a dynamic, and every simulation refuses another country's dynamic policyengine-sim-api#1113), and leaves a null one out of the request body.
  • The simulation service's refusals of a dynamic (400 unknown_dynamic, and 422s located at dynamic_id) answer as the economy path's do.
  • Household report re-runs keep each side's stored dynamic, and household calculation responses give the dynamic_id they apply.

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