import pathlib
import re
import graphviz
import IPython
@IPython.core.magic.register_line_cell_magic
def dot(line, cell=None):
src = graphviz.Source(pathlib.Path(line).read_text() if line else cell)._repr_svg_()
src = re.sub(r"<svg (.*)viewBox", "<svg viewBox", src, flags=re.M | re.DOTALL)
return IPython.display.SVG(data=src)
These are how we think everything works in the current master
branch.
%dot dot/as-is/frontend.dot
%dot dot/as-is/backend.dot
Some fragments of how the architecture could change in the future, and why (or why not) they might be a good idea.