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

Use Catlab through import only, or just reimplement basic Graph code #250

Closed
isaacsas opened this issue Aug 13, 2020 · 5 comments
Closed

Comments

@isaacsas
Copy link
Member

Currently I'm getting errors about both ModelingToolkit and Catlab exporting Expression.

Catlab is a relatively heavy dependency (though MT is heavier), so it might make sense to just copy over the limited Graphviz functionality/definitions we need (it isn't much).

@ChrisRackauckas
Copy link
Member

I would think it would make the most sense to have a Graphviz.jl that both take in. @jpfairbanks

@jpfairbanks
Copy link

Can’t you do import Catlab and import only what you need to fix that specific problem?

We are planning in the medium run to have a version of the GraphViz.Graph data structure, which should be a strongly typed Property Graph supporting loops, and multi edges, built on top of the Catlab.CategoricalAlgebra.CSet implementation. This will give us the ability to check that all the properties are valid in Julia rather than just creating a list of Graphviz statements and hoping that the user did it right. And this will give us a hierarchical language for specifying graph visualizations in terms of subgraph visualizations. I think that will be very powerful once implemented. So I don’t think we want to rush to fully decouple the GraphViz and Catlab codebases. @epatters might think differently about that.

There is probably a way to get the current functionality without Catlab, but that is trending in the opposite direction of our long term vision, where we use Catlab data structures (namely CSet) for more of the functionality.

@ChrisRackauckas
Copy link
Member

Since Catalyst isn't using the actual Catlab pieces here though, I think a package which just sets up the jll and has a bit of plotting code can still be useful (even for LightGraphs), even if Catlab heavily extends it.

@epatters
Copy link

Usually when I use the Graphviz module, I just import it, so write Graphviz.Node, Graphviz.Edge, etc.

Another solution would be to rename Expression to GraphvizExpr or something similar. I'd be fine with that, and it wouldn't break much code because it's just the abstract base type used internally.

@isaacsas
Copy link
Member Author

isaacsas commented Aug 24, 2020

Switched to importing in #251. When JuliaPackaging/Yggdrasil#1428 gets resolved we can switch to the jll and look into switching to a direct wrapper around it (i.e. something like Graphviz.jl).

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

No branches or pull requests

4 participants