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 TaxBrain class #5

Closed andersonfrailey closed 5 years ago

andersonfrailey commented 5 years ago

This PR contains a pretty significant refactoring of the Tax-Brain class. In an effort to simplify the class and make it easier to build into the TBI, I've "dumbed down" the TaxBrain class a little.

Under this refactor, a user no longer calls different functions to perform a static or dynamic run. Instead, they just use the run() method. If they passed in a set of behavioral assumptions, TaxBrain will start a dynamic run. Otherwise it will be a static run.

All of the data is still stored in dictionaries, but now it is accessed just by specifying the year and whether you want the reform or baseline data, rather than also needing to specify if you want dynamic or static.

These changes should make TaxBrain easier to use for both users and with the TBI. Barring any objections, I'll be merging this before the first conda package release for TaxBrain.

andersonfrailey commented 5 years ago

Took @hdoupe's advice and added an example notebook to go along with the example python script. Also resolved all of the merge conflicts from adding the TBI.