Skip to content

Conversation

krlmlr
Copy link
Contributor

@krlmlr krlmlr commented Aug 17, 2025

This shows the result of updating snapshot tests for the next branch. Also clearing the "embedding" and "games" tests.

  • snapshot tests
  • embedding shows too many failures, need to test independently
  • games sometimes hangs on my system
  • Error (test-iterators.R:9:5): iterators work
  • Error (test-iterators.R:190:3): identical_graphs considers attributes
  • Error (test-make.R:455:3): graph_from_lcf() works
  • Error (test-paths.R:5:3): radius() works
  • Error (test-paths.R:12:3): radius() works -- weights
  • Error (test-paths.R:22:3): radius() works -- lifecycle
  • Error (test-paths.R:29:3): eccentricity() works
  • Error (test-paths.R:36:3): eccentricity() works -- weights
  • Error (test-paths.R:46:3): eccentricity() works -- lifecycle
  • Error (test-print.R:45:5): print.igraph() works
  • Error (test-rewire.R:2:3): rewire(each_edge(mode='in')) keeps the in-degree distribution
  • Error (test-rewire.R:10:3): rewire(each_edge(mode='out')) keeps the out-degree
  • Error (test-rewire.R:18:3): rewire() with zero probability does not do anything
  • Error (test-similarity.R:3:3): similarity works
  • Error (test-topology.R:3:3): automorphisms works
  • Error (test-topology.R:12:3): automorphisms works with colored graphs
  • Error (test-topology.R:97:3): canonical_permutation works
  • Error (test-trees.R:10:3): is_tree works for non-trees
  • Error (test-trees.R:186:3): sample_spanning_tree works for connected graphs
  • Error (test-trees.R:210:3): sample_spanning_tree works for disconnected graphs
  • Error (test-trees.R:223:3): subgraph.edges deprecation
  • Error (test-structural-properties.R:68:3): max_degree() works
  • Error (test-structural-properties.R:379:3): all_shortest_paths() works
  • Error (test-structural-properties.R:416:3): shortest_paths() works
  • Error (test-structural-properties.R:806:3): mean_distance works correctly for
  • Error (test-structural-properties.R:834:3): mean_distance can provide details
  • Error (test-structural-properties.R:922:3): knn works
  • Error (test-centrality.R:53:3): authority_score() works
  • Error (test-centralization.R:25:3): centr_eigen works
  • Error (test-centrality.R:109:3): hub_score() works
  • Error (test-centrality.R:164:5): authority_score survives stress test
  • Error (test-centrality.R:197:3): hits_score() works -- authority
  • Error (test-centrality.R:245:3): hits_scores() works -- hub
  • Error (test-community.R:20:5): community detection functions work
  • Error (test-centrality.R:568:3): eigen_centrality() works
  • Error (test-centrality.R:690:3): spectrum() works for symmetric matrices
  • Error (test-centrality.R:821:3): eigen_centrality() deprecated scale argument
  • Error (test-community.R:196:3): label.propagation.community works
  • Error (test-glet.R:176:3): Graphlet projection works
  • Error (test-community.R:310:3): cluster_leiden works
  • Error (test-community.R:538:3): voronoi works with weights
  • Error (test-iterators.R:9:5): iterators work
  • Error (test-iterators.R:190:3): identical_graphs considers attributes
  • Error (test-minimum.spanning.tree.R:18:3): mst works
  • Error (test-make.R:455:3): graph_from_lcf() works
  • Error (test-paths.R:5:3): radius() works
  • Error (test-paths.R:12:3): radius() works -- weights
  • Error (test-paths.R:22:3): radius() works -- lifecycle
  • Error (test-paths.R:29:3): eccentricity() works
  • Error (test-paths.R:36:3): eccentricity() works -- weights
  • Error (test-paths.R:46:3): eccentricity() works -- lifecycle
  • Error (test-print.R:45:5): print.igraph() works
  • Error (test-rewire.R:2:3): rewire(each_edge(mode='in')) keeps the in-degree distribution
  • Error (test-rewire.R:10:3): rewire(each_edge(mode='out')) keeps the out-degree
  • Error (test-rewire.R:18:3): rewire() with zero probability does not do anything
  • Error (test-topology.R:3:3): automorphisms works
  • Error (test-topology.R:12:3): automorphisms works with colored graphs
  • Error (test-topology.R:97:3): canonical_permutation works
  • Error (test-similarity.R:3:3): similarity works
  • Error (test-structural-properties.R:68:3): max_degree() works
  • Error (test-trees.R:10:3): is_tree works for non-trees
  • Error (test-trees.R:186:3): sample_spanning_tree works for connected graphs
  • Error (test-trees.R:210:3): sample_spanning_tree works for disconnected graphs
  • Error (test-trees.R:223:3): subgraph.edges deprecation
  • Error (test-structural-properties.R:379:3): all_shortest_paths() works
  • Error (test-structural-properties.R:416:3): shortest_paths() works
  • Error (test-structural-properties.R:806:3): mean_distance works correctly for
  • Error (test-structural-properties.R:834:3): mean_distance can provide details
  • Error (test-structural-properties.R:922:3): knn works
  • Failure (test-layout.R:8:3): layout_with_fr() works
  • Failure (test-layout.R:14:3): layout_with_fr() works
  • Failure (test-paths.R:62:3): graph_center() works -- weights
  • Failure (test-structural-properties.R:455:3): k_shortest_paths() works with weights
  • Failure (test-structural-properties.R:456:3): k_shortest_paths() works with weights
  • Failure (test-structural-properties.R:457:3): k_shortest_paths() works with weights
  • Failure (test-structural-properties.R:458:3): k_shortest_paths() works with weights
  • Failure (test-structural-properties.R:997:3): feedback_vertex_set works with weights
  • Failure (test-operators.R:613:3): difference of named graphs works
  • Failure (test-operators.R:615:3): difference of named graphs works
  • Failure (test-cliques.R:62:3): weighted_cliques works
  • Failure (test-cliques.R:70:3): weighted_cliques works
  • Failure (test-layout.R:8:3): layout_with_fr() works
  • Failure (test-layout.R:14:3): layout_with_fr() works
  • Failure (test-paths.R:62:3): graph_center() works -- weights
  • Failure (test-operators.R:613:3): difference of named graphs works
  • Failure (test-operators.R:615:3): difference of named graphs works
  • Failure (test-structural-properties.R:455:3): k_shortest_paths() works with weights
  • Failure (test-structural-properties.R:456:3): k_shortest_paths() works with weights
  • Failure (test-structural-properties.R:457:3): k_shortest_paths() works with weights
  • Failure (test-structural-properties.R:458:3): k_shortest_paths() works with weights
  • Failure (test-structural-properties.R:997:3): feedback_vertex_set works with weights
  • Review chore: Update vendored sources to igraph/igraph@0f383457a13864b86a29eed4faf4efaade4c1254 #1299

We need to resolve this before vendoring on the next branch can resume.

@szhorvat: Can you please help?

─────────────────────────────────────────────────────────────────────────
Failure (test-layout.R:8:3): layout_with_fr() works
sum(l) (`actual`) not equal to 4.57228 (`expected`).

  `actual`: -12.9
`expected`:   4.6

Failure (test-layout.R:14:3): layout_with_fr() works
sum(l) (`actual`) not equal to -170.9312 (`expected`).

  `actual`:  272.1
