unitedstates/inspectors-general — pull request #12 by konklone (2014-05-08 19:46:32+00:00)
Title: Changes to parsing, validation

This validates processed IG reports, tries to infer a couple fields instead of requiring them from scrapers, and updates the documentation to reflect that.

* All reports are run through `inspector.preprocess_report`, which tries to:
* infer the report's `year` from the `published_on` field
* infer the report's `file_type` from the `url` field
* sets a default value for `type` of "report"
* All reports are run through `inspector.validate_report` before saving, which:
* checks for required fields
* ensures inferring `file_type` and `year` worked correctly
* ensures `published_on` has a `YYYY-MM-DD` format

Various little bugs were uncovered and fixed along the way.