Skip to content
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

export to graphml #32

Open
PaulSchweizer opened this issue Dec 20, 2017 · 9 comments
Open

export to graphml #32

PaulSchweizer opened this issue Dec 20, 2017 · 9 comments
Assignees
Milestone

Comments

@PaulSchweizer
Copy link
Owner

No description provided.

@Anton-4
Copy link
Collaborator

Anton-4 commented Jan 18, 2019

@PaulSchweizer should I just add serialize_graphml and deserialize_graphml methods to the Graph class? I currently have this implemented in json so rewriting this to graphml will require little effort.

@PaulSchweizer
Copy link
Owner Author

@Anton-4 , good idea! Yes, adding these two methods to the graph would be really good.
It could look something like this maybe (just a quick idea):

<graph id="{graph.name}" edgedefault="directed">
    <node id="{node1.identifier}"/>
    <node id="{node2.identifier>"/>
    <edge id="{node1.outputs[output_name].name}-{node2.inputs[input_name].name}" source="{node1.identifier}" target="{node2.identifier}"/>
  </graph>

Not sure where to put the other attributes of the Node like "metadata", "class", "module" etc. but you'll find a way :D
Thanks again!

@Anton-4
Copy link
Collaborator

Anton-4 commented Jan 24, 2019

I started working on this and thought: do we really need full serialization and deserialization or just exporting of graph, nodes and edges without attributes like metadata, class, module... ?

I mainly wanted to export to graphml to have a standardized format to feed into the visualizer.
What was your intended use-case for full serialization and deserialization?

Anton-4 pushed a commit to Anton-4/flowpipe that referenced this issue Jan 24, 2019
@PaulSchweizer
Copy link
Owner Author

I see your point @Anton-4 but if we would fully serialize the graph like we currently do in json, we could use the graphml file to fully reconstruct the graph afterwards. Otherwise we would need to keep another (json) file for that purpose.
If it is too much work though, we can start by only serializing as much as you need for visualizing the graph, it should be possible to extend the graphml serialization later.

@Anton-4
Copy link
Collaborator

Anton-4 commented Jan 24, 2019

I now found how I can cleanly add in nested xml. That issue was kind of holding me back.
I will make it work :)

@PaulSchweizer
Copy link
Owner Author

Amazing! Thanks @Anton-4

@PaulSchweizer
Copy link
Owner Author

@Anton-4 I'm planning to put some time into flowpipe over the next weeks and am browsing through the backlog here, trying to get back into it and do some planning. Let me know if you're still working on this

@Anton-4
Copy link
Collaborator

Anton-4 commented Jul 10, 2019

I have not continued working in this. This did require some work to define the complex types as explained here.
Feel free to continue working on the schema definition I started here.

@PaulSchweizer
Copy link
Owner Author

Perfect! Thanks for the links and the work you put into this already! I'm going to put some time into this after the compound plugs are done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants