Skip to content
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

Automate All The Things #349

Merged
merged 12 commits into from
Aug 22, 2020
Merged

Conversation

andersonfrailey
Copy link
Collaborator

This PR contributes two new bits of automation.

First, it finishes automating CBO updates. I'm going to continue working on it a bit more to try and automatically update documentation as well.

Second, it automatically generates reports detailing changes to TaxData. The new reports.py file will look for variables that are added/removed from both the PUF and CPS, compare CBO projections and growth factors between the master branch and whatever the current branch you're working on is, and finally compare taxcalc projections using the CPS file. It's still a work in progress, but I've attached a sample report for feedback. I'm still deciding how to best make comparisons using the PUF.

Sample usage is:

python report.py "1,2,3" --desc sample.txt

"1,2,3" is a list of PRs that have gone been/will be merged whose changes are reflected in the report. This could also be used to point to issues that are addressed. I'll update the language in the report to reflect that before my next commit.
--desc sample.txt is an optional path to a text/markdown file with additional information to be included at the start of the report. In the file used to create the sample report, sample.txt just contained the line:

This is a bunch of additional information

I'm interested in hearing what people think of the report and what they'd like to see added/removed. The purpose of all this is so that contributors have an easy way of showing how their changes affect our datasets and taxcalc projections as well as to create a history that's easier to refer back on than digging through a bunch of PR's would be.

taxdata_report_2020-08-02.pdf

@andersonfrailey
Copy link
Collaborator Author

Latest commit finishes the automation process. Now updatecbo.py will check each of the sites we pull data from to see if there is anything new and update (or not update) CBO_baseline.csv and the documentation automatically. I've noted this in the code, but the March 2020 CBO revenue projections do not include capital gains realizations. It's unclear if that's a permanent change or just for this specific file. We'll need to re-evaluate when they release a new update, but for now we just skip over that update.

@andersonfrailey
Copy link
Collaborator Author

I'll leave this open for another day or two and if there are no comments I'll merge.

@andersonfrailey
Copy link
Collaborator Author

If there are no objections, I'll merge this at COB today.

@andersonfrailey andersonfrailey merged commit f122930 into PSLmodels:master Aug 22, 2020
@andersonfrailey andersonfrailey deleted the reports branch August 22, 2020 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Two links from https://github.com/PSLmodels/taxdata/tree/master/puf_stage1 give 404 error
1 participant