PolicyEngine / PolicyEngine/policyengine-core

Test that country packages don't have formulas with entity mismatches

Open
#129 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
22
Forks
30
Avg merge
14h 33m
Merged PRs (30d)
7

Description

We've had several undetected crashes arising from formulas that mix up entity types, resulting in this type of error:

ValueError: operands could not be broadcast together with shapes (100000,) (279932,)

For example, https://github.com/PolicyEngine/policyengine-us/issues/3298

Let's test for this centrally.

@martinholmer could you share the command you executed in that issue to throw the error?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the linked PolicyEngine US issue and obtain the command requested from the issue thread. Then inspect policyengine-core's existing test entry points to determine where a centralized check belongs. Done means country packages are checked for formulas that combine mismatched entity types and the failure is covered by an automated test.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.