unitedstates / inspectors-general

Collecting reports from Inspectors General across the US federal government.
https://sunlightfoundation.com/blog/2014/11/07/opengov-voices-opening-up-government-reports-through-teamwork-and-open-data/
Creative Commons Zero v1.0 Universal
107 stars 21 forks source link

Adding QA scripts #171

Closed divergentdave closed 10 years ago

divergentdave commented 10 years ago

Bring 3 QA scripts into the tree. Add CLI driver.

divergentdave commented 10 years ago

Going to pipe outputs into admin.notify() in next commit

konklone commented 10 years ago

I just updated the qa script to wrap the scripts with calls to utils.run(), which passes command line options through. This also turns on logging.debug properly, and catches exceptions on its own.

I tweaked the qa script to accumulate messages before emailing the admin, and to return an exit code of 1 if there's any output.

This approach to QA doesn't work for one script, though, the PDF attachment script. That will always turn out output if it finds any attachments. It was really meant more for investigation than for QA, and isn't meant to be run all the time. So I'll probably exclude it from runs on my server until I have a better idea of how to address this.

@divergentdave thanks for putting all these together, it's really some tremendous data quality work.