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

Serve economy reports on the v2 routes and save v2 report and simulation IDs

未关闭
#4,107 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

@anth-volk 已经在做这个了。

开始于 2026年10月28日。

  • #4108 来自 @anth-volk —— 未关闭

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
python
领域
api, backend

调研方向

Start with the existing Public API v2 routes for saved reports and simulations, then read the simulation service routes that create, run, and read economy reports and simulations. Trace how country settings are checked before service calls and how saved IDs are validated. Done means the v2 economy report routes support the listed read, submit, list, rerun, and run-history operations, reject household-only countries with a 422 before calling the service, and accept validated v2 IDs for saved records.

由索引模型根据 Issue 内容生成。

描述

The Public API's v2 routes can save a user's reports and simulations, but only as references to v1 records, and there is no v2 route that calculates or reads an economy (society-wide) report. The simulation service is gaining routes that create, run and read economy reports and their simulations in its own database.

This adds /v2/reports for economy reports on top of those routes: submit a report, read it (by ID or by the v1 report number it was migrated from), list chosen reports, run it again on the current catalog version (optionally recalculating both simulations), and list its runs with the versions each used. A report migrated from v1 has no run, so it is calculated the first time it is read.

It also lets saved reports and saved simulations hold the v2 IDs of those records, checked with the simulation service before they are saved, since the tables keep no foreign key to another service's database.

A country whose countries row does not allow society-wide calculations (a household-only country) must be refused with a 422 naming it, before anything is sent to the simulation service.

Nothing in the app calls these routes yet.

主要语言
Python
星标
18
派生
33
平均合并
2 天 7 小时
30 天内合并 PR
64

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

PolicyEngine/policyengine-api 的其他 Issue

查看 PolicyEngine/policyengine-api 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。