-
Notifications
You must be signed in to change notification settings - Fork 32
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 missing variables to distribution table (with update to TC 0.17.0) #848
Conversation
PR #848 is incorrect given the merge of Tax-Calculator pull request 1919 because it doesn't add the new UBI column. |
Looks like having extra columns would fail some of the test suites and yield index error, which I wasn't able to resolve. I'm confused that why some of the tests would fail even if I don't have any problems submitting works via GUI on my local (for both static and dynamic). @hdoupe do you have any ideas how to deal with these errors? |
Hmmm I think the tests are failing because the mock compute object returns old results. Since we are going to temporarily drop backwards compatibility, I think we should replace the old mock results with the new ones (just use the results from some random run with the current table format). We can retrieve the old results from a previous PolicyBrain future in the future. |
@martinholmer said:
This can be corrected once PolicyBrain updates to TC 0.17.0, right? |
@hdoupe said:
Ahhh, I see. Then this makes sense: I'm not surprised to see that adding more columns would break the backward compatibilities (which is the case on my local as well).
Agree. Do you think we should wait until all batches of variables have been added? |
@hdoupe asked:
Yes. |
Thanks @martinholmer. |
@GoFroggyRun asked:
I think that we should update the tests as we go. Several PR's will be required to do this update and I think it will be useful to keep track of the different table results. This should be pretty easy to do. Changing this snippet of code to:
will automatically generate updated table results. Additionally, you will have to xfail a few tests that are set up to parse the older data. Does that sound sensible? |
@hdoupe said:
The approach sounds sensible to me. However, after changing this snippet of code, I still wasn't able to have all tests passed. In particular, the same problem remains (list index out of range). Looking at the Attached is my test report:
|
@GoFroggyRun Strange, it worked for me. I pushed the updated test data as well as some other changes from PR #846 and changes to finish updating to tc 0.17.0. This test data contains tables with all of the data except for the age breakdown. |
Finishing touches on upgrading tables to Tax-Calculator 0.17.0
Strange indeed. I copied the same code in the commit @hdoupe Thanks for the updated test data in changes to finish updating to TC 0.17.0., all valid tests pass using those updated test data. |
@GoFroggyRun said:
Yes, are you sure that it's calculating all 10 years? No problem. I think this will be good to go once we update the row labels in the java script like in #846 (taxbrain-tablebuilder.js) However, we want to use the names just like they are in Tax-Calculator which can be found here. @GoFroggyRun would you mind taking care of this last part? Then we can close #846 and just use this PR. |
@hdoupe said:
Sure. So basically I'd incorporate commits/changes in #846, but use updated row names to hardcode the javascript part, would that be sufficient? |
Yep, you got it. Thanks @GoFroggyRun |
LGTM. Thanks @GoFroggyRun |
This PR closes #771. Before this PR, 'Expanded Income' and 'After-Tax Expanded Income' are not shown in the distribution table, since they were not being rendered into the database.
After this PR, the two are now included in distribution tables, as well as in the "Select Columns" widget:
and
This PR can be viewed as a simple experiment to show that the "Select Columns" widget won't be a problem when new columns are added to the tables, since the widget would render whatever columns the data frame has.