Skip to content

fix: Fix tests on next branch#2058

Draft
krlmlr wants to merge 47 commits intonextfrom
b-next
Draft

fix: Fix tests on next branch#2058
krlmlr wants to merge 47 commits intonextfrom
b-next

Conversation

@krlmlr
Copy link
Copy Markdown
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?

Details
─────────────────────────────────────────────────────────────────────────
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
Copy Markdown
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

This comment was marked as outdated.

@szhorvat
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

@maelle maelle mentioned this pull request Aug 27, 2025
@szhorvat

This comment was marked as resolved.

@maelle

This comment was marked as resolved.

@maelle
Copy link
Copy Markdown
Contributor

maelle commented Aug 27, 2025

#2097

@szhorvat

This comment was marked as resolved.

@maelle
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

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

Absolutely.

@szhorvat
Copy link
Copy Markdown
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
Copy Markdown
Contributor

maelle commented Mar 17, 2026

@krlmlr could you please remind me why we're keeping this PR open?

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.

4 participants