Revise diagnostic table logic making it easier to create when assuming behavioral responses #2126
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request answers the question posed by @evtedeschi3 in issue #2125. By moving some of the low-level logic of creating multi-year diagnostic tables from the Calculator class to the
create_diagnostic_table
utility function, it is now easier to create a multi-year diagnostic table when assuming behavioral responses to a policy reform. The new approach, which requires Tax-Calculator 0.23.2 or higher, is illustrated in the expanded Cookbook recipe 2.The Calculator method
diagnostic_table
method works exactly as before, so there is no API change there.However, the signature of the
create_diagnostic_table
utility function has been changed, so that is a minor API change. Given that most people are using the Calculator method rather than the low-level utility function, we are calling this pull request a "New Feature" rather than an "API Change".