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

オープン
#4,273 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@anth-volk がすでに取り組んでいます。

2026年11月10日 から。

  • #4274 @anth-volk による — オープン

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
api

調査の方向性

Start by reading the existing /calculate routes, the household_jobs model, and /v2/model-catalog in the Public API, then compare their behavior with the simulation service. Implement the listed submission checks and job read route, and update live staging checks with a parity set. Done when both routes, catalog SPM availability, and the requested checks work as described; pull request #4274 is already open.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Python
スター
18
フォーク
33
平均マージ
2日 10時間
マージ済み PR(30日)
124

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

PolicyEngine/policyengine-api のほかの issue

PolicyEngine/policyengine-api の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。