JuliaGraphs / Graphs.jl

An optimized graphs package for the Julia programming language
http://juliagraphs.org/Graphs.jl/
Other
459 stars 91 forks source link

Add example of API implementation to the docs #307

Open gdalle opened 1 year ago

gdalle commented 1 year ago

Maybe even an interface check with RequiredInterfaces.jl? I think we can make it nonbreaking

gdalle commented 1 year ago

Prompted by this Discourse post: https://discourse.julialang.org/t/launching-the-graphs-community-calls/103880/7?u=gdalle

tpoisot commented 1 year ago

👋🏻 - I can open an issue documenting my attempts to implement the interface, if that helps.

gdalle commented 1 year ago

That would be very useful! No need for a separate issue though, you can just tell us what went wrong in this one?

tpoisot commented 1 year ago

@gdalle I meant a separate issue / pr on my own repo so I can track my progress!

I'll dig up my notes, but I think the issue was something with type parameters causing problems with some of the methods. It's been a while and I didn't spend more than an half an hour, so as soon as I have a chance to look up what happened, I'll report back with more.

tpoisot commented 1 year ago

One thing that would really help is a little test suite? Something like, "if your implementation is correct, you should be able to run x/y/z". So far, I'm able to map most of the interface to my own functions, but I'd feel a whole lot safer if I had a series of recommended tests I could run.

gdalle commented 1 year ago

Yeah I agree, and RequiredInterfaces.jl would be a first step in that direction. I think I can manage that before the next release. For a more extensive test suite, I think @simonschoelly's work on GenericGraph could be adapted?