srobo / runbook

A single source for all Student Robotics internal documentation
https://studentrobotics.org/runbook/
Other
0 stars 7 forks source link

Discussion: Inline graph handling #69

Open PeterJCLaw opened 5 years ago

PeterJCLaw commented 5 years ago

Since merging #35 we now have some inline graph rendering from mermaidjs via https://github.com/pugong/mkdocs-mermaid-plugin. This works ok for small graphs (for example the asset lifecycle flowchart), but starts to degrade for larger ones (see #68 for an experiment in that regard).

GraphViz is the usual defacto tool for command line usage and typically outputs reasonable graphs and I did explore using it previously. It would mean adding another dependency (and one we're not sure about the windows support for), but would likely mean better graphs and offline development. The latter is something I do think we should aim for.

In terms of GraphViz: https://github.com/sprin/markdown-inline-graphviz was what I'd explored previously, though it didn't interact well with mkdocs (see https://github.com/sprin/markdown-inline-graphviz/issues/8#issuecomment-487408627 for the generalisation of the issue I hit). It looks like https://github.com/cesaremorel/markdown-inline-graphviz might be interested in updating that, though it's not clear whether that project is just Python 3 support or other extensions too.

RealOrangeOne commented 5 years ago

I don't think there's any strong ties to mermaid, although the fact it doesn't require any external dependencies is quite nice.

Is there a way to render the GraphViz in the browser / in pure python instead? Save having to install it on every machine which wants to develop the runbook.

trickeydan commented 5 years ago

Is there a way to render the GraphViz in the browser / in pure python instead? Save having to install it on every machine which wants to develop the runbook.

JS Library: http://viz-js.com/

Python graph drawing library: https://github.com/bdcht/grandalf