`expected`: -170.9
─────────────────────────────────────────────────────────────────────────
✔ |         19 | motifs                                                  
✖ | 2       97 | iterators [1.6s]                                        
─────────────────────────────────────────────────────────────────────────
Error (test-iterators.R:9:5): iterators work
Error in `sample_pa(100, power = 0.3)`: At vendor/cigraph/src/games/barabasi.c:551 : Invalid out-degree sequence length. Invalid value
Backtrace:
    ▆
 1. ├─withr::with_seed(...) at test-iterators.R:8:3
 2. │ └─withr::with_preserve_seed(...)
 3. └─igraph::sample_pa(100, power = 0.3) at test-iterators.R:9:5

Error (test-iterators.R:190:3): identical_graphs considers attributes
Error in `sample_pa(10)`: At vendor/cigraph/src/games/barabasi.c:551 : Invalid out-degree sequence length. Invalid value
Backtrace:
    ▆
 1. └─igraph::sample_pa(10) at test-iterators.R:190:3
─────────────────────────────────────────────────────────────────────────
✔ |         12 | par                                                     
✖ | 1       72 | make [1.2s]                                             
─────────────────────────────────────────────────────────────────────────
Error (test-make.R:455:3): graph_from_lcf() works
Error in `lcf_vector_impl(n = n, shifts = shifts, repeats = repeats)`: could not find function "lcf_vector_impl"
Backtrace:
    ▆
 1. └─igraph::graph_from_lcf(shifts = c(5L, -5L), n = 12L, repeats = 6L) at test-make.R:455:3
─────────────────────────────────────────────────────────────────────────
✖ | 7        4 | paths                                                   
─────────────────────────────────────────────────────────────────────────
Error (test-paths.R:5:3): radius() works
Error in `radius_dijkstra_impl(graph, weights = weights, mode = mode)`: could not find function "radius_dijkstra_impl"
Backtrace:
    ▆
 1. ├─testthat::expect_equal(radius(g), 3) at test-paths.R:5:3
 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
 3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
 4. └─igraph::radius(g)

Error (test-paths.R:12:3): radius() works -- weights
Error in `radius_dijkstra_impl(graph, weights = weights, mode = mode)`: could not find function "radius_dijkstra_impl"
Backtrace:
    ▆
 1. ├─testthat::expect_equal(radius(g), 5) at test-paths.R:12:3
 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
 3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
 4. └─igraph::radius(g)

Error (test-paths.R:22:3): radius() works -- lifecycle
Error in `radius_dijkstra_impl(graph, weights = weights, mode = mode)`: could not find function "radius_dijkstra_impl"
Backtrace:
    ▆
 1. └─testthat::expect_snapshot(radius(g, "out")) at test-paths.R:22:3
 2.   └─rlang::cnd_signal(state$error)

Error (test-paths.R:29:3): eccentricity() works
Error in `eccentricity_dijkstra_impl(graph, vids = vids, weights = weights, 
    mode = mode)`: could not find function "eccentricity_dijkstra_impl"
Backtrace:
    ▆
 1. ├─testthat::expect_equal(...) at test-paths.R:29:3
 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
 3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
 4. └─igraph::eccentricity(g)

Error (test-paths.R:36:3): eccentricity() works -- weights
Error in `eccentricity_dijkstra_impl(graph, vids = vids, weights = weights, 
    mode = mode)`: could not find function "eccentricity_dijkstra_impl"
Backtrace:
    ▆
 1. ├─testthat::expect_equal(eccentricity(g), rep(5, 10)) at test-paths.R:36:3
 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
 3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
 4. └─igraph::eccentricity(g)

Error (test-paths.R:46:3): eccentricity() works -- lifecycle
Error in `eccentricity_dijkstra_impl(graph, vids = vids, weights = weights, 
    mode = mode)`: could not find function "eccentricity_dijkstra_impl"
Backtrace:
    ▆
 1. └─testthat::expect_snapshot(eccentricity(g, vids = V(g), "out")) at test-paths.R:46:3
 2.   └─rlang::cnd_signal(state$error)

Failure (test-paths.R:62:3): graph_center() works -- weights
as.numeric(graph_center(g)) (`actual`) not equal to 7 (`expected`).

  `actual`: 1 2 3 4 5 6 7 8 9 10
`expected`: 7                   
─────────────────────────────────────────────────────────────────────────
✔ |         12 | other                                                   
✖ | 1       18 | print                                                   
─────────────────────────────────────────────────────────────────────────
Error (test-print.R:45:5): print.igraph() works
Error in `sample_pa(100, m = 6, directed = FALSE)`: At vendor/cigraph/src/games/barabasi.c:551 : Invalid out-degree sequence length. Invalid value
Backtrace:
    ▆
 1. ├─withr::with_seed(...) at test-print.R:44:3
 2. │ └─withr::with_preserve_seed(...)
 3. └─igraph::sample_pa(100, m = 6, directed = FALSE) at test-print.R:45:5
─────────────────────────────────────────────────────────────────────────
✔ |         17 | random_walk                                             
✖ | 3        0 | rewire                                                  
─────────────────────────────────────────────────────────────────────────
Error (test-rewire.R:2:3): rewire(each_edge(mode='in')) keeps the in-degree distribution
Error in `sample_pa(1000)`: At vendor/cigraph/src/games/barabasi.c:551 : Invalid out-degree sequence length. Invalid value
Backtrace:
    ▆
 1. └─igraph::sample_pa(1000) at test-rewire.R:2:3

Error (test-rewire.R:10:3): rewire(each_edge(mode='out')) keeps the out-degree distribution
Error in `sample_pa(1000)`: At vendor/cigraph/src/games/barabasi.c:551 : Invalid out-degree sequence length. Invalid value
Backtrace:
    ▆
 1. └─igraph::sample_pa(1000) at test-rewire.R:10:3

Error (test-rewire.R:18:3): rewire() with zero probability does not do anything
Error in `sample_pa(100)`: At vendor/cigraph/src/games/barabasi.c:551 : Invalid out-degree sequence length. Invalid value
Backtrace:
    ▆
 1. └─igraph::sample_pa(100) at test-rewire.R:18:3
─────────────────────────────────────────────────────────────────────────
✔ |          7 | sgm                                                     
✔ |         16 | plot [1.0s]                                             
✔ |         12 | sparsedf                                                
✔ |          2 | stochastic_matrix                                       
✔ |         81 | sir                                                     
✔ |         12 | structure.info                                          
✖ | 1 1      0 | similarity                                              
─────────────────────────────────────────────────────────────────────────
Warning (test-similarity.R:3:3): similarity works
NAs introduced by coercion
Backtrace:
    ▆
 1. └─igraph::similarity(g, method = "dice") at test-similarity.R:3:3
 2.   └─igraph:::similarity_dice_impl(graph, vids, mode, loops) at igraph/R/similarity.R:73:5
 3.     └─igraph:::as_igraph_vs(graph, vit.to) at igraph/R/aaa-auto.R:2773:3

Error (test-similarity.R:3:3): similarity works
Error in `as_igraph_vs(graph, vit.to)`: Invalid vertex name(s)
Backtrace:
    ▆
 1. └─igraph::similarity(g, method = "dice") at test-similarity.R:3:3
 2.   └─igraph:::similarity_dice_impl(graph, vids, mode, loops) at igraph/R/similarity.R:73:5
 3.     └─igraph:::as_igraph_vs(graph, vit.to) at igraph/R/aaa-auto.R:2773:3
 4.       └─cli::cli_abort("Invalid vertex name(s)") at igraph/R/iterators.R:1578:7
 5.         └─rlang::abort(...)
