PSLmodels / Tax-Brain

Tax-Brain is an integrator model for PSL tax models
http://taxbrain.pslmodels.org/
MIT License
9 stars 14 forks source link

Refactor TBI #21

Closed andersonfrailey closed 5 years ago

andersonfrailey commented 5 years ago

This PR refactors tbi.py to use the TaxBrain class instead of the original TBI we took from Tax-Calculator. Results are exactly the same as verified by the currently commented out test_comparison_results test. I'll be removing that before merging this PR.

I've also slightly refactored parts of taxbrain.py to work a little better with the TBI. The biggest change is now a DataFrame can be passed as the mircodata argument. There is now a new method in TaxBrain called multi_var_table, which will produce a table where each row is the weighted sum of a variable and there is a column for each year you run the model.

Many of the tests were also refactored to deal with these changes. And all of the functions in tbi.py that were no longer needed were removed.