Graphs.jl icon indicating copy to clipboard operation
Graphs.jl copied to clipboard

Move testing to `GenericGraph`

Open gdalle opened this issue 3 years ago • 3 comments

We recently introduced two types called GenericGraph and GenericDiGraph that wrap a SimpleGraph or a SimpleDiGraph. These generic types try to fulfill the AbstractGraph interface in a minimal way, while having no other methods implemented. The idea is then to test functions that can take an AbstractGraph with these generic types instead of simple graphs, in order to verify that they would indeed work with any AbstractGraph. Similar things can be found in the Julia standard library, for example Test.GenericArray and Test.GenericString.

Now we need to change our tests, so that they use the generic graph types, and try to spot and fix bugs that occur during that process. It is probably not possible to do this for all functions, but at least we can spot the places where that is the case.

Some progress has already been done or at least started in:

  • [x] test/biconnectivity #270
  • [x] test/centrality #272
  • [x] test/community #273
  • [x] test/cycles #274
  • [x] test/shortestpaths #275
  • [x] test/spanningtrees #276
  • [x] test/connectivity.jl #278
  • [x] test/core.jl #278
  • [x] test/degeneracy.jl #278
  • [x] test/distance.jl #278
  • [x] test/edit_distance.jl #278
  • [x] test/operators.jl #278

gdalle avatar Feb 09 '23 12:02 gdalle

I don't think this should be tagged as a v2.0 issue, there is no reason not to use GenericGraph right now.

simonschoelly avatar Jun 29 '23 18:06 simonschoelly

Fair enough

gdalle avatar Jun 29 '23 20:06 gdalle

@simonschoelly is there any more we can do on this end? I would keep the issue open though

gdalle avatar Sep 14 '23 09:09 gdalle