Model version publishes the new UK firm entity as a person

オープン 初心者向け
#764 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@vahid-ahmadi がすでに取り組んでいます。

2026年11月23日 から。

  • #765 @vahid-ahmadi による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
data

調査の方向性

src/policyengine/tax_benefit_models/common/model_version.py の _populate_entities から始めます。ここでは、メンバーを持たない各ルート集団が現在 is_person としてフラグ付けされています。policyengine-core の person_entity ルールを読んで、単一の person エンティティをどのように選ぶかを確認し、公開ステップを変更してそのエンティティだけをマークします。キーで比較することで、クローンされたシステムでも引き続き一致するようにします。tests/test_model_entities.py で検証します(UK に対して is_person エンティティがちょうど 1 つ、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.py fails, 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時間
マージ済み PR(30日)
17

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

PolicyEngine/policyengine.py のほかの issue

PolicyEngine/policyengine.py の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。