Add simulation and report definitions to the simulation schema

未關閉
#899 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

@anth-volk 已經在處理了。

開始於 2026年10月22日。

  • #900 來自 @anth-volk —— 未關閉

評估

難度
4/5
預估耗時
3-5 天
新手友好度
25/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
python

研究方向

Start by reading the Simulation Entrypoint's simulation schema and the Public API table definitions it references. Define the simulations and reports tables with the described foreign keys and legacy ID columns; check the schema or migration entry point to confirm both tables are created empty and can support a repeatable later migration.

由索引模型根據 Issue 內容生成。

描述

The Simulation Entrypoint's simulation schema needs the definitions that later runs and results attach to:

  • simulation.simulations: what to run, independent of model versions. A simulation is one policy (null for current law) applied to one population, either a household or an economy named by a region code such as state/ca with an optional dataset name (null means the region's default dataset in whichever catalog version a run uses), with an optional dynamic.
  • simulation.reports: which two simulations a report compares (an economy report needs a reform; a household report may have only a baseline), both of the report's own country and kind, with its year and options.

Both reference the Public API's policies, households and dynamics in the same database with foreign keys (composite with the country where the Public API table has one), all ON DELETE RESTRICT. Simulations and reports migrated from the Public API's v1 database keep their v1 IDs in unique legacy_simulation_id and legacy_report_id columns, so a later one-time migration can be run again safely.

Once deployed, both tables exist with no rows; nothing writes them until the stage 2 routes.

主要語言
Python
星號
1
分支
1
平均合併
1 天 15 小時
30 天內合併 PR
78

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

PolicyEngine/policyengine-sim-api 的其他 Issue

查看 PolicyEngine/policyengine-sim-api 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。