─────────────────────────────────────────────────────────────────────────
✖ | 3      253 | topology [1.3s]                                         
─────────────────────────────────────────────────────────────────────────
Error (test-topology.R:3:3): automorphisms works
Error in `count_automorphisms(ring)$group_size`: $ operator is invalid for atomic vectors
Backtrace:
    ▆
 1. └─testthat::expect_equal(...) at test-topology.R:3:3
 2.   └─testthat::quasi_label(enquo(object), label, arg = "object")
 3.     └─rlang::eval_bare(expr, quo_get_env(quo))

Error (test-topology.R:12:3): automorphisms works with colored graphs
Error in `count_automorphisms(g, colors = c(1, 2, 1, 2))$group_size`: $ operator is invalid for atomic vectors
Backtrace:
    ▆
 1. └─testthat::expect_equal(...) at test-topology.R:12:3
 2.   └─testthat::quasi_label(enquo(object), label, arg = "object")
 3.     └─rlang::eval_bare(expr, quo_get_env(quo))

Error (test-topology.R:97:3): canonical_permutation works
Error in `cp1$labeling`: $ operator is invalid for atomic vectors
Backtrace:
    ▆
 1. └─igraph::permute(g1, cp1$labeling) at test-topology.R:97:3
─────────────────────────────────────────────────────────────────────────
✖ | 4       68 | trees                                                   
─────────────────────────────────────────────────────────────────────────
Error (test-trees.R:10:3): is_tree works for non-trees
Error in `sample_pa(15, m = 3)`: At vendor/cigraph/src/games/barabasi.c:551 : Invalid out-degree sequence length. Invalid value
Backtrace:
    ▆
 1. └─igraph::sample_pa(15, m = 3) at test-trees.R:10:3

Error (test-trees.R:186:3): sample_spanning_tree works for connected graphs
Error in `random_spanning_tree_impl(graph, vid)`: No vertex was specified
Backtrace:
    ▆
 1. └─igraph::sample_spanning_tree(g) at test-trees.R:186:3
 2.   └─igraph:::random_spanning_tree_impl(graph, vid) at igraph/R/trees.R:156:3

Error (test-trees.R:210:3): sample_spanning_tree works for disconnected graphs
Error in `random_spanning_tree_impl(graph, vid)`: No vertex was specified
Backtrace:
    ▆
 1. └─igraph::sample_spanning_tree(g) at test-trees.R:210:3
 2.   └─igraph:::random_spanning_tree_impl(graph, vid) at igraph/R/trees.R:156:3

Error (test-trees.R:223:3): subgraph.edges deprecation
Error in `random_spanning_tree_impl(graph, vid)`: No vertex was specified
Backtrace:
    ▆
 1. └─igraph::sample_spanning_tree(g) at test-trees.R:223:3
 2.   └─igraph:::random_spanning_tree_impl(graph, vid) at igraph/R/trees.R:156:3
─────────────────────────────────────────────────────────────────────────
✔ |         11 | triangles                                               
✔ |          6 | utils-assert-args                                       
✔ |         24 | versions                                                
✖ | 11    1 155 | structural-properties [3.1s]                           
─────────────────────────────────────────────────────────────────────────
Error (test-structural-properties.R:68:3): max_degree() works
Error in `max_degree(g, loops = FALSE)`: `loops` must be one of "twice", "none", or "once", not "false".
Backtrace:
    ▆
 1. ├─testthat::expect_equal(max_degree(g, loops = FALSE), 2) at test-structural-properties.R:68:3
 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
 3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
 4. ├─igraph::max_degree(loops = FALSE)
 5. │ └─igraph:::igraph.match.arg(loops) at igraph/R/aaa-auto.R:1396:3
 6. │   └─rlang::arg_match(...) at igraph/R/utils-assert-args.R:34:3
 7. │     └─rlang::arg_match0(arg, values, error_arg, error_call = error_call)
 8. └─rlang:::stop_arg_match(w, values = x, error_arg = y, error_call = z)
 9.   └─rlang::abort(msg, call = error_call, arg = error_arg)

Error (test-structural-properties.R:379:3): all_shortest_paths() works
Error in `get_all_shortest_paths_dijkstra_impl(graph, from = from, to = to, 
    weights = weights, mode = mode)`: REAL() can only be applied to a 'numeric', not a 'logical'
Backtrace:
    ▆
 1. └─igraph::all_shortest_paths(g, "s", "t", weights = NA) at test-structural-properties.R:379:3
 2.   └─igraph:::get_all_shortest_paths_dijkstra_impl(...) at igraph/R/structural-properties.R:1383:5

Error (test-structural-properties.R:416:3): shortest_paths() works
Error in `get_all_shortest_paths_dijkstra_impl(graph, from = from, to = to, 
    weights = weights, mode = mode)`: REAL() can only be applied to a 'numeric', not a 'logical'
Backtrace:
    ▆
 1. └─igraph::all_shortest_paths(g, "s", "t", weights = NA) at test-structural-properties.R:416:3
 2.   └─igraph:::get_all_shortest_paths_dijkstra_impl(...) at igraph/R/structural-properties.R:1383:5

Failure (test-structural-properties.R:455:3): k_shortest_paths() works with weights
as.numeric(res$vpaths[[1]]) (`actual`) not equal to c(1, 3, 2) (`expected`).

  `actual`: 1 2  
`expected`: 1 3 2

Failure (test-structural-properties.R:456:3): k_shortest_paths() works with weights
as.numeric(res$epaths[[1]]) (`actual`) not equal to c(2, 3) (`expected`).

  `actual`: 1  
`expected`: 2 3

Failure (test-structural-properties.R:457:3): k_shortest_paths() works with weights
as.numeric(res$vpaths[[2]]) (`actual`) not equal to c(1, 2) (`expected`).

  `actual`: 1 3 2
`expected`: 1   2

Failure (test-structural-properties.R:458:3): k_shortest_paths() works with weights
as.numeric(res$epaths[[2]]) (`actual`) not equal to c(1) (`expected`).

  `actual`: 2 3
`expected`: 1  

Error (test-structural-properties.R:806:3): mean_distance works correctly for disconnected graphs
Error in `mean_distance(g, unconnected = FALSE)`: unused argument (unconnected = FALSE)

Error (test-structural-properties.R:834:3): mean_distance can provide details
Error in `mean_distance(g, details = TRUE, unconnected = TRUE)`: unused argument (unconnected = TRUE)

Error (test-structural-properties.R:922:3): knn works
Error in `sample_pa(1000, m = 5)`: At vendor/cigraph/src/games/barabasi.c:551 : Invalid out-degree sequence length. Invalid value
Backtrace:
    ▆
 1. ├─igraph::simplify(sample_pa(1000, m = 5)) at test-structural-properties.R:922:3
 2. │ └─igraph:::ensure_igraph(graph) at igraph/R/aaa-auto.R:1300:3
 3. └─igraph::sample_pa(1000, m = 5) at igraph/R/utils-assert-args.R:2:3

Failure (test-structural-properties.R:997:3): feedback_vertex_set works with weights
as.vector(fvs) (`actual`) not equal to c(5) (`expected`).

  `actual`: 1.0
`expected`: 5.0
─────────────────────────────────────────────────────────────────────────
✖ | 2      320 | operators [6.2s]                                        
─────────────────────────────────────────────────────────────────────────
Failure (test-operators.R:613:3): difference of named graphs works
df1$edges (`actual`) not equal to `t1.e` (`expected`).

`attr(actual, 'row.names')[14:18]`:   "14" "15" "16" "17" "18"
`attr(expected, 'row.names')[14:16]`: "14" "15" "16"          

actual vs expected
                 from to
