18F / data-act-pilot

This small DATA Act pilot contains code that translates agency data to a uniform DATA act format.
Other
21 stars 14 forks source link

validation changes to reflect new col names from #158 #162

Closed bsweger closed 8 years ago

bsweger commented 8 years ago

@msecret made some change to reflect the updated column names from #158. Treasury is getting ready to release some changes to the data elements, which may include names, so it's possible that these will change again.

I'd be happy to create a function/utility that reads in the template .csvs and grabs the column names...I have code that does this, and looks like that would be useful on your end too. Then, when column names change, we might need to update validations manually, but at least the initial check for file format won't fail.

Where is the best place to drop this code?

msecret commented 8 years ago

@bsweger, the current columns are set in a variable in app/app.py, https://github.com/18F/data-act-pilot/blob/master/app/app.py#L25. I think it would be best to put the function to read in the columns in that file and maybe call it at the bottom of the file, so it runs when the server is initialized?