-
-
Notifications
You must be signed in to change notification settings - Fork 160
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
add Behavior class and move defaukt behavioral assumptions to behavior.json #367
Conversation
fixes for params.json related to behavior
I agree with @MattHJensen so strongly that I think it is a very bad idea to commit this pull request. Why not put the behavioral assumptions in their own JSON file? The default values could be put in a file named behavior.json. Then add to behavior.py a function |
@martinholmer many thanks for looking this over. We are in agreement about the risks of mixing the behavioral and tax policy parameters, although as you can tell I was tempted to accept those in the short run in order to get behavior up and running on the webapp. @PeterDSteinberg and I were just discussing some other options, though, that might still be easy to integrate with the webapp but wouldn't pollute params.json or the Parameters object. @PeterDSteinberg, could you chime in with what you are thinking? (Added a WIP tag so this doesn't get merged until we sort this out. ) |
I was thinking a default econ_params.json file in the taxcalc repo and a corresponding EconParams class. Then the Calculator object initialization can take separate tax params and econ params dictionary arguments. Internal to Calculator objects, the tax params will remain accessible in .params and the economic parameters will be accessible at .econ_params, keeping the namespaces separate. |
@PeterDSteinberg said:
I like the idea of a separate class, but I'm not crazy about your proposed names. The name econ_params.json makes everybody wonder what's in params.json. (Honestly, "parameters" is over-used in this project: everything can be viewed as a collection of parameters. If I had my way, the params.json file would be called current_law_policy.json and the Parameters class would be called Policy. But I wasn't active in the early days when this decision was made, and there's no going back now. However, that does not mean we have to make the same mistake again.) The contents of your proposed JSON file and class are BEHAVIORAL ASSUMPTIONS. Why not just build a Behavior class in the existing behavior.py file and call the default assumptions behavior.json? Much less confusion if you following this naming strategy. |
behavior better separated from tax law params
@martinholmer, @talumbau, @PeterDSteinberg I plan to clean up pep8 and then merge this into master later today. Then Peter plans to refactor Parameters and Behavior to share some core functionality. In the meantime @Amy-Xu could start following this template for #368. |
…parate new_behavior and reform dictionaries.
@PeterDSteinberg I just renamed the I also think that we should have one dictionary of |
@martinholmer, just want to make an off-topic comment before this PR gets closed and buried:
I don't think anyone would be averse to revisiting the naming scheme if you'd like to open an issue on this at some point. |
Looks good to me! |
Merging. Thanks everyone. |
add Behavior class and move defaukt behavioral assumptions to behavior.json
This PR places behavioral assumptions, such as income and substitution effects, in
params.json
and uses them inbehavior().
This is probably not a good long-term solution because everything else about our Parameters class has to do with "tax law parameters" rather than "economic parameters." In fact, I suggested a component of a different solution on Feb 21 in #138. @martinholmer, @talumbau and I have also very briefly discussed other options on a phone call at some point.
That said, @PeterDSteinberg and I want to place these economic assumptions in params.json for now while we think of a better long-term home because our Parameters class provides all the functionality necessary to make these economic assumptions available to webapp users.
@martinholmer, I hope you have a chance to look at this.