Remove the unused economy comparison module
维护者通常 2 天内回复
评估
调研方向
Start with policyengine_api/services/economy_comparison.py and grep the repo for imports of it, then review its unit and snapshot tests and the snapshot data. Check the api.routes.no-domain-logic-in-http rule so only the economy comparison node is dropped. Done means the module, its tests and snapshots are gone and the test suite still passes. Pull request #3936 is already open against this issue, so review it rather than starting a parallel change.
由索引模型根据 Issue 内容生成。
描述
Problem
policyengine_api/services/economy_comparison.py (915 lines) has had no caller in the package since #2569, which removed the Public API's own society-wide simulations. Only its own unit and snapshot tests use it: about 1,600 lines of tests, plus an 8,000-line snapshot file.
It still carries code that other work has to account for:
- The enhanced FRS weight matrix.
uk_constituency_breakdownanduk_local_authority_breakdowndownload it from Hugging Face. PolicyEngine/policyengine.py#553 lists that as a Public API dependency to resolve before the UK default moves to a Microcosm dataset. - The only microdf use in the package. The weighted-microdata rules (step 1.9) would otherwise guard and baseline code that never runs.
- Rules for dead code. A route-boundary rule (
api.routes.no-domain-logic-in-http) checks that the module stays out of the HTTP layer.
Proposal
Remove the module, its unit and snapshot tests, and the snapshot data.
api.routes.no-domain-logic-in-httpkeeps its calculation-route check and drops the economy comparison node.microdf_pythonstays declared. Removing a dependency nothing imports is a separate cleanup, which the dependency check planned for step 2.7 would flag.
- 主要语言
- Python
- 星标
- 18
- 派生
- 33
- 平均合并
- 1 天 18 小时
- 30 天内合并 PR
- 23
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
PolicyEngine/policyengine-api 的其他 Issue
-
难度 1/5 1-3 小时 新手友好度 88/100
PolicyEngine/policyengine-api#3911 ·
维护者通常 2 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
PolicyEngine/policyengine-api#3910 ·
维护者通常 2 天内回复
-
Register weighted-microdata rules: weights aren't values可能已有人在做 @anth-volk 今天认领。 未关闭
难度 4/5 3-5 天 新手友好度 18/100
PolicyEngine/policyengine-api#3937 ·
维护者通常 2 天内回复
-
Refactor tests, scripts and the rules tool, then select every ruff rule (ALL)可能已有人在做 @anth-volk 今天认领。 未关闭
难度 5/5 一周以上 新手友好度 15/100
PolicyEngine/policyengine-api#3931 ·
维护者通常 2 天内回复
-
Refactor the application package within ruff's complexity limits可能已有人在做 @anth-volk 今天认领。 未关闭
难度 4/5 一周以上 新手友好度 18/100
PolicyEngine/policyengine-api#3930 ·
维护者通常 2 天内回复
查看 PolicyEngine/policyengine-api 的全部 Issue
相似的 Issue
-
md/asciidoc/csv: an explicit `encoding="utf-8"` keeps a leading BOM, the auto-detect path drops it未关闭
难度 2/5 1-3 小时 新手友好度 82/100
docling-project/docling#4846 ·
维护者通常 1 天内回复
-
area/sessions comp/dashboard comp/desktop comp/gateway comp/tui duplicate P2 sweeper:risk-session-state type/bug
难度 2/5 1-3 小时 新手友好度 78/100
NousResearch/hermes-agent#138914 · 1 条评论 ·
维护者通常 1 天内回复
-
bot-triaged module: activation checkpointing module: inductor oncall: pt2 triaged
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
[oblt-aw][autodoc] Update PR Actions Detective E2E prerequisites and fix dashboard-format table typo未关闭documentation
难度 2/5 1-3 小时 新手友好度 75/100
elastic/oblt-aw#2382 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复