- actual[1, ]       a  k
+ expected[1, ]     a  j
- actual[2, ]       a  j
+ expected[2, ]     b  k
- actual[3, ]       b  k
+ expected[3, ]     c  d
- actual[4, ]       c  d
+ expected[4, ]     j  k
- actual[5, ]       c  k
+ expected[5, ]     i  k
- actual[6, ]       d  e
+ expected[6, ]     h  k
- actual[7, ]       k  e
+ expected[7, ]     g  k
- actual[8, ]       f  e
+ expected[8, ]     f  k
- actual[9, ]       f  k
+ expected[9, ]     e  k
- actual[10, ]      f  g
+ expected[10, ]    d  k
and 9 more ...

`actual$from`:         "a" "a" "b" "c" "c" "d" "k" "f" "f" "f" and 8 more...
`expected$from[2:16]`: "b" "c" "j" "i" "h" "g" "f" "e" "d" "d" ...          

`actual$to`:         "k" "j" "k" "d" "k" "e" "e" "e" "k" "g" and 8 more...
`expected$to[2:16]`: "k" "d" "k" "k" "k" "k" "k" "k" "k" "e" ...          

Failure (test-operators.R:615:3): difference of named graphs works
df1$vertices (`actual`) not equal to data.frame(row.names = letters[1:11], name = letters[1:11], stringsAsFactors = FALSE) (`expected`).

     attr(actual, 'row.names') | attr(expected, 'row.names')               
 [1] "a"                       | "a"                         [1]           
 [2] "b"                       | "b"                         [2]           
 [3] "c"                       | "c"                         [3]           
 [4] "f"                       - "d"                         [4]           
 [5] "g"                       - "e"                         [5]           
 [6] "h"                       - "f"                         [6]           
 [7] "i"                       - "g"                         [7]           
 [8] "j"                       - "h"                         [8]           
 [9] "k"                       - "i"                         [9]           
[10] "d"                       - "j"                         [10]          
 ... ...                         ...                         and 1 more ...

actual vs expected
                 name
  actual[1, ]       a
  actual[2, ]       b
  actual[3, ]       c
- actual[4, ]       f
+ expected[4, ]     d
- actual[5, ]       g
+ expected[5, ]     e
- actual[6, ]       h
+ expected[6, ]     f
- actual[7, ]       i
+ expected[7, ]     g
- actual[8, ]       j
+ expected[8, ]     h
- actual[9, ]       k
+ expected[9, ]     i
- actual[10, ]      d
+ expected[10, ]    j
and 1 more ...

`actual$name`:   "a" "b" "c" "f" "g" "h" "i" "j" "k" "d" and 1 more...
`expected$name`: "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" ...          
─────────────────────────────────────────────────────────────────────────
⠇ [ FAIL 54 | WARN 1 | SKIP 2 | PASS 3231 ] @ hrg                        Error (test-centrality.R:53:3): `authority_score()` works
Error in `hub_and_authority_scores_impl(graph = graph, scale = scale, weights = weights, 
    options = options)`: unused argument (scale = scale)
Backtrace:
    ▆
 1. └─igraph::authority_score(g1) at test-centrality.R:53:3
 2.   └─igraph::hits_scores(...) at igraph/R/centrality.R:1586:3

Error (test-centralization.R:25:3): centr_eigen works
Error in `centralization_eigenvector_centrality_impl(graph = graph, directed = directed, 
    options = options, normalized = normalized, scale = TRUE)`: unused arguments (directed = directed, scale = TRUE)
Backtrace:
    ▆
 1. └─igraph::centr_eigen(g, normalized = FALSE) at test-centralization.R:25:3

Failure (test-cliques.R:62:3): weighted_cliques works
`cl` (`actual`) not equal to rep(TRUE, 14) (`expected`).

`actual` is a list
`expected` is a logical vector (TRUE, TRUE, TRUE, TRUE, TRUE, ...)

Failure (test-cliques.R:70:3): weighted_cliques works
weighted_clique_num(karate) (`actual`) not equal to 30 (`expected`).

  `actual`:  5.0
`expected`: 30.0

Error (test-centrality.R:109:3): `hub_score()` works
Error in `hub_and_authority_scores_impl(graph = graph, scale = scale, weights = weights, 
    options = options)`: unused argument (scale = scale)
Backtrace:
    ▆
 1. └─igraph::hub_score(g1) at test-centrality.R:109:3
 2.   └─igraph::hits_scores(...) at igraph/R/centrality.R:1631:3

Error (test-centrality.R:164:5): authority_score survives stress test
Error in `hub_and_authority_scores_impl(graph = graph, scale = scale, weights = weights, 
    options = options)`: unused argument (scale = scale)
Backtrace:
    ▆
 1. └─igraph::hits_scores(G) at test-centrality.R:164:5

Error (test-centrality.R:197:3): `hits_score()` works -- authority
Error in `hub_and_authority_scores_impl(graph = graph, scale = scale, weights = weights, 
    options = options)`: unused argument (scale = scale)
Backtrace:
    ▆
 1. └─igraph::hits_scores(g1) at test-centrality.R:197:3

Error (test-centrality.R:245:3): `hits_scores()` works -- hub
Error in `hub_and_authority_scores_impl(graph = graph, scale = scale, weights = weights, 
    options = options)`: unused argument (scale = scale)
Backtrace:
    ▆
 1. └─igraph::hits_scores(g1) at test-centrality.R:245:3

Error (test-community.R:20:5): community detection functions work
Error in `eval(formal.args[[deparse(substitute(arg))]])`: argument is missing, with no default
Backtrace:
    ▆
 1. ├─base::do.call(algo, list(karate)) at test-community.R:20:5
 2. └─igraph::cluster_label_prop(`<igraph>`)
 3.   └─igraph:::cluster_label_prop0(graph, weights, mode, initial, fixed) at igraph/R/community.R:2396:3
 4.     └─igraph:::community_label_propagation_impl(...) at igraph/R/community.R:2413:3
 5.       └─igraph:::igraph.match.arg(lpa.variant) at igraph/R/aaa-auto.R:2924:3

Error (test-centrality.R:568:3): eigen_centrality() works
Error in `eigenvector_centrality_impl(graph = graph, directed = directed, 
    scale = TRUE, weights = weights, options = options)`: unused arguments (directed = directed, scale = TRUE)
Backtrace:
    ▆
 1. └─igraph::eigen_centrality(kite) at test-centrality.R:568:3

Error (test-centrality.R:690:3): spectrum() works for symmetric matrices
Error in `eigen_adjacency_impl(graph, algorithm = algorithm, which = which, 
    options = options)`: argument "storage" is missing, with no default
Backtrace:
    ▆
 1. └─igraph::spectrum(g, which = list(howmany = 4, pos = "LA")) at test-centrality.R:690:3
 2.   └─igraph:::eigen_adjacency_impl(...) at igraph/R/centrality.R:1247:3

Error (test-centrality.R:821:3): eigen_centrality() deprecated scale argument
Error in `eigenvector_centrality_impl(graph = graph, directed = directed, 
    scale = TRUE, weights = weights, options = options)`: unused arguments (directed = directed, scale = TRUE)
Backtrace:
    ▆
 1. └─testthat::expect_snapshot(...) at test-centrality.R:821:3
 2.   └─rlang::cnd_signal(state$error)

