Skip to content

Calculate stored households through /v2/household-calculations on the simulation service's household jobs #4273

Closed

Description

@anth-volk

The detailed-save API calculates single households as household jobs in the simulation service, which stores each in the Public API's household_jobs table. The Public API needs routes that v3 and callers without an account can use, to replace /calculate for stored households.

Wanted: POST /v2/household-calculations and GET /v2/household-calculations/{id}.

  • Before calling the simulation service, the submission checks, in order:
    • the country's household_enabled;
    • that the household, and a named policy, are stored in that country (404 otherwise);
    • that the household has a default_year;
    • that the policy sets no parameter the running catalog version no longer has (422 missing_parameters, listing them).
  • Reading returns the job from household_jobs directly, without calling the simulation service.
  • /v2/model-catalog also says whether each catalog version offers SPM settings.
  • Live staging checks include a parity set against the Public API's own calculation.

This replaces #4092, whose migration chain and reads no longer fit master.

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