Model version publishes the new UK firm entity as a person
维护者通常 1 天内回复
评估
调研方向
从 src/policyengine/tax_benefit_models/common/model_version.py 中的 _populate_entities 开始,目前每个没有成员的根 population 都被标记为 is_person。阅读 policyengine-core 的 person_entity 规则,了解它如何选择单个 person 实体,然后更改发布步骤,只标记该实体,并按 key 进行比较,以便克隆系统仍然匹配。用 tests/test_model_entities.py 验证(它应该为 UK 找到恰好一个 is_person 实体,是 person,而不是 firm);data/v2/catalog/extraction.py 中的下游目录检查正是这件事重要的原因。
由索引模型根据 Issue 内容生成。
描述
policyengine-core flags any root population with no members as is_person. policyengine-uk's new firm entity (PolicyEngine/policyengine-uk#2940) is one, so _populate_entities in src/policyengine/tax_benefit_models/common/model_version.py would publish two person entities for UK: person and firm.
Effects once a policyengine-uk release with firm is certified against this package:
tests/test_model_entities.pyfails, which blocks UK release certification.- The policyengine-api v2 catalog check for "exactly one person entity" (
data/v2/catalog/extraction.py) fails. - app-v2 would offer firm inputs as person variables.
Proposed fix: publish is_person only for the system's person entity (the first core entity flagged is_person, matching core's person_entity rule), compared by key so cloned systems still work.
🤖 Generated with Claude Code
- 主要语言
- Python
- 星标
- 8
- 派生
- 10
- 平均合并
- 1 天 22 小时
- 30 天内合并 PR
- 17
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
PolicyEngine/policyengine.py 的其他 Issue
-
Raise the simulation cache memory warning to 16 GiB可能已有人在做 @anth-volk 于 53 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
PolicyEngine/policyengine.py#549 ·
维护者通常 1 天内回复
-
README population quickstart still teaches enhanced_frs_2023_24可能已有人在做 @vahid-ahmadi 于 31 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
PolicyEngine/policyengine.py#473 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
PolicyEngine/policyengine.py#436 · 1 条评论 ·
维护者通常 1 天内回复
-
Certify populace-uk as the UK certified default可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
PolicyEngine/policyengine.py#408 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 42/100
PolicyEngine/policyengine.py#762 ·
维护者通常 1 天内回复
查看 PolicyEngine/policyengine.py 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
software-mansion-labs/Diplomat#20 ·
维护者通常 1 天内回复
-
[Windows] Hidden title bar: a maximized window restored from minimized on a secondary monitor gets the primary monitor's work area as its client area可能已有人在做 @lijy91 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 67/100
libnativeapi/nativeapi#53 · 1 个 reaction ·
维护者通常 1 天内回复
-
View Counts discarded due to field name mismatch可能已有人在做 @rsiva0400 今天认领。 未关闭site-bug triage
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
spcl/HPCAgent-Bench#264 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100