You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First pass version of the ERD is now implemented as a method on the Connection class. Bulk of the implementation actually lies in a separate module erd. Currently you can specify list of tables or list of databases (using class and module names, respectively) and the ERD will only show those specified tables with tables serving as connections between specified tables filled in (e.g. if A is a parent of B, which is a parent of C, creating ERD with A and C which are not directly related will also display table B to make their relationship explicit).
I'm still adding more functionality to ERD to allow different degree of control over what tables are plotted.
I realized that automated testing of ERD can be quite difficult as its primary output is a matplotlib figure. I'm guessing we should still write test to make sure the the code runs without hanging. Is there a good way to test for plotting?
There is a decorator that allows you to compare an image to a reference image. However, the problem is that you have to adhere to some matplotlib directory structures which we don't. Therefore, I'd propose to simply test whether the erd produces a figure. Another option would be to test whether the erd produces the correct graph and assume that plotting is correctly is tested somewhere else.
Activity
eywalker commentedon Oct 24, 2014
First pass version of the ERD is now implemented as a method on the
Connectionclass. Bulk of the implementation actually lies in a separate moduleerd. Currently you can specify list of tables or list of databases (using class and module names, respectively) and the ERD will only show those specified tables with tables serving as connections between specified tables filled in (e.g. if A is a parent of B, which is a parent of C, creating ERD with A and C which are not directly related will also display table B to make their relationship explicit).I'm still adding more functionality to ERD to allow different degree of control over what tables are plotted.
eywalker commentedon May 4, 2015
I realized that automated testing of ERD can be quite difficult as its primary output is a matplotlib figure. I'm guessing we should still write test to make sure the the code runs without hanging. Is there a good way to test for plotting?
fabiansinz commentedon May 4, 2015
There is a decorator that allows you to compare an image to a reference image. However, the problem is that you have to adhere to some matplotlib directory structures which we don't. Therefore, I'd propose to simply test whether the erd produces a figure. Another option would be to test whether the erd produces the correct graph and assume that plotting is correctly is tested somewhere else.
eywalker commentedon Jul 16, 2015
I'm going to go with the latter solution where I check whether the graph structure produced via ERD commands correctly match to what's expected.
dimitri-yatsenko commentedon Jun 13, 2016
Fixed in PR #208
Merge pull request #7 from guzman-raphael/pr709