Error (test-community.R:196:3): label.propagation.community works
Error in `eval(formal.args[[deparse(substitute(arg))]])`: argument is missing, with no default
Backtrace:
    ▆
 1. └─igraph::cluster_label_prop(karate) at test-community.R:196:3
 2.   └─igraph:::cluster_label_prop0(graph, weights, mode, initial, fixed) at igraph/R/community.R:2396:3
 3.     └─igraph:::community_label_propagation_impl(...) at igraph/R/community.R:2413:3
 4.       └─igraph:::igraph.match.arg(lpa.variant) at igraph/R/aaa-auto.R:2924:3

Error (test-glet.R:176:3): Graphlet projection works
Error in `graphlets(g)`: At vendor/cigraph/src/cliques/glet.c:553 : Graphlet functions require weighted graphs, Invalid value
Backtrace:
    ▆
 1. └─igraph::graphlets(g) at test-glet.R:176:3

Error (test-community.R:310:3): cluster_leiden works
Error in `community_leiden_impl(graph, weights = weights, vertex.weights = vertex_weights, 
    resolution = resolution, beta = beta, start = !is.null(membership), 
    n.iterations = n_iterations, membership = membership)`: unused argument (vertex.weights = vertex_weights)
Backtrace:
    ▆
 1. └─igraph::cluster_leiden(karate, resolution = 0.06) at test-community.R:310:3

Error (test-community.R:538:3): voronoi works with weights
Error in `voronoi_cells(make_ring(10), c(1, 6), weights = 1:10)`: REAL() can only be applied to a 'numeric', not a 'integer'
Backtrace:
    ▆
 1. └─igraph::voronoi_cells(make_ring(10), c(1, 6), weights = 1:10) at test-community.R:538:3

Error (test-iterators.R:9:5): iterators work
Error in `sample_pa(100, power = 0.3)`: At vendor/cigraph/src/games/barabasi.c:551 : Invalid out-degree sequence length. Invalid value
Backtrace:
    ▆
 1. ├─withr::with_seed(...) at test-iterators.R:8:3
 2. │ └─withr::with_preserve_seed(...)
 3. └─igraph::sample_pa(100, power = 0.3) at test-iterators.R:9:5

Failure (test-layout.R:8:3): layout_with_fr() works
sum(l) (`actual`) not equal to 4.57228 (`expected`).

  `actual`: -12.9
`expected`:   4.6

Failure (test-layout.R:14:3): layout_with_fr() works
sum(l) (`actual`) not equal to -170.9312 (`expected`).

  `actual`:  272.1
`expected`: -170.9

Error (test-iterators.R:190:3): identical_graphs considers attributes
Error in `sample_pa(10)`: At vendor/cigraph/src/games/barabasi.c:551 : Invalid out-degree sequence length. Invalid value
Backtrace:
    ▆
 1. └─igraph::sample_pa(10) at test-iterators.R:190:3

Error (test-minimum.spanning.tree.R:18:3): mst works
Error in `mst(g)`: At vendor/cigraph/src/core/vector.pmt:535 : Assertion failed: v->stor_begin != NULL. This is an unexpected igraph error; please report this as a bug, along with the steps to reproduce it.
Please restart your R session to avoid crashes or other surprising behavior.
Backtrace:
    ▆
 1. └─igraph::mst(g) at test-minimum.spanning.tree.R:18:3

Error (test-make.R:455:3): graph_from_lcf() works
Error in `lcf_vector_impl(n = n, shifts = shifts, repeats = repeats)`: could not find function "lcf_vector_impl"
Backtrace:
    ▆
 1. └─igraph::graph_from_lcf(shifts = c(5L, -5L), n = 12L, repeats = 6L) at test-make.R:455:3

Error (test-paths.R:5:3): radius() works
Error in `radius_dijkstra_impl(graph, weights = weights, mode = mode)`: could not find function "radius_dijkstra_impl"
Backtrace:
    ▆
 1. ├─testthat::expect_equal(radius(g), 3) at test-paths.R:5:3
 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
 3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
 4. └─igraph::radius(g)

Error (test-paths.R:12:3): radius() works -- weights
Error in `radius_dijkstra_impl(graph, weights = weights, mode = mode)`: could not find function "radius_dijkstra_impl"
Backtrace:
    ▆
 1. ├─testthat::expect_equal(radius(g), 5) at test-paths.R:12:3
 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
 3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
 4. └─igraph::radius(g)

Error (test-paths.R:22:3): radius() works -- lifecycle
Error in `radius_dijkstra_impl(graph, weights = weights, mode = mode)`: could not find function "radius_dijkstra_impl"
Backtrace:
    ▆
 1. └─testthat::expect_snapshot(radius(g, "out")) at test-paths.R:22:3
 2.   └─rlang::cnd_signal(state$error)

Error (test-paths.R:29:3): eccentricity() works
Error in `eccentricity_dijkstra_impl(graph, vids = vids, weights = weights, 
    mode = mode)`: could not find function "eccentricity_dijkstra_impl"
Backtrace:
    ▆
 1. ├─testthat::expect_equal(...) at test-paths.R:29:3
 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
 3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
 4. └─igraph::eccentricity(g)

Error (test-paths.R:36:3): eccentricity() works -- weights
Error in `eccentricity_dijkstra_impl(graph, vids = vids, weights = weights, 
    mode = mode)`: could not find function "eccentricity_dijkstra_impl"
Backtrace:
    ▆
 1. ├─testthat::expect_equal(eccentricity(g), rep(5, 10)) at test-paths.R:36:3
 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
 3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
 4. └─igraph::eccentricity(g)

Error (test-paths.R:46:3): eccentricity() works -- lifecycle
Error in `eccentricity_dijkstra_impl(graph, vids = vids, weights = weights, 
    mode = mode)`: could not find function "eccentricity_dijkstra_impl"
Backtrace:
    ▆
 1. └─testthat::expect_snapshot(eccentricity(g, vids = V(g), "out")) at test-paths.R:46:3
 2.   └─rlang::cnd_signal(state$error)

Failure (test-paths.R:62:3): graph_center() works -- weights
as.numeric(graph_center(g)) (`actual`) not equal to 7 (`expected`).

  `actual`: 1 2 3 4 5 6 7 8 9 10
`expected`: 7                   

Failure (test-operators.R:613:3): difference of named graphs works
df1$edges (`actual`) not equal to `t1.e` (`expected`).

`attr(actual, 'row.names')[14:18]`:   "14" "15" "16" "17" "18"
`attr(expected, 'row.names')[14:16]`: "14" "15" "16"          

actual vs expected
                 from to
- actual[1, ]       a  k
+ expected[1, ]     a  j
- actual[2, ]       a  j
+ expected[2, ]     b  k
- actual[3, ]       b  k
+ expected[3, ]     c  d
- actual[4, ]       c  d
+ expected[4, ]     j  k
- actual[5, ]       c  k
+ expected[5, ]     i  k
- actual[6, ]       d  e
+ expected[6, ]     h  k
- actual[7, ]       k  e
+ expected[7, ]     g  k
- actual[8, ]       f  e
+ expected[8, ]     f  k
- actual[9, ]       f  k
+ expected[9, ]     e  k
- actual[10, ]      f  g
+ expected[10, ]    d  k
and 9 more ...

`actual$from`:         "a" "a" "b" "c" "c" "d" "k" "f" "f" "f" and 8 more...
`expected$from[2:16]`: "b" "c" "j" "i" "h" "g" "f" "e" "d" "d" ...          

`actual$to`:         "k" "j" "k" "d" "k" "e" "e" "e" "k" "g" and 8 more...
`expected$to[2:16]`: "k" "d" "k" "k" "k" "k" "k" "k" "k" "e" ...          

