PolicyEngine / policyengine-uk

The UK's only open-source static tax-benefit microsimulation model.
https://policyengine.github.io/policyengine-uk/
GNU Affero General Public License v3.0
27 stars 27 forks source link

Make improvements to income tax-related variables #891

Closed anth-volk closed 1 month ago

anth-volk commented 1 month ago

Fixes #890

This PR restructures many of the variables previously within the income_tax variable folder. It also restructures their corresponding tests. It adds reference material for many variables and changes the output type of pays_scottish_income_tax to Boolean.

This does not yet address potential issues with said variables, which will come in a later PR.

PavelMakarchuk commented 1 month ago

Looks great! - some minor suggestions here

For me in general, I am fairly allergic to formula_xxx structures as I think it limits us and forces duplicate code - compared to a bool parameter, especially if the the change from one year to another is minor

I am also a huge fan of lists as it (IMO) creates a little bit more structure and more direct referencing - also hope that eventually we will be able to adjust those in the web app as well (also easier to create reforms right now)

Per conversation with Max: feel free to make judgment calls which lists are more/less likely to be adjusted through policy changes and convert those to lists

PavelMakarchuk commented 1 month ago

LGTM if the pension name change does not affect the data @nikhilwoodruff