OpenSourcePolicyCenter/Tax-Calculator — pull request #57 by Copper-Head (2014-10-26 01:08:20+00:00)
Title: First pass at refactoring

@talumbau I know you said we should stave off the issue of global variables, but to be honest, I'm having a little trouble refactoring without a clear concept of variable sharing. On the one hand, numba very heavily favors writing a bunch of small functions each of which focuses on calculating (and returning) just one variable. On the other hand, we want every function to return a DataFrame because this seems to be the common currency we're operating with.

I think the most reasonable way to address this at this point is to have all the functions in ``taxcalc.calculate`` only return vectors, then modify ``test.run`` so that it a) selects the right variables as inputs to functions from ``taxcalc.calculate`` and b) converts all their outputs to DataFrames and incorporates them into the global namespace so that these outputs are accessible to any later computations, should they be required.