forked from PSLmodels/OG-Core
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Implement OG-USA version of taxcalc/parameters.py and taxcalc/policy.py #9
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Whoops. Just realized that I opened this PR on the wrong branch. I meant to do Jason's pb_api branch. I'll close this and open another PR. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is based off of the work started by @jdebacker in PSLmodels#354.
Files added:
parametersbase.py
-- A stripped down version oftaxcalc/parameters.py
. I removed most of the inflation indexing logic and array expansion logic since that doesn't seem to be as important for OG-USA. Further, stripping the class down into the core parts helped me understand the code better. The indexing and array extension logic could be added back.pb_api.py
-- A stripped down version oftaxcalc/policy.py
. Most of the indexing and other logic that isn't relative to OG-USA was removed. Also, two new methods are implemented:a)
ogusa_set_default_vals
-- sets cheaply calculated parameters that are difficult to represent in a JSON fileb)
estimate_parameters
-- sets expensively calculated parameters such as those estimated for the tax functiontests/test_pbapi.py
-- tests for thepb_api.py
module. More tests need to be added. In addition to covering new OG-USA logic, applicable tests from the Tax-Calculator suite should probably also be ported over.The work so far serves mostly as a proof-of-concept. Many of the more complex parts of the Tax-Calculator logic were removed to get this code stood up quickly. The
parametersbase.py
code will probably better maintained and tested more thoroughly if it is used by both Tax-Calculator and OG-USA. So, I may take another crack at implementing apb_api.py
on top of thetaxcalc/parameters.py
class instead of extensively changing thetaxcalc/parameters.py
class.cc @jdebacker @martinholmer