Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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 天 16 小时
30 天内合并 PR
61

环境准备

从这里开始

  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 摘要。