PolicyEngine / PolicyEngine/policyengine-api
Create raft of tests for structural reforms
Open
@tawandamoyo is already working on this.
Since Nov 6, 2024.
- Dominant language
- Python
- Stars
- 18
- Forks
- 33
- Avg merge
- 23h 40m
- Merged PRs (30d)
- 22
Description
There would be a lot of value to adding a series of tests around creating structural reforms with the following:
- A reform using a
neutralize_variablevalue on an existing piece of the default tax-benefit system - A reform using an
update_variablevalue on an existing piece of the default tax-benefit system - A reform using an
update_variablevalue to create a totally new variable in the system
All of these should be run in the following four-step manner:
- For a relevant test household, baseline, no axes
- Test household, reform, no axes
- Test household, baseline, axes
- Test household, reform, axes
This mimics the series of calls that occurs if a user inputs a reform, inputs a household, views their net income output, then clicks "Varying your earnings".
Each output should confirm that:
household_net_incomeis a valid value- Each of the default outputs is a valid value (we could even drill down the tree using metadata to ensure every possible display value is valid, depending on how long that makes the test time-wise)
- Some variable added or altered by the structural reform is present and valid
Contributor 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.
Assessment
This issue has not been assessed yet.