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
- 平均合併
- 2 天 9 小時
- 30 天內合併 PR
- 77
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
PolicyEngine/policyengine-api 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 76/100
PolicyEngine/policyengine-api#4037 ·
維護者通常 2 天內回覆
-
難度 1/5 1-3 小時 新手友好度 88/100
PolicyEngine/policyengine-api#3911 ·
維護者通常 2 天內回覆
-
難度 1/5 1 小時以內 新手友好度 82/100
PolicyEngine/policyengine-api#3910 ·
維護者通常 2 天內回覆
-
service: policyengine-stage12-us-worker telemetry-error
難度 3/5 1-2 天 新手友好度 15/100
PolicyEngine/policyengine-api#4154 ·
維護者通常 2 天內回覆
-
service: policyengine-simulation-py telemetry-error
難度 3/5 半天 新手友好度 18/100
PolicyEngine/policyengine-api#4153 ·
維護者通常 2 天內回覆
查看 PolicyEngine/policyengine-api 的全部 Issue
相似的 Issue
-
Import errors are swallowed: PerthImplicitWatermarker silently becomes None可能已有人在做 @JonRC 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 82/100
resemble-ai/Perth#23 ·
-
correction metadata
難度 2/5 1 小時以內 新手友好度 65/100
acl-org/acl-anthology#10753 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 62/100
earthtojake/text-to-cad#758 ·
維護者通常 1 天內回覆
-
難度 1/5 1-3 小時 新手友好度 70/100
DataTalksClub/faq#545 ·
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 62/100
維護者通常 1 天內回覆