Fix infinite method call in forest_cover_edge_sequence; add tests.#170
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #170 +/- ##
==========================================
+ Coverage 78.99% 80.57% +1.58%
==========================================
Files 55 56 +1
Lines 2099 2111 +12
==========================================
+ Hits 1658 1701 +43
+ Misses 441 410 -31
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Looks good, ready to merge? Would this mean we don't need to define |
dac25b7 to
b8c3d8d
Compare
|
Looks like some downstream tests are failing, is the goal to make this PR non-breaking? |
|
The I am less bothered if |
I agree it isn't a huge deal if this PR is breaking, I just wanted to check if that is deliberate, check how easy it would be to make it non-breaking, inquire what specifically about the PR is breaking, etc. But also if it does break DataGraphs we should mark this PR as breaking with a minor version bump. |
For That should be the only place where code is breaking AFAIK. We can reverse this change, but it seems logical to move that function in this PR. |
Can we add a statement |
| function forest_cover(g::AbstractGraph; spanning_tree = spanning_tree) | ||
| edges_collected = edgetype(g)[] | ||
| g = similar_dataless_graph(g) | ||
| g_reduced = copy(g) |
There was a problem hiding this comment.
Probably doesn't matter too much, but I don't see what this copy is needed for since it doesn't look like the graph is being modified in-place. If it isn't needed we can just write g_reduced = g if the point is primarily to have a different variable name to use. I would just find that clearer since when I saw a copy I then expected to see an in-place operation somewhere.
The
forest_cover_edge_sequencemethod dispatching onAbstractNamedGraphwould call itself repeatedly as there was noforest_cover_edge_sequencemethod dispatching on concreteNamedGraph.I've removed this method as it was also not necessarily given the generic implementation of
forest_cover_edge_sequenceonAbstractGraph, and added some simple tests for this function.This PR also refactors the implementation of
similar_graph, moving this function back intoGraphsExtensions.