Error (test-print.R:45:5): print.igraph() works
Error in `sample_pa(100, m = 6, directed = FALSE)`: At vendor/cigraph/src/games/barabasi.c:551 : Invalid out-degree sequence length. Invalid value
Backtrace:
    ▆
 1. ├─withr::with_seed(...) at test-print.R:44:3
 2. │ └─withr::with_preserve_seed(...)
 3. └─igraph::sample_pa(100, m = 6, directed = FALSE) at test-print.R:45:5

Failure (test-operators.R:615:3): difference of named graphs works
df1$vertices (`actual`) not equal to data.frame(row.names = letters[1:11], name = letters[1:11], stringsAsFactors = FALSE) (`expected`).

     attr(actual, 'row.names') | attr(expected, 'row.names')               
 [1] "a"                       | "a"                         [1]           
 [2] "b"                       | "b"                         [2]           
 [3] "c"                       | "c"                         [3]           
 [4] "f"                       - "d"                         [4]           
 [5] "g"                       - "e"                         [5]           
 [6] "h"                       - "f"                         [6]           
 [7] "i"                       - "g"                         [7]           
 [8] "j"                       - "h"                         [8]           
 [9] "k"                       - "i"                         [9]           
[10] "d"                       - "j"                         [10]          
 ... ...                         ...                         and 1 more ...

actual vs expected
                 name
  actual[1, ]       a
  actual[2, ]       b
  actual[3, ]       c
- actual[4, ]       f
+ expected[4, ]     d
- actual[5, ]       g
+ expected[5, ]     e
- actual[6, ]       h
+ expected[6, ]     f
- actual[7, ]       i
+ expected[7, ]     g
- actual[8, ]       j
+ expected[8, ]     h
- actual[9, ]       k
+ expected[9, ]     i
- actual[10, ]      d
+ expected[10, ]    j
and 1 more ...

`actual$name`:   "a" "b" "c" "f" "g" "h" "i" "j" "k" "d" and 1 more...
`expected$name`: "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" ...          

Error (test-rewire.R:2:3): rewire(each_edge(mode='in')) keeps the in-degree distribution
Error in `sample_pa(1000)`: At vendor/cigraph/src/games/barabasi.c:551 : Invalid out-degree sequence length. Invalid value
Backtrace:
    ▆
 1. └─igraph::sample_pa(1000) at test-rewire.R:2:3

Error (test-rewire.R:10:3): rewire(each_edge(mode='out')) keeps the out-degree distribution
Error in `sample_pa(1000)`: At vendor/cigraph/src/games/barabasi.c:551 : Invalid out-degree sequence length. Invalid value
Backtrace:
    ▆
 1. └─igraph::sample_pa(1000) at test-rewire.R:10:3

Error (test-rewire.R:18:3): rewire() with zero probability does not do anything
Error in `sample_pa(100)`: At vendor/cigraph/src/games/barabasi.c:551 : Invalid out-degree sequence length. Invalid value
Backtrace:
    ▆
 1. └─igraph::sample_pa(100) at test-rewire.R:18:3

Error (test-topology.R:3:3): automorphisms works
Error in `count_automorphisms(ring)$group_size`: $ operator is invalid for atomic vectors
Backtrace:
    ▆
 1. └─testthat::expect_equal(...) at test-topology.R:3:3
 2.   └─testthat::quasi_label(enquo(object), label, arg = "object")
 3.     └─rlang::eval_bare(expr, quo_get_env(quo))

Error (test-topology.R:12:3): automorphisms works with colored graphs
Error in `count_automorphisms(g, colors = c(1, 2, 1, 2))$group_size`: $ operator is invalid for atomic vectors
Backtrace:
    ▆
 1. └─testthat::expect_equal(...) at test-topology.R:12:3
 2.   └─testthat::quasi_label(enquo(object), label, arg = "object")
 3.     └─rlang::eval_bare(expr, quo_get_env(quo))

Error (test-topology.R:97:3): canonical_permutation works
Error in `cp1$labeling`: $ operator is invalid for atomic vectors
Backtrace:
    ▆
 1. └─igraph::permute(g1, cp1$labeling) at test-topology.R:97:3

Error (test-similarity.R:3:3): similarity works
Error in `as_igraph_vs(graph, vit.to)`: Invalid vertex name(s)
Backtrace:
    ▆
 1. └─igraph::similarity(g, method = "dice") at test-similarity.R:3:3
 2.   └─igraph:::similarity_dice_impl(graph, vids, mode, loops) at igraph/R/similarity.R:73:5
 3.     └─igraph:::as_igraph_vs(graph, vit.to) at igraph/R/aaa-auto.R:2773:3
 4.       └─cli::cli_abort("Invalid vertex name(s)") at igraph/R/iterators.R:1578:7
 5.         └─rlang::abort(...)

Error (test-structural-properties.R:68:3): max_degree() works
Error in `max_degree(g, loops = FALSE)`: `loops` must be one of "twice", "none", or "once", not "false".
Backtrace:
    ▆
 1. ├─testthat::expect_equal(max_degree(g, loops = FALSE), 2) at test-structural-properties.R:68:3
 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
 3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
 4. ├─igraph::max_degree(loops = FALSE)
 5. │ └─igraph:::igraph.match.arg(loops) at igraph/R/aaa-auto.R:1396:3
 6. │   └─rlang::arg_match(...) at igraph/R/utils-assert-args.R:34:3
 7. │     └─rlang::arg_match0(arg, values, error_arg, error_call = error_call)
 8. └─rlang:::stop_arg_match(w, values = x, error_arg = y, error_call = z)
 9.   └─rlang::abort(msg, call = error_call, arg = error_arg)

Error (test-trees.R:10:3): is_tree works for non-trees
Error in `sample_pa(15, m = 3)`: At vendor/cigraph/src/games/barabasi.c:551 : Invalid out-degree sequence length. Invalid value
Backtrace:
    ▆
 1. └─igraph::sample_pa(15, m = 3) at test-trees.R:10:3

Error (test-trees.R:186:3): sample_spanning_tree works for connected graphs
Error in `random_spanning_tree_impl(graph, vid)`: No vertex was specified
Backtrace:
    ▆
 1. └─igraph::sample_spanning_tree(g) at test-trees.R:186:3
 2.   └─igraph:::random_spanning_tree_impl(graph, vid) at igraph/R/trees.R:156:3

Error (test-trees.R:210:3): sample_spanning_tree works for disconnected graphs
Error in `random_spanning_tree_impl(graph, vid)`: No vertex was specified
Backtrace:
    ▆
 1. └─igraph::sample_spanning_tree(g) at test-trees.R:210:3
 2.   └─igraph:::random_spanning_tree_impl(graph, vid) at igraph/R/trees.R:156:3

Error (test-trees.R:223:3): subgraph.edges deprecation
Error in `random_spanning_tree_impl(graph, vid)`: No vertex was specified
Backtrace:
    ▆
 1. └─igraph::sample_spanning_tree(g) at test-trees.R:223:3
 2.   └─igraph:::random_spanning_tree_impl(graph, vid) at igraph/R/trees.R:156:3

Error (test-structural-properties.R:379:3): all_shortest_paths() works
Error in `get_all_shortest_paths_dijkstra_impl(graph, from = from, to = to, 
    weights = weights, mode = mode)`: REAL() can only be applied to a 'numeric', not a 'logical'
Backtrace:
    ▆
 1. └─igraph::all_shortest_paths(g, "s", "t", weights = NA) at test-structural-properties.R:379:3
 2.   └─igraph:::get_all_shortest_paths_dijkstra_impl(...) at igraph/R/structural-properties.R:1383:5

