-
-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make a Policy object's last budget year be flexible #2856
Make a Policy object's last budget year be flexible #2856
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2856 +/- ##
=======================================
Coverage 99.42% 99.42%
=======================================
Files 13 13
Lines 2618 2625 +7
=======================================
+ Hits 2603 2610 +7
Misses 15 15
Flags with carried forward coverage won't be shown. Click here to find out more.
|
This comment illustrates how to use the new features in PR #2856 with the Python API.
|
This comment illustrates how to use the new features in PR #2856 with the CLI tool,
|
Co-authored-by: jdebacker <no-reply>
@martinholmer Thanks for improving upon PR #2846. Everything looks good here and I've confirmed all local tests and CLI examples. Merging. |
The
LAST_BUDGET_YEAR
, which is a constant attribute of the Policy class, is currently set to 2034. There is a need to be able to instantiate Policy objects that have their last budget year different fromLAST_BUDGET_YEAR
. The main need is to be able to use TMD input data that include weights and growfactors extending out to 2074. For much of 2024 the only way to use the TMD data to simulate beyond 2034 was to create a customized version of Tax-Calculator using the code on thethru74
branch in PR #2755.Recently, @jdebacker had the vision to see that there was a way to revise Tax-Calculator code so that by default it would use
LAST_BUDGET_YEAR
but the code would have the flexibility to allow users to specify Policy objects with last budget year greater (or less) thanLAST_BUDGET_YEAR
. @jdebacker worked with @hdoupe to revise ParamTools, which is the foundation of the Policy class, so that it would be possible to add this flexibility. Then in PR #2846, @jdebacker implemented the code changes for the Python API made possible with the newParamTools
0.19.0 version. This PR builds on @jdebacker's PR #2846.The remaining minor task of using the new Python API in
taxcalcio.py
to make the Tax-Calculator CLI tool,tc
, have the same last budget year flexibility is being handled by @martinholmer, who is a frequent CLI user..
The new flexibility added in this PR is illustrated below with two different examples:
tc
, is demonstrated in this commentAlso, the 2070 results generated in these two examples were compared to 2070 results generated by a custom Tax-Calculator package constructed using the
thru74
branch (in PR #2755. The results were identical as expected.