-
-
Notifications
You must be signed in to change notification settings - Fork 157
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
Make single CLI tool be an entry point to the taxcalc conda package #1253
Conversation
…--exact] [--graph] [--ceeu] [--dump] Writes to a file the federal income and payroll tax OUTPUT for each filing unit specified in the INPUT file, with the OUTPUT computed from the INPUT for the TAXYEAR using Tax-Calculator. The OUTPUT file is a CSV-formatted file that contains tax information for each INPUT filing unit. positional arguments: INPUT INPUT is name of CSV-formatted file that contains for each filing unit variables used to compute taxes for TAXYEAR. TAXYEAR TAXYEAR is calendar year for which taxes are computed. optional arguments: -h, --help show this help message and exit --reform REFORM REFORM is name of optional JSON reform file. No --reform implies use of current-law policy. --assump ASSUMP ASSUMP is name of optional JSON economic assumptions file. No --assump implies use of static tax analysis assumptions. --exact optional flag that suppresses the smoothing of "stair-step" provisions in the tax law that complicate marginal-tax-rate calculations. --graph optional flag that causes graphs to be written to HTML files for viewing in browser. --ceeu optional flag that causes normative welfare statistics, including certainty-equivalent expected-utility (ceeu) of after-tax income values for different constant-relative- risk-aversion parameter values, to be written to screen. --dump optional flag that causes OUTPUT to contain all INPUT variables (possibly aged to TAXYEAR) and all calculated tax variables, where all the variables are named using their internal Tax-Calculator names. output
Codecov Report
@@ Coverage Diff @@
## master #1253 +/- ##
==========================================
+ Coverage 99.66% 99.67% +<.01%
==========================================
Files 38 38
Lines 2706 2749 +43
==========================================
+ Hits 2697 2740 +43
Misses 9 9
Continue to review full report at Codecov.
|
taxcalc/cli/tc.py
Outdated
'assumption file. No --assump implies use of ' | ||
'static analysis assumptions.'), | ||
'assumptions file. No --assump implies use of ' | ||
'standard (std) analysis assumptions.'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think "base" might be more appropriate here than "standard" as the word "standard" has normative implications.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for reviewing #1253. What "normative implications" are you thinking of?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To me, "standard" implies that that a usage is 'approved' and that others are deviant.
For example, consider two Tax-Calculator users on CNN presenting their results. One person could say, "I got X results assuming Y". The second person could say, "Y is just your assumption; when I use the standard model, I got Z."
In this case, Z would sound more reasonable than X.
The same dialogue could take place if the name were "base" instead of "standard", but I think the second guy would have a weaker point.
Something even more neutral than "base" would be preferable, but I can't think of it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Static" solved this problem, but I can see how an analysis is still "static" when growdiff_baseline and growdiff_response have been applied.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MattHJensen said:
Something even more neutral than "base" would be preferable, but I can't think of it.
OK, I see your point. Let me think about alternatives to "standard" and "base".
taxcalc/taxcalcio.py
Outdated
growdiff_response Growdiff object used in dynamic analysis; | ||
must be None when conducting static analysis. | ||
growdiff_response Growdiff object used only in dynamic analysis; | ||
must be None when not conducting dynamic analysis. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure whether it is worth splitting hairs here in the code, but growdiff_response must also be None when conducting a partial-equilibrium dynamic analysis.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MattHJensen said:
Not sure whether it is worth splitting hairs here in the code, but growdiff_response must also be None when conducting a partial-equilibrium dynamic analysis.
I thought your taxonomy was: static, partial-equilibrium(ie, behavior), and dynamic analysis, right? I thought this was the implication of the various quotes you offered last week. If I'm still confused, we need to talk on the phone.
Given that analysis taxonomy, non-dynamic analysis is static or partial-equilibrium, and the wording is sensible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought your taxonomy was: static, partial-equilibrium(ie, behavior), and dynamic analysis, right?
That's not right. My point was that partial-equilibrium analysis should be considered dynamic analysis since it changes GNP, and in the tax-scoring world anything that changes GNP is called dynamic. Will give you a call shortly.
Note that this is the taxonomy we use on TaxBrain since partial equilibrium analysis is available from the dynamic landing page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the TaxBrain landing page:
In the context of policy analysis, dynamic modeling incorporates behavior that affects the aggregate output of the economy. This broad definition includes nearly every type of economic analysis except for the approach most often used in the analysis of tax and spending policy proposals by agencies in the federal government.
There is no single "accepted" way to estimate the dynamic effects of policy reforms, so TaxBrain is designed to encourage users to try several approaches and to grapple seriously with the limitations and tradeoffs of each approach.
@MattHJensen, I'm hoping the three next-to-the-last commits respond effectively to your concerns about terminology in pull request #1253. |
Very excited about the new CLI capabilities. 👍 👍 |
This pull request changes the approach to developing a command-line interface (CLI) to Tax-Calculator to be in line with several suggestions @MattHJensen has offered over the past several weeks. Thanks, Matt.
Now the CLI, which is called
tc
, is an integral part of the conda taxcalc package, which makes it easy to install after a user has install Anaconda on his/her computer:After that installation, the command
conda list taxcalc
shows the Tax-Calculator version number and the commandtc --help
produces this:This pull request also adds a
file-upload-tests/cli-results
bash script that uses thetc
CLI to produce results that can be compared to results generated by the TaxBrain file-upload capability as explained in thefile-upload-tests/README.md
file in this pull request.@MattHJensen @feenberg @Amy-Xu @andersonfrailey @GoFroggyRun @codykallen @zrisher