-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better programmatic drawio XML generation #19
Comments
A relatively quick win here would be an nbconvert exporter that could turn an It's worth exploring:
|
Hello, graphviz2drawio author here! This is a fantastic project and I'd be happy to help directly support this effort. |
This repo has suffering in just keeping the lights vs upstreams ( An initial naive pattern might documentation-only, wrapping the main function of the library in the from ipywidgets import Wiget
from traitlets import Unicode
class IPyGraphviz2Drawio(Widget):
dot = Unicode()
mdxml = Unicode()
@observe("dot")
def _on_dot(self, change):
self.mdmxl = graphvis2drawio.convert(change.new) This would be relatively robust over time, so long as that public API didn't change. Indeed, to that point, having proper PEP484 types (and a Any deeper integration (e.g. modeling the actual tree in any meaningful way) would expose a lot of potential integration risks further down the line. But indeed, I could imagine an Additionally, at the interactive timescale, roundtrip speed becomes more relevant. It may be desirable to have an driver pattern, which would use/prefer |
Elevator Pitch
Improve programmable creation of mxgraph XML in python.
Motivation
The current demos of generating drawio XML generally use string templating, or are fragile on non-linux platforms due to some under-packaged/hard-to-compile dependencies.
conda-forge now has (presumably) working builds of recent graphviz for windows, and pygraphviz should be coming along soon. This, and a few minor dependencies, are some of the last remaining only-feasible-to-test-on-linux packages used in binder to support graphviz2drawio, which is pretty much the only python-based library out there for generating mxgraph XML.
Through raw
.dot
, networkx, or pygraphviz directly, this would substantially improve the experience of building (or at least starting) diagrams.Design Ideas
.dot
files sounds pretty grossipydrawio-graphviz
asg2d
is...jsonschema
) distinguish between their sticky/permissive dependencies for downstreamsGraphvizDiagram
widget that delegates drawing to the client.dot
could be useful.dot
renderer that roundtrips through python?The text was updated successfully, but these errors were encountered: