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

Serve the v2 parameter tree one level at a time from a tree written with each catalog version

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

维护者通常 2 天内回复

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

开始于 2026年10月26日。

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

评估

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

调研方向

Start by reading the v2 /parameters/children route and the catalog version publishing path; the issue does not name their files or tests. Trace how parameter nodes and bracket schedules are represented, then identify where catalog rows are written and read. Done means an indexed read serves one ordered level, bracket schedules appear as nodes with labelled brackets, and reform filtering and child counts match the requested rules.

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

描述

The app's newer workspace (v3) is moving from the Public API's /{country}/metadata to the v2 metadata routes, and it browses its parameter tree one level at a time through /v2/parameters/children. That route cannot serve it today:

  • It is slow. It finds a level's children by scanning every parameter and node name under the path on each request. Measured in production on 2026-10-21, a level takes 2.7–6.1 s.
  • Bracket schedules are wrong. Brackets such as gov.hmrc.income_tax.rates.uk[0] are listed beside their parent's real groups, under their raw names. The schedule itself (uk) is missing, or is listed with no children.
  • It cannot show only what a reform can change. v3's tree keeps only parameters whose economy or household flag is set, and leaves out taxsim and gov.abolitions. The route has no way to apply those rules.

What should change

  • Publishing a catalog version writes each node's direct children, in order, to a table. Each row holds the child's label, its child counts, and whether a reform can change it.
  • A bracket schedule is one node whose children are its brackets, labelled "Bracket 1", "Bracket 2" and so on.
  • The route reads one level with one indexed read. On request, it lists only what a reform can change, sorted by label, with child counts to match.

Paths, parameter IDs and values stay the same. v3 does not use the route until it moves to the v2 routes.

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

环境准备

从这里开始

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

PolicyEngine/policyengine-api 的其他 Issue

查看 PolicyEngine/policyengine-api 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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