natverse / nat

NeuroAnatomy Toolbox: An R package for the (3D) visualisation and analysis of biological image data, especially tracings of single neurons.
https://natverse.org/nat/
62 stars 26 forks source link

Future igraph will consider the null graph disconnected #491

Closed szhorvat closed 2 years ago

szhorvat commented 2 years ago

Hello nat team,

I am writing on behalf of the igraph project. R/igraph 1.3.0 is due to be released soon and it includes a change that causes the nat test suite to fail. Specifically, the null graph (graph with zero vertices) is now considered disconnected, for reasons of consistency. The failure is coming from cases like this:

as.seglist.igraph(igraph::graph.empty())

(Note: the new name for graph.empty() has been make_empty_graph() for a while.)

Could you please update nat so that it no longer relies on is_connected(make_empty_graph()) being TRUE? Going forward it will be FALSE. You could simply check if vcount(graph) is zero, and if so, accept the graph.

If you are curious for why this change was made for igraph, some of the discussion is here: https://github.com/igraph/igraph/issues/1539

szhorvat commented 2 years ago

I guess this is fixed now, closing.