Skip to content
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
wants to merge 22 commits into from

Conversation

hdoupe
Copy link

@hdoupe hdoupe commented Apr 4, 2018

This PR is based off of the work started by @jdebacker in PSLmodels#354.

Files added:

  1. parametersbase.py -- A stripped down version of taxcalc/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.
  2. pb_api.py -- A stripped down version of taxcalc/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 file
    b) estimate_parameters -- sets expensively calculated parameters such as those estimated for the tax function
  3. tests/test_pbapi.py -- tests for the pb_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 a pb_api.py on top of the taxcalc/parameters.py class instead of extensively changing the taxcalc/parameters.py class.

cc @jdebacker @martinholmer

@hdoupe
Copy link
Author

hdoupe commented Apr 5, 2018

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.

@hdoupe hdoupe closed this Apr 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants