openedx / wg-data

Tracking work and progress of the Open edX Data Working Group
1 stars 2 forks source link

Spike: Propose a tool to generate Entity Relationship Diagrams (ERDs) for our Django IDAs #14

Open e0d opened 2 years ago

e0d commented 2 years ago

It would improve our data documentation and make our data models more approachable to have ERDs readily available for our Django IDAs.

The output of this work will be a recommend tool for automatically generating ERDs.

AC:

bmtcril commented 1 year ago

Part of the trick here is that which models show up on the diagram depend on configuration, so the tool pretty much needs to be run in the Django runtime of a project configured similarly to production. One possibility is to use django-extensions in a Tutor environment that matches the production system as closely as possible (at a minimum has the same INSTALLED_APPS): https://django-extensions.readthedocs.io/en/latest/graph_models.html

bmtcril commented 1 year ago

@e0d do you feel like the work you've done on generating an ERD is sufficient for this task, or is there more we should do?

e0d commented 1 year ago

Hmm, I had in mind something a little more CI/CD friendly than what I've done so far. What I've been doing for my exploration is using a data dictionary query that LucidCharts provides to generate a CSV. That output can then be imported into Lucid and things like columns, types, relations are captured and maintained in the model.