Model version publishes the new UK firm entity as a person
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start in src/policyengine/tax_benefit_models/common/model_version.py at _populate_entities, where each root population with no members is currently flagged is_person. Read policyengine-core's person_entity rule to see how it picks the single person entity, then change the publishing step to mark only that entity, comparing by key so cloned systems still match. Verify with tests/test_model_entities.py (it should find exactly one is_person entity for UK, person, not firm); the downstream catalog check in data/v2/catalog/extraction.py is the reason it matters.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Python
- Stars
- 8
- Forks
- 10
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 17
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PolicyEngine/policyengine.py
-
Raise the simulation cache memory warning to 16 GiBPossibly taken @anth-volk claimed this 53 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
PolicyEngine/policyengine.py#549 ·
Maintainers usually reply within 1 day
-
README population quickstart still teaches enhanced_frs_2023_24Possibly taken @vahid-ahmadi claimed this 31 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
PolicyEngine/policyengine.py#473 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
PolicyEngine/policyengine.py#436 · 1 comment ·
Maintainers usually reply within 1 day
-
Certify populace-uk as the UK certified defaultMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
PolicyEngine/policyengine.py#408 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
PolicyEngine/policyengine.py#762 ·
Maintainers usually reply within 1 day
All issues in PolicyEngine/policyengine.py
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
software-mansion-labs/Diplomat#20 ·
Maintainers usually reply within 1 day
-
[Windows] Hidden title bar: a maximized window restored from minimized on a secondary monitor gets the primary monitor's work area as its client areaPossibly taken @lijy91 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
libnativeapi/nativeapi#53 · 1 reaction ·
Maintainers usually reply within 1 day
-
View Counts discarded due to field name mismatchPossibly taken @rsiva0400 claimed this today. Opensite-bug triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
spcl/HPCAgent-Bench#264 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100