Add CLI --behavior option#2981
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2981 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 13 13
Lines 2641 2712 +71
=========================================
+ Hits 2641 2712 +71
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
One note on this: The Tax-Brain package already has a CLI that allows one to run the Tax-Calculator model with behavioral responses. |
jdebacker
left a comment
There was a problem hiding this comment.
I've reviewed the files and confirmed all local tests pass.
My only comments on this PR are:
- I would stick with the language of "static analysis" since, that's what Tax-Calculator is doing, even with behavioral response (without behavior, sometimes this is called the "truly static" estimate or the mechanical effects of a tax policy change).
- I would like to hear from @MattHJensen on this since he suggested these changes, but had in the past supported keeping Tax-Calculator a streamlined model with just the tax logic, while other packages supported the creation of tax data (e.g. the TaxData or TMD projects), modeling of behavioral responses (e.g. the Behavioral Responses package, or dynamic analysis (e.g., OG-USA. The idea was then that the Tax-Brain package would serve as the "integrator" app, pulling together data, tax logic, models of behavioral responses, and macroeconomic effects and making them all accessible in a single interface (with a Python API and a CLI -- and in the past a web application). Tax-Brain currently has a CLI with a behavior option (the addition in this PR). While the Tax-Brain CLI may not produce the same output as the Tax-Calculator CLI, it may be useful to document how the CLI addition in this PR differs from what is done in Tax-Brain and why effort is spent updating the CLI in Tax-Calculator rather than the CLI in Tax-Brain. @MattHJensen may be best positioned to comment on this given his direction in these projects.
|
@jdebacker said in the discussion of PR #2981:
There are several reasons why the Tax-Calculator CLI is being enhanced so that behavioral responses can be assumed. @MattHJensen can provide you with the user interface reason, but I can mention a couple of other reasons here. Tax-Brain CLI does not work After installing Tax-Brain, I get the help message OK, but then get these errors: Then I tried to use the TMD input data. Tax-Brain cannot use TMD input data According to Tax-Brain pull request 206, Tax-Brain cannot handle the new TMD input data. Conclusion So, it looks as if Tax-Brain would need some work to be able to do what the Tax-Calculator CLI does after this PR is merged. Centralizing the CLI capabilities in one model makes it easier to develop a new type of model interface. |
The Tax-Calculator Python API has long been able to conduct tax analysis assuming behavioral responses to a reform, as illustrated in the Recipe 2 documentation.
This PR adds that ability to the Tax-Calculator CLI.