sfbrigade / datasci-sba

Solving problems with the Small Business Administration
10 stars 18 forks source link

Adding More to Testing Framework #38

Closed VincentLa closed 7 years ago

VincentLa commented 7 years ago

This PR further builds out our SQL Testing Framework. In particular,

  1. Adding a "structural test" in test_structural.py. What this does is that it checks that any sql files in /pipeline/pipeline_tasks/queries is valid SQL (e.g. no syntax errors) and the right dependencies are used. Right now, this is a bit hacky, and depends on the queries filenames being ordered alphabetically.

Depending on how many more SQL queries we actually write, this can be really nice. It checks that any SQL you're writing is valid, and so if the CircleCI checks fail you need to pay attention to it.

  1. Adds a utility in returning SQLAlchemy table definitions given a table name in a DB. This is in create_sqla_table_defs.py.
VincentLa commented 7 years ago

@makfan64 of course! happy to go through whatever you want!