chop-dbhi / avocado

Metadata APIs for Django
http://avocado.harvest.io
Other
41 stars 10 forks source link

Add header check to base exporter class #314

Closed bruth closed 9 years ago

bruth commented 9 years ago

The check uses the first row of data as input to validate the shape of the header and row are the same.

The motivation behind this is to provide a bit more transparency when an error is encountered during an export due to faulty formatter.

In addition, the to_FOO formatter methods have been changed to not take arbitrary positional or keyword arguments. The formatter context represents the keyword arguments passed into the exporter read method; typically included request and/or user.

Signed-off-by: Byron Ruth b@devel.io

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.06%) to 78.59% when pulling b88e5c86887133371f07a5a1f07d7733a4560ccb on header-check into 49abc2671eda9170b66fe625834369c9c77025ba on master.