Error (test-structural-properties.R:416:3): shortest_paths() works
Error in `get_all_shortest_paths_dijkstra_impl(graph, from = from, to = to, 
    weights = weights, mode = mode)`: REAL() can only be applied to a 'numeric', not a 'logical'
Backtrace:
    ▆
 1. └─igraph::all_shortest_paths(g, "s", "t", weights = NA) at test-structural-properties.R:416:3
 2.   └─igraph:::get_all_shortest_paths_dijkstra_impl(...) at igraph/R/structural-properties.R:1383:5

Failure (test-structural-properties.R:455:3): k_shortest_paths() works with weights
as.numeric(res$vpaths[[1]]) (`actual`) not equal to c(1, 3, 2) (`expected`).

  `actual`: 1 2  
`expected`: 1 3 2

Failure (test-structural-properties.R:456:3): k_shortest_paths() works with weights
as.numeric(res$epaths[[1]]) (`actual`) not equal to c(2, 3) (`expected`).

  `actual`: 1  
`expected`: 2 3

Failure (test-structural-properties.R:457:3): k_shortest_paths() works with weights
as.numeric(res$vpaths[[2]]) (`actual`) not equal to c(1, 2) (`expected`).

  `actual`: 1 3 2
`expected`: 1   2

Failure (test-structural-properties.R:458:3): k_shortest_paths() works with weights
as.numeric(res$epaths[[2]]) (`actual`) not equal to c(1) (`expected`).

  `actual`: 2 3
`expected`: 1  

Error (test-structural-properties.R:806:3): mean_distance works correctly for disconnected graphs
Error in `mean_distance(g, unconnected = FALSE)`: unused argument (unconnected = FALSE)

Error (test-structural-properties.R:834:3): mean_distance can provide details
Error in `mean_distance(g, details = TRUE, unconnected = TRUE)`: unused argument (unconnected = TRUE)

Error (test-structural-properties.R:922:3): knn works
Error in `sample_pa(1000, m = 5)`: At vendor/cigraph/src/games/barabasi.c:551 : Invalid out-degree sequence length. Invalid value
Backtrace:
    ▆
 1. ├─igraph::simplify(sample_pa(1000, m = 5)) at test-structural-properties.R:922:3
 2. │ └─igraph:::ensure_igraph(graph) at igraph/R/aaa-auto.R:1300:3
 3. └─igraph::sample_pa(1000, m = 5) at igraph/R/utils-assert-args.R:2:3

Failure (test-structural-properties.R:997:3): feedback_vertex_set works with weights
as.vector(fvs) (`actual`) not equal to c(5) (`expected`).

  `actual`: 1.0
`expected`: 5.0

[ FAIL 54 | WARN 1 | SKIP 2 | PASS 3232 ]
→ Testing the following tests next time:
• centrality
• paths
• print
• rewire
• topology
• structural-properties
• embedding
• games
Error: Test failures
Execution halted
[Process completed]
[Exit code: 1]

@krlmlr krlmlr changed the title chore: Prepare for vendoring develop fix: Fix tests on next branch Aug 17, 2025
@szhorvat
Copy link
Member

Can you elaborate on " games sometimes hangs on my system"?

Most of these seem straighforward issues related to changes in functions arguments. Some functions gained new arguments, some had arguments removed.

For example, unused argument (scale = scale) occurs because the scale parameter was removed form hub, authority and eigenvector score functions.

The reasons for each change should be clear from https://github.com/igraph/igraph/blob/develop/CHANGELOG.md — if not, we need to improve the changelog.

@krlmlr
Copy link
Contributor Author

krlmlr commented Aug 21, 2025

AI-generated summary of the test output:

Here’s a structured summary of the error patterns you encountered, ordered by frequency:

  1. Invalid out-degree sequence in sample_pa()
    • Frequency: 9+ occurrences
    • Examples:
    • sample_pa(100, power = 0.3)
    • sample_pa(1000, m = 5)
    • sample_pa(15, m = 3)
    • Message:
    At vendor/cigraph/src/games/barabasi.c:551 : Invalid out-degree sequence length. Invalid value
    • Tests affected: iterators, print, rewire, trees, structural-properties

  1. Missing internal C functions
    • Frequency: 7 occurrences
    • Examples:
    • lcf_vector_impl not found (graph_from_lcf)
    • radius_dijkstra_impl / eccentricity_dijkstra_impl missing (radius, eccentricity)
    • random_spanning_tree_impl missing (sample_spanning_tree)
    • Tests affected: make, paths, trees

  1. Unused or invalid arguments in centrality/community functions
    • Frequency: 7+ occurrences
    • Examples:
    • hub_and_authority_scores_impl(..., scale=) → unused argument
    • centralization_eigenvector_centrality_impl(..., directed=, scale=) → unused arguments
    • eigenvector_centrality_impl(..., scale=) → unused arguments
    • community_leiden_impl(..., vertex.weights=) → unused argument
    • mean_distance(..., unconnected=) → unused argument
    • Tests affected: centrality, centralization, community, structural-properties

  1. Incorrect return types / invalid $ access
    • Frequency: 5+ occurrences
    • Examples:
    • count_automorphisms(...)$group_size → atomic vector, not list
    • cp1$labeling invalid
    • cl returned list instead of logical vector
    • Tests affected: topology, cliques

  1. Mismatched actual vs expected values
    • Frequency: 6+ occurrences
    • Examples:
    • layout_with_fr() sum mismatch
    • graph_center() returns all vertices instead of one center
    • k_shortest_paths() vertex/edge sequence mismatch
    • feedback_vertex_set() mismatch in vertex IDs
    • operators (edges and vertices differences)
    • Tests affected: layout, paths, structural-properties, operators

  1. Type-related internal errors
    • Frequency: 4 occurrences
    • Examples:
    • REAL() can only be applied to a 'numeric', not a 'logical' (shortest_paths, all_shortest_paths)
    • voronoi_cells(..., weights=1:10) → integer/numeric mismatch
    • loops=FALSE not a valid option (must be “twice”, “none”, “once”)
    • Tests affected: structural-properties, community

  1. Graphlet and MST implementation errors
    • Frequency: 2 occurrences
    • Examples:
    • graphlets() requires weighted graphs
    • mst() assertion failure in vector.pmt
    • Tests affected: glet, minimum.spanning.tree

  1. Other miscellaneous issues
    • Examples:
    • Invalid vertex name(s) in similarity
    • argument is missing, with no default in cluster_label_prop
    • Warning: NAs introduced by coercion (similarity)

Summary by Category
1. sample_pa() invalid sequence – most common.
2. Missing C functions – common across path/tree-related functions.
3. Unused/invalid arguments – centrality & community.
4. Type mismatches / wrong return types – several graph functions.
5. Value mismatches – layout, operators, shortest paths, etc.

👉 Would you like me to tabulate these error categories with counts per test file so you can immediately see which files contribute most to failures?

@szhorvat
Copy link
Member

  1. I do not recall changes here, will need to look.
  2. My proposal was to basically move this functionality into a single function in the C core, which hasn't been fully done yet, and is being discussed. You might want to comment on Move automatic method selection to C core igraph#2481 and it's not too late to improve this.
  3. (1) Hub, authority, eigenvector is due to the complete removal of the scale parameter. R/igraph was already preparing for this and the deprecation was done. (2) community_leiden: the AI messed up, this doesn't belong in this category. I added directed graph support, which is an extra parameter requiring adaptation. I also added a "simple interface" (igraph_community_leiden_simple), which you might want to pick up and use it to replace the objective function selection; this'll reduce code duplication across interfaces. mean_distance -> no idea, have to look.
  4. This is a mish-mash category, will have to look separately. There were major interface changes for automorphism functions.
  5. "layout_with_fr() sum mismatch", not surprised, this was more of a smoke test for detecting any change not just breakages, probably needs an update on the expected value; I'm surprised about the rest, have to look.
  6. — ?
  7. Graphlets were not touched at all. MST was completely rewritten and is more high-level interface friendly. It's basically consolidates into a single function now.
  8. — ?

@szhorvat
Copy link
Member

For the top of the list, sample_pa(), here's the change to adapt to (copied from changelog):

  • igraph_barabasi_game(), igraph_barabasi_aging_game(), igraph_recent_degree_game() and igraph_recent_degree_aging_game() no longer interprets an empty outseq vector as a missing out-degree sequence. Pass NULL if you don't wish to specify an out-degree sequence.

@maelle maelle self-assigned this Aug 27, 2025
@maelle

This comment was marked as outdated.

@maelle

This comment was marked as resolved.

@maelle

This comment was marked as outdated.

@maelle

This comment was marked as outdated.

@szhorvat
Copy link
Member

szhorvat commented Aug 27, 2025

I cleaned up the changelog significantly to make it more readable. My advice here is not to start with fixing tests. That is going to be frustrating and risks that things will be left broken. Instead, just read the changelog, and address each change one by one. A few may still remain, and only then would I start doing this in a test-driven way.

The changelog of the C core is written manually, not automatically compiled from commits, so it should be relatively easy to follow.

@maelle

This comment was marked as resolved.

@maelle

This comment was marked as outdated.

@szhorvat
Copy link
Member

szhorvat commented Aug 27, 2025

No, the changelog is here on the develop branch:

https://github.com/igraph/igraph/blob/develop/CHANGELOG.md

Everything under the develop header is relevant, and nothing after this (i.e. look up to the master header only).

I am not saying NOT to look at tests, but that trying to do this in a test-driven way is a recipe for pain, frustration and maybe disaster. Not every change that is necessary will (or can) be caught by tests. I recommend using the changelog as the primary driver, and using tests to clean up what's left after.

For example, if you rely on tests, you might notice strange behaviour from sample_pa and then spend time debugging. This debugging time can be saved by updating sample_pa based on this line in the changelog:

igraph_barabasi_game(), igraph_barabasi_aging_game(), igraph_recent_degree_game() and igraph_recent_degree_aging_game() no longer interprets an empty outseq vector as a missing out-degree sequence. Pass NULL if you don't wish to specify an out-degree sequence.

@maelle
Copy link
Contributor

maelle commented Aug 27, 2025

igraph_modularity() now supports arbitrary cluster indices. However, ensuring that cluster indices are within the range 0 .. n-1, where n is the vertex count, allows for better performance.

Does this mean we should check the length of the unique values of the membership argument?

@maelle

This comment was marked as resolved.

@maelle

This comment was marked as resolved.

@maelle

This comment was marked as resolved.

@szhorvat
Copy link
Member

Does this mean we should check the length of the unique values of the membership argument?

It's the opposite: It means that this is no longer a concern. This is in the "Changed" section, which lists changes which are not really breaking. It's good to look at these, but the "Breaking changes" section is the more important one.

I looked at the three bullet points under "Changed"—none of these need any adaptation from the R side.

@szhorvat

This comment was marked as resolved.

@maelle

This comment was marked as resolved.

@maelle
Copy link
Contributor

maelle commented Aug 27, 2025

#2097

@szhorvat
Copy link
Member

Maybe the git cleaning did the trick?! 🎉

Almost certainly. The build system we have is not that smart and may not handle switching between this branch and main very well. I suggest a git clean after every switch, just make sure you don't accidentally delete files you care about :-)

I should say that there's one type of change that is not in the changelog and is going to affect the R interface. This is parameter renamings done in functions.yaml. The contents of this file are not for public use (yet), so it's igraph's internal business and we'll need to figure this out among ourselves.

So, parameter reorderings are documented, a these affect API compatibility in C. But parameter name changes are no documented, as these are not relevant in C. However, the names in functions.yaml are very relevant for R.

@maelle
Copy link
Contributor

maelle commented Aug 27, 2025

When a function gained an argument in the C core, do we have to handle that or is there a default value anyway?

@szhorvat
Copy link
Member

szhorvat commented Aug 27, 2025

When a function gained an argument in the C core, do we have to handle that or is there a default value anyway?

  1. Default values do not exist in C, but we do have the possibility to add them in functions.yaml (the basis of our interface generator). In most cases such a value is already added, and the default should be whatever recovers the previous behaviour (when this parameter was not present). Example: the new normalized parameter of betweenness functions. If you think there should be a default value but it's not in functions.yaml, please do propose one; you do open a PR directly. Note that whenever a parameter is marked as OPTIONAL in the interface file, that implies that it can be omitted, and the interface generator will know what default to use (typically NULL).
  2. I think there is good reason to expose these new parameters in R soon-ish, but they are usually not critical for the first update. Just don't plan on leaving them out in the long term :-)
  3. There are a few cases when we did not have time to complete the functionality and passing anything but the default value for these (usually a NULL pointer in C) will raise an IGRAPH_UNIMPLEMENTED error. This is because we must make all breaking changes before the release, and we're paving the way for near-future improvements.

@maelle
Copy link
Contributor

maelle commented Aug 27, 2025

Just don't plan on leaving them out in the long term :-)

I wonder whether we should also open "expose" issues for them to not forget.

@szhorvat
Copy link
Member

I wonder whether we should also open "expose" issues for them to not forget.

Absolutely.

@szhorvat
Copy link
Member

szhorvat commented Aug 27, 2025

In many cases, the first and quickest step towards fixing things is to move functions to auto-generation. Kirill has done a lot of these already. That's why this branch even compiles.

So, treat things from rinterface_extra.c (manually written) with much more suspicion than things in rinterface.c (auto-generated). Also keep in mind that manually written interfaces won't pick up default values automatically.

@maelle
Copy link
Contributor

maelle commented Aug 27, 2025

I am looking at the C docs to find the two new arguments to igraph_neighbors. The search functionality does not seem to honor the choice of the "develop" version of the docs.

@maelle
Copy link
Contributor

maelle commented Aug 27, 2025

And with the drop-down, one does not get to the version of the same page, but instead to the homepage. 😭

@maelle
Copy link
Contributor

maelle commented Aug 27, 2025

Note: sometimes the CHANGELOG uses the word "argument" but other times it uses the word "parameter".

@maelle
Copy link
Contributor

maelle commented Aug 27, 2025

@krlmlr @schochastics during the hackathon I suggest we look at #2097, editing the comments if needed. With a few example fixes it'd be easier for me to take over.

@maelle maelle force-pushed the b-next branch 2 times, most recently from 7cbf490 to a046f43 Compare September 8, 2025 14:17
@maelle maelle mentioned this pull request Sep 8, 2025
@maelle maelle force-pushed the b-next branch 2 times, most recently from c704791 to ff12872 Compare September 22, 2025 12:28
@szhorvat
Copy link
Member

@krlmlr Can you please update this to the latest main branch of the C core? This corresponds to the stable 1.0.0 release. No more breaking changes from here on.

@maelle
Copy link
Contributor

maelle commented Sep 30, 2025

To load the package I first have to delete the two cpp11 files. 🤨 There are two R_igraph_incident. Weird.

@maelle
Copy link
Contributor

maelle commented Oct 3, 2025

#2190

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

Successfully merging this pull request may close these issues.

3 participants