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

Reorganize parameters -- will facilitate TaxBrain updates #1109

Merged
merged 4 commits into from
Dec 22, 2016

Conversation

MattHJensen
Copy link
Contributor

@MattHJensen MattHJensen commented Dec 16, 2016

In #1074, I described several disconnects between TaxBrain and current_law_policy.json:

  1. Sections and subsections
  • TB is organized by sections and subsections, (e.g Refundable Credits: EITC), whereas current_law_policy.json parameters are only informally grouped into sections by reference in the title name.
  1. Order of the parameters.
  • TB is ordered roughly by where the params appear in the tax forms, while TC's current_law_policy.json is roughly ordered by where the parameters appear in taxcalc/functions.py.
  1. "Principle" parameters
  • The TB input page does not include every parameter from current_law_policy.json, rather it only includes parameters of principle importance.
  1. 1-2 relationships between TB fields and TC params
  • Two sets of fields on the TaxBrain input page have a 1-2 relationship with parameters in Tax-Calculator.
    • The personal income tax rate and brackets fields on TaxBrain govern both II_rts and II_brks as well as PT_rts and PT_brks
    • the long term capital gains and qualified dividends fields on TaxBrain govern both CG_rts and CG_bks as well as AMT_CG_rts and AMT_CG_brks.

This PR resolves those disconnects by

  1. Adding section_1, section_2, and in some cases section_3 fields that specify the conceptual relationship among parameters and therefore how they ought to be grouped on TaxBrain.

  2. Sorting the parameters in current_law_policy.json to be easier to use. (I have not written down/formalized this schema, but I hope it will be fairly easy to stick to by looking at the examples).

  3. Specifying which parameters should not be included in TaxBrain by leaving off the section fields. My intent was to include every parameter on TaxBrain, but some have not received any attention for a long time, and I figure they might need to be dusted off.

  4. Updating the names and descriptions of parameters such as II_rts and PT_rts to make their relationships more obvious and thereby allow us to do away with the 1-2 relationships between TaxBrain inputs and Tax-Calculator parameters.

One of the core motivations for this project is to get to the point where we can fully specify the content and layout of the TaxBrain input page's tax-law parameters with the information in current_law_policy.json plus a set of translation rules. Once that is done, then the tax-calculator team should be able to trigger changes (whether manual or automated) to the TaxBrain input page by making a change to current_law_policy.json. @talumbau @PeterDSteinberg @brendancol I'd particularly appreciate feedback on that aspect of the project and which additional steps might be needed.

cc, @martinholmer, @feenberg, @GoFroggyRun, @zrisher, @codykallen, @andersonfrailey, @Amy-Xu

@MattHJensen
Copy link
Contributor Author

MattHJensen commented Dec 16, 2016

The standard deduction max for dependents used to be tacked on to _STD. I just added a commit to separate it into its own parameter _STD_Dep that can be displayed on TaxBrain.

@codecov-io
Copy link

codecov-io commented Dec 16, 2016

Current coverage is 98.81% (diff: 100%)

Merging #1109 into master will increase coverage by 0.02%

@@             master      #1109   diff @@
==========================================
  Files            38         38          
  Lines          2830       2879    +49   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           2796       2845    +49   
  Misses           34         34          
  Partials          0          0          

Powered by Codecov. Last update 5e62dde...8483791

@MattHJensen MattHJensen changed the title Reorganize parameters Reorganize parameters -- will facilitate TaxBrain updates Dec 16, 2016
@MattHJensen
Copy link
Contributor Author

MattHJensen commented Dec 17, 2016

@talumbau told me on the phone that TB updates would be easier if we point out parameter name changes whenever they occur:

This PR renames _KT_c_Age as _AMT_KT_c_Age and modifies _STD by separating _STD[6] into a new parameter _STD_Dep.

I believe that neither _KT_c_Age nor _STD[6] are currently used on TaxBrain.

The easiest way to see this in the diffs is by looking at functions.py.

@MattHJensen
Copy link
Contributor Author

This contains no breaking changes and does not influence tax logic. I hope to merge at the end of the day tomorrow.

@talumbau
Copy link
Member

Just a quick note to say that the Appveyor 'X' here is not a problem. Now that Appveyor is turned on, it will try to build all PRs. Until #1111 is merged, it won't have the proper scripts (or the fix that makes the tests fail on Windows)

@martinholmer
Copy link
Collaborator

@MattHJensen, pull request #1109 look good to me.
Thanks for these changes that promise to make it easier for TaxBrain to keep up with changes in Tax-Calculator.

@MattHJensen
Copy link
Contributor Author

Thanks @zrisher, @martinholmer, @feenberg (for comments on the original issue), and @talumbau (for comments on the phone). Merging.

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.

4 participants