From f2f9e057d00dadc35a2ec40813fb3b4b6f421c4a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 26 Oct 2025 18:07:14 +0000 Subject: [PATCH 1/5] Initial plan From ac9d5e7744edde48f690904b1e24527b405e9e63 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 26 Oct 2025 18:21:38 +0000 Subject: [PATCH 2/5] fix: biconnected_components() now returns only underscore field names Fixed the auto-generated biconnected_components_impl() to use underscore field names (tree_edges, component_edges, articulation_points) instead of incorrectly creating dot versions. Simplified the wrapper function as it no longer needs to fix the field names. Co-authored-by: krlmlr <1741643+krlmlr@users.noreply.github.com> --- R/aaa-auto.R | 6 +++--- R/components.R | 38 +------------------------------------- 2 files changed, 4 insertions(+), 40 deletions(-) diff --git a/R/aaa-auto.R b/R/aaa-auto.R index a019de8c302..fc5ba8c383e 100644 --- a/R/aaa-auto.R +++ b/R/aaa-auto.R @@ -4409,16 +4409,16 @@ biconnected_components_impl <- function( graph ) if (igraph_opt("return.vs.es")) { - res$tree.edges <- lapply(res$tree.edges, unsafe_create_es, graph = graph, es = E(graph)) + res$tree_edges <- lapply(res$tree_edges, unsafe_create_es, graph = graph, es = E(graph)) } if (igraph_opt("return.vs.es")) { - res$component.edges <- lapply(res$component.edges, unsafe_create_es, graph = graph, es = E(graph)) + res$component_edges <- lapply(res$component_edges, unsafe_create_es, graph = graph, es = E(graph)) } if (igraph_opt("return.vs.es")) { res$components <- lapply(res$components, unsafe_create_vs, graph = graph, verts = V(graph)) } if (igraph_opt("return.vs.es")) { - res$articulation.points <- create_vs(graph, res$articulation.points) + res$articulation_points <- create_vs(graph, res$articulation_points) } res } diff --git a/R/components.R b/R/components.R index bd8a0bbb785..d8ce0ff51e1 100644 --- a/R/components.R +++ b/R/components.R @@ -323,45 +323,9 @@ bridges <- function(graph) { #' @cdocs igraph_biconnected_components biconnected_components <- function(graph) { # Function call - res <- biconnected_components_impl( + biconnected_components_impl( graph = graph ) - - # TODO: Clean up after fixing "." / "_" problem. - # See https://github.com/igraph/rigraph/issues/1203 - - if (igraph_opt("return.vs.es")) { - res$tree_edges <- lapply( - res$tree_edges, - unsafe_create_es, - graph = graph, - es = E(graph) - ) - res$tree.edges <- NULL - } - - if (igraph_opt("return.vs.es")) { - res$component_edges <- lapply( - res$component_edges, - unsafe_create_es, - graph = graph, - es = E(graph) - ) - res$component.edges <- NULL - } - if (igraph_opt("return.vs.es")) { - res$components <- lapply( - res$components, - unsafe_create_vs, - graph = graph, - verts = V(graph) - ) - } - if (igraph_opt("return.vs.es")) { - res$articulation_points <- create_vs(graph, res$articulation_points) - res$articulation.points <- NULL - } - res } #' Check biconnectedness From 540448e612fb82bf0b41cb19caf2a63dae7676ef Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 26 Oct 2025 18:25:45 +0000 Subject: [PATCH 3/5] test: update snapshot for biconnected_components_impl Updated test snapshot to reflect the fix - now correctly shows only underscore field names without the empty dot versions. Co-authored-by: krlmlr <1741643+krlmlr@users.noreply.github.com> --- tests/testthat/_snaps/aaa-auto.md | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/tests/testthat/_snaps/aaa-auto.md b/tests/testthat/_snaps/aaa-auto.md index 8fdfd147c22..3470de295ff 100644 --- a/tests/testthat/_snaps/aaa-auto.md +++ b/tests/testthat/_snaps/aaa-auto.md @@ -4257,18 +4257,22 @@ $tree_edges $tree_edges[[1]] - [1] 2 + + 1/2 edge: + [1] 2--3 $tree_edges[[2]] - [1] 1 + + 1/2 edge: + [1] 1--2 $component_edges $component_edges[[1]] - [1] 2 + + 1/2 edge: + [1] 2--3 $component_edges[[2]] - [1] 1 + + 1/2 edge: + [1] 1--2 $components @@ -4282,17 +4286,9 @@ $articulation_points + + 1/3 vertex: [1] 2 - $tree.edges - list() - - $component.edges - list() - - $articulation.points - + 0/3 vertices: - # biconnected_components_impl errors From 9cae82325920916fdfbf21a1ac59360f44f8b59e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 26 Oct 2025 20:50:31 +0000 Subject: [PATCH 4/5] Changes before error encountered Co-authored-by: krlmlr <1741643+krlmlr@users.noreply.github.com> --- R/aaa-auto.R | 6 +++--- tools/stimulus/functions-R.yaml | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/R/aaa-auto.R b/R/aaa-auto.R index fc5ba8c383e..a019de8c302 100644 --- a/R/aaa-auto.R +++ b/R/aaa-auto.R @@ -4409,16 +4409,16 @@ biconnected_components_impl <- function( graph ) if (igraph_opt("return.vs.es")) { - res$tree_edges <- lapply(res$tree_edges, unsafe_create_es, graph = graph, es = E(graph)) + res$tree.edges <- lapply(res$tree.edges, unsafe_create_es, graph = graph, es = E(graph)) } if (igraph_opt("return.vs.es")) { - res$component_edges <- lapply(res$component_edges, unsafe_create_es, graph = graph, es = E(graph)) + res$component.edges <- lapply(res$component.edges, unsafe_create_es, graph = graph, es = E(graph)) } if (igraph_opt("return.vs.es")) { res$components <- lapply(res$components, unsafe_create_vs, graph = graph, verts = V(graph)) } if (igraph_opt("return.vs.es")) { - res$articulation_points <- create_vs(graph, res$articulation_points) + res$articulation.points <- create_vs(graph, res$articulation.points) } res } diff --git a/tools/stimulus/functions-R.yaml b/tools/stimulus/functions-R.yaml index f88aaa9f1aa..bcfefe9f361 100644 --- a/tools/stimulus/functions-R.yaml +++ b/tools/stimulus/functions-R.yaml @@ -878,6 +878,12 @@ igraph_adhesion: igraph_cohesion: IGNORE: RR, RC +igraph_biconnected_components: + PARAM_NAMES: + tree_edges: tree_edges + component_edges: component_edges + articulation_points: articulation_points + ####################################### # Listing s-t cuts, separators ####################################### From 15e10ccd37b0a15a2cc354ea4e2f2716ad7ca948 Mon Sep 17 00:00:00 2001 From: krlmlr Date: Sun, 26 Oct 2025 21:40:37 +0000 Subject: [PATCH 5/5] chore: Auto-update from GitHub Actions Run: https://github.com/igraph/rigraph/actions/runs/18824005848 --- tests/testthat/_snaps/aaa-auto.md | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/tests/testthat/_snaps/aaa-auto.md b/tests/testthat/_snaps/aaa-auto.md index 3470de295ff..8fdfd147c22 100644 --- a/tests/testthat/_snaps/aaa-auto.md +++ b/tests/testthat/_snaps/aaa-auto.md @@ -4257,22 +4257,18 @@ $tree_edges $tree_edges[[1]] - + 1/2 edge: - [1] 2--3 + [1] 2 $tree_edges[[2]] - + 1/2 edge: - [1] 1--2 + [1] 1 $component_edges $component_edges[[1]] - + 1/2 edge: - [1] 2--3 + [1] 2 $component_edges[[2]] - + 1/2 edge: - [1] 1--2 + [1] 1 $components @@ -4286,9 +4282,17 @@ $articulation_points - + 1/3 vertex: [1] 2 + $tree.edges + list() + + $component.edges + list() + + $articulation.points + + 0/3 vertices: + # biconnected_components_impl errors