PSLmodels / Tax-Calculator

USA Federal Individual Income and Payroll Tax Microsimulation Model
https://taxcalc.pslmodels.org
Other
254 stars 153 forks source link

Revise ppp.py script so that it does not crash #2725

Closed martinholmer closed 5 months ago

martinholmer commented 5 months ago

This pull request refactors the ppp.py script so that it does not stop with a fatal error. The refactoring does not change the logic of the ppp.py script.

Also, I added decimal points to the new float parameter recently added because ParamTools writes this parameter's values as floats (instead of integers). These changes are purely cosmetic, but will avoid spurious changes to the policy_current_law.json file when the ppp.py script is executed.

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.42%. Comparing base (598f1d6) to head (a8ac3d0). Report is 1 commits behind head on master.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/PSLmodels/Tax-Calculator/pull/2725/graphs/tree.svg?width=650&height=150&src=pr&token=KqtTvRSNjQ&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels)](https://app.codecov.io/gh/PSLmodels/Tax-Calculator/pull/2725?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) ```diff @@ Coverage Diff @@ ## master #2725 +/- ## ========================================== + Coverage 98.54% 99.42% +0.87% ========================================== Files 14 13 -1 Lines 2616 2593 -23 ========================================== Hits 2578 2578 + Misses 38 15 -23 ``` | [Flag](https://app.codecov.io/gh/PSLmodels/Tax-Calculator/pull/2725/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/PSLmodels/Tax-Calculator/pull/2725/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels) | `99.42% <ø> (+0.87%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels#carryforward-flags-in-the-pull-request-comment) to find out more. [see 1 file with indirect coverage changes](https://app.codecov.io/gh/PSLmodels/Tax-Calculator/pull/2725/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PSLmodels)
jdebacker commented 5 months ago

Thanks for the updates, @martinholmer , merging.