PSLmodels / Business-Taxation

USA Corporate and Pass-Through Business Tax Model
11 stars 10 forks source link

Forthcoming result-breaking changes #87

Closed codykallen closed 5 years ago

codykallen commented 5 years ago

I've been working on changes to two components of the model, which when incorporated will alter the model results.

The first is redoing the collection and preparation of data for the Asset class. This replace the process of producing the investment and capital stock results based only on the original data, without using B-Tax computations as intermediates. Furthermore, it also redoes the collection of depreciation tax rules, which previously just used the work already done in B-Tax. Categorizing BEA asset classes by IRS asset classes at times is tricky and requires some judgment. Consequently, the new version includes reference information to the IRS classifications used.

The second major change will be to add the components of the international tax model. I plan to add the classes before integrating them into the rest of Business-Taxation. These will potentially also alter results.

@martinholmer, is there a convenient way to overwrite the test results stored in CSV files?

martinholmer commented 5 years ago

@codykallen asked in issue #87:

is there a convenient way to overwrite the test results stored in CSV files?

Yes. Here's a step-by-step explanation of the workflow.

The fake example I'm going to work through here is based on a temporary edit of one of the expected test results CSV files. The temporary edit has been done so that one of the tests fails.

Here is the temporary edit and the beginning of the pytest output:

Screen Shot 2019-03-30 at 2 05 12 PM

The end of the pytest output looks like this:

Screen Shot 2019-03-30 at 2 06 35 PM

If you're absolutely sure that the new actual results are what should be the new expect results, then move the file, which will copy the actual file to the expect file overwriting the old expect file and deleting the actual file. Then rerun the tests immediately and there should be no test failure.

Let me know if you have any more questions.

codykallen commented 5 years ago

The change to the Asset model and data preparation for it has been implemented in #100. The changes for the international tax model have been partially implemented, with more to come.