From e1a396d10c9157fe3ebf3a94a13cdbd543851f59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 11:59:22 +0200 Subject: [PATCH 01/48] chore: add commit-lifecycle.R script --- .Rbuildignore | 7 +-- .gitignore | 1 + tools/commit-lifecycle.R | 98 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 103 insertions(+), 3 deletions(-) create mode 100644 tools/commit-lifecycle.R diff --git a/.Rbuildignore b/.Rbuildignore index 1264bff9265..f4f72a79998 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -63,11 +63,12 @@ ^src/*\.gcda$ ^src/*\.gcno$ ^R/release\.R$ -^BRANCHES\.md$ -^scripts$ -^\.claude$ ^man/dot-igraph.progress\.Rd$ ^man/dot-igraph.status\.Rd$ ^man/dot-extract_constructor_and_modifiers\.Rd$ ^man/dot-apply_modifiers\.Rd$ ^man/handle_vertex_type_arg\.Rd$ +^BRANCHES\.md$ +^scripts$ +^\.claude$ +^lifecycle$ diff --git a/.gitignore b/.gitignore index 0fe829881b4..28f195c81dc 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ cran /_codeql_detected_source_root /tests/testthat/_problems/ .ccache/ +lifecycle diff --git a/tools/commit-lifecycle.R b/tools/commit-lifecycle.R new file mode 100644 index 00000000000..49fb84f3307 --- /dev/null +++ b/tools/commit-lifecycle.R @@ -0,0 +1,98 @@ +# create a Rbuildignored, gitignored directory called 'lifecycle' + +# lifecycle_dir <- here::here("lifecycle") +# dir.create(lifecycle_dir, showWarnings = FALSE) +# +# usethis::use_build_ignore("lifecycle") +# usethis::use_git_ignore("lifecycle") + +# collect all functions changed from the commit messages on this branch, add items to `lifecycle/NEWS.md` which +# is `NEWS.md` with the edits — already done, lifecycle/NEWS.md exists + +# reset mixed to right before the PR + +# cli::cli_alert_info("Resetting to merge-base {substr(merge_base, 1, 7)}...") +# gert::git_reset_mixed(merge_base, repo = here::here()) +# cli::cli_alert_success("Reset to merge-base") + +# copy all changed files, except man/ and NAMESPACE which should be reset to their previous state, +# to 'lifecycle', use their version from main instead. + +# changed <- gert::git_status(repo = here::here())$file +# r_changed <- changed[grepl("^R/", changed)] +# test_changed <- changed[grepl("^tests/", changed)] +# +# for (f in c(r_changed, test_changed)) { +# dest_dir <- dirname(here::here("lifecycle", f)) +# dir.create(dest_dir, showWarnings = FALSE, recursive = TRUE) +# file.copy(here::here(f), here::here("lifecycle", f), overwrite = TRUE) +# } +# cli::cli_alert_success("Saved {length(r_changed)} R files and {length(test_changed)} test files to lifecycle/") + +# gert::git_reset_hard("main", repo = here::here()) +# cli::cli_alert_success("Restored working tree to main (man/, NAMESPACE, R/ all from main)") + +# rebase the branch on main + +# gert::git_pull(repo = here::here(), remote = "origin", refspec = "main") +# cli::cli_alert_success("Pulled and fast-forwarded to main") + +gert::git_fetch("origin", refspec = "refs/heads/main:refs/heads/main", repo = here::here()) +gert::git_reset_mixed("main", repo = here::here()) + +usethis::use_build_ignore("lifecycle") +usethis::use_git_ignore("lifecycle") + +gert::git_add(c("tools/commit-lifecycle.R", ".gitignore", ".Rbuildignore"), repo = here::here()) +gert::git_commit("chore: add commit-lifecycle.R script", repo = here::here()) +cli::cli_alert_success("Committed tools/commit-lifecycle.R") + +# one commit per R script (copied back from the 'lifecycle' directory) + corresponding R test file if needed + run `document()` + run `test()`. + +r_files <- list.files(here::here("lifecycle", "R"), full.names = FALSE) + +for (stem in tools::file_path_sans_ext(r_files)) { + r_file <- paste0("R/", stem, ".R") + lifecycle_r <- here::here("lifecycle", r_file) + + file.copy(lifecycle_r, here::here(r_file), overwrite = TRUE) + files_to_stage <- r_file + + lifecycle_test <- here::here("lifecycle", "tests", "testthat", paste0("test-", stem, ".R")) + if (file.exists(lifecycle_test)) { + dest_test <- here::here("tests", "testthat", paste0("test-", stem, ".R")) + file.copy(lifecycle_test, dest_test, overwrite = TRUE) + files_to_stage <- c(files_to_stage, paste0("tests/testthat/test-", stem, ".R")) + + lifecycle_snap <- here::here("lifecycle", "tests", "testthat", "_snaps", paste0(stem, ".md")) + if (file.exists(lifecycle_snap)) { + dest_snap <- here::here("tests", "testthat", "_snaps", paste0(stem, ".md")) + file.copy(lifecycle_snap, dest_snap, overwrite = TRUE) + files_to_stage <- c(files_to_stage, paste0("tests/testthat/_snaps/", stem, ".md")) + } + } + + devtools::document(quiet = TRUE) + tryCatch( + callr::r( + function(pkg, filter) devtools::test(pkg = pkg, filter = filter, stop_on_failure = FALSE), + args = list(pkg = here::here(), filter = stem) + ), + error = function(e) cli::cli_alert_warning("Tests errored for {stem}: {conditionMessage(e)}") + ) + + gert::git_add(c(files_to_stage, "man", "NAMESPACE"), repo = here::here()) + gert::git_commit(paste0("feat!: bump deprecated functions in R/", stem, ".R"), repo = here::here()) + cli::cli_alert_success("Committed {r_file}") +} + +file.copy(here::here("lifecycle", "NEWS.md"), here::here("NEWS.md"), overwrite = TRUE) +gert::git_add("NEWS.md", repo = here::here()) +gert::git_commit("chore: update NEWS.md for lifecycle bumps\n\n!NEWS", repo = here::here()) +cli::cli_alert_success("Committed NEWS.md") + +# R CMD check after all the commits + +devtools::check() + +# I will do the force pushing once I am happy. From e9c2ab95a8a7ef5910cc61a71ae8e5b6a3564253 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 12:00:19 +0200 Subject: [PATCH 02/48] feat!: bump deprecated functions in R/adjacency.R --- NAMESPACE | 1 - R/adjacency.R | 6 +++--- man/get.edge.Rd | 17 ----------------- 3 files changed, 3 insertions(+), 21 deletions(-) delete mode 100644 man/get.edge.Rd diff --git a/NAMESPACE b/NAMESPACE index 5fc033b748a..50337bd1418 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -376,7 +376,6 @@ export(get.adjlist) export(get.all.shortest.paths) export(get.data.frame) export(get.diameter) -export(get.edge) export(get.edge.attribute) export(get.edge.ids) export(get.edgelist) diff --git a/R/adjacency.R b/R/adjacency.R index 65b4eb21411..f1424f964e4 100644 --- a/R/adjacency.R +++ b/R/adjacency.R @@ -17,7 +17,7 @@ graph.adjacency <- function( add.rownames = NA ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "graph.adjacency()", "graph_from_adjacency_matrix()" @@ -293,7 +293,7 @@ graph_from_adjacency_matrix <- function( ensure_no_na(adjmatrix, "adjacency matrix", mode) if (!is.matrix(adjmatrix) && !inherits(adjmatrix, "Matrix")) { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "1.6.0", "graph_from_adjacency_matrix(adjmatrix = 'must be a matrix')" ) @@ -302,7 +302,7 @@ graph_from_adjacency_matrix <- function( if (mode == "undirected") { if (!is_symmetric(adjmatrix)) { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "1.6.0", "graph_from_adjacency_matrix(adjmatrix = 'must be symmetric with mode = \"undirected\"')", details = 'Use mode = "max" to achieve the original behavior.' diff --git a/man/get.edge.Rd b/man/get.edge.Rd deleted file mode 100644 index d416b1ff1d7..00000000000 --- a/man/get.edge.Rd +++ /dev/null @@ -1,17 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/basic.R -\name{get.edge} -\alias{get.edge} -\title{Incident vertices of some graph edges} -\usage{ -get.edge(graph, id) -} -\arguments{ -\item{graph}{The input graph} -} -\description{ -\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} - -Use \code{\link[=ends]{ends()}}. -} -\keyword{internal} From 389746b1ce4c6a5914fe4d4057d52a5bfd93cf2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 12:01:06 +0200 Subject: [PATCH 03/48] feat!: bump deprecated functions in R/as_phylo.R --- R/as_phylo.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/as_phylo.R b/R/as_phylo.R index c33615d8db4..03e8b21e0a4 100644 --- a/R/as_phylo.R +++ b/R/as_phylo.R @@ -10,7 +10,7 @@ #' @inheritParams ape::as.phylo #' @keywords internal as_phylo <- function(x, ...) { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "1.5.0", "ape::as.phylo()" ) From fdcfbe5db0205a4161116a449c2f850e4bc439b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 12:01:55 +0200 Subject: [PATCH 04/48] feat!: bump deprecated functions in R/assortativity.R --- R/assortativity.R | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/R/assortativity.R b/R/assortativity.R index 5a1b7d2055a..074fa421b35 100644 --- a/R/assortativity.R +++ b/R/assortativity.R @@ -15,7 +15,7 @@ assortativity.nominal <- function( normalized = TRUE ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "assortativity.nominal()", "assortativity_nominal()" @@ -40,7 +40,7 @@ assortativity.nominal <- function( #' @export assortativity.degree <- function(graph, directed = TRUE) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "assortativity.degree()", "assortativity_degree()" @@ -171,7 +171,7 @@ assortativity <- function( types2 = NULL ) { if (...length() > 0) { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "1.6.0", "assortativity(... =)", details = "Arguments `values` and `values.in` must be named." @@ -193,7 +193,7 @@ assortativity <- function( } if (missing(values)) { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "1.6.0", "assortativity(types1 =)", "assortativity(values =)" @@ -202,7 +202,7 @@ assortativity <- function( } if (!is.null(types2)) { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "1.6.0", "assortativity(types2 =)", "assortativity(values.in =)" From 11bb31893b7ef05a6aeb19db8895fb63fffb82b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 12:02:48 +0200 Subject: [PATCH 05/48] feat!: bump deprecated functions in R/attributes.R --- R/attributes.R | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/R/attributes.R b/R/attributes.R index 87af8d6b304..1a34d29fc8e 100644 --- a/R/attributes.R +++ b/R/attributes.R @@ -10,7 +10,7 @@ #' @export set.vertex.attribute <- function(graph, name, index = V(graph), value) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "set.vertex.attribute()", "set_vertex_attr()" @@ -30,7 +30,7 @@ set.vertex.attribute <- function(graph, name, index = V(graph), value) { #' @export set.graph.attribute <- function(graph, name, value) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "set.graph.attribute()", "set_graph_attr()" @@ -50,7 +50,7 @@ set.graph.attribute <- function(graph, name, value) { #' @export set.edge.attribute <- function(graph, name, index = E(graph), value) { # nocov start - lifecycle::deprecate_soft("2.0.0", "set.edge.attribute()", "set_edge_attr()") + lifecycle::deprecate_warn("2.0.0", "set.edge.attribute()", "set_edge_attr()") set_edge_attr(graph = graph, name = name, index = index, value = value) } # nocov end @@ -66,7 +66,7 @@ set.edge.attribute <- function(graph, name, index = E(graph), value) { #' @export remove.vertex.attribute <- function(graph, name) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "remove.vertex.attribute()", "delete_vertex_attr()" @@ -86,7 +86,7 @@ remove.vertex.attribute <- function(graph, name) { #' @export remove.graph.attribute <- function(graph, name) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "remove.graph.attribute()", "delete_graph_attr()" @@ -106,7 +106,7 @@ remove.graph.attribute <- function(graph, name) { #' @export remove.edge.attribute <- function(graph, name) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "remove.edge.attribute()", "delete_edge_attr()" @@ -126,7 +126,7 @@ remove.edge.attribute <- function(graph, name) { #' @export list.vertex.attributes <- function(graph) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "list.vertex.attributes()", "vertex_attr_names()" @@ -146,7 +146,7 @@ list.vertex.attributes <- function(graph) { #' @export list.graph.attributes <- function(graph) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "list.graph.attributes()", "graph_attr_names()" @@ -166,7 +166,7 @@ list.graph.attributes <- function(graph) { #' @export list.edge.attributes <- function(graph) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "list.edge.attributes()", "edge_attr_names()" @@ -186,7 +186,7 @@ list.edge.attributes <- function(graph) { #' @export is.weighted <- function(graph) { # nocov start - lifecycle::deprecate_soft("2.0.0", "is.weighted()", "is_weighted()") + lifecycle::deprecate_warn("2.0.0", "is.weighted()", "is_weighted()") is_weighted(graph = graph) } # nocov end @@ -202,7 +202,7 @@ is.weighted <- function(graph) { #' @export is.named <- function(graph) { # nocov start - lifecycle::deprecate_soft("2.0.0", "is.named()", "is_named()") + lifecycle::deprecate_warn("2.0.0", "is.named()", "is_named()") is_named(graph = graph) } # nocov end @@ -218,7 +218,7 @@ is.named <- function(graph) { #' @export is.bipartite <- function(graph) { # nocov start - lifecycle::deprecate_soft("2.0.0", "is.bipartite()", "is_bipartite()") + lifecycle::deprecate_warn("2.0.0", "is.bipartite()", "is_bipartite()") is_bipartite(graph = graph) } # nocov end @@ -234,7 +234,7 @@ is.bipartite <- function(graph) { #' @export get.vertex.attribute <- function(graph, name, index = V(graph)) { # nocov start - lifecycle::deprecate_soft("2.0.0", "get.vertex.attribute()", "vertex_attr()") + lifecycle::deprecate_warn("2.0.0", "get.vertex.attribute()", "vertex_attr()") vertex_attr(graph = graph, name = name, index = index) } # nocov end @@ -250,7 +250,7 @@ get.vertex.attribute <- function(graph, name, index = V(graph)) { #' @export get.graph.attribute <- function(graph, name) { # nocov start - lifecycle::deprecate_soft("2.0.0", "get.graph.attribute()", "graph_attr()") + lifecycle::deprecate_warn("2.0.0", "get.graph.attribute()", "graph_attr()") graph_attr(graph = graph, name = name) } # nocov end @@ -266,7 +266,7 @@ get.graph.attribute <- function(graph, name) { #' @export get.edge.attribute <- function(graph, name, index = E(graph)) { # nocov start - lifecycle::deprecate_soft("2.0.0", "get.edge.attribute()", "edge_attr()") + lifecycle::deprecate_warn("2.0.0", "get.edge.attribute()", "edge_attr()") edge_attr(graph = graph, name = name, index = index) } # nocov end # IGraph R package From 4f8e84e2d558e1be18c8cb02e61b1daeb9c2e351 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 12:03:39 +0200 Subject: [PATCH 06/48] feat!: bump deprecated functions in R/basic.R --- R/basic.R | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/R/basic.R b/R/basic.R index 47b00f7e071..4769854df36 100644 --- a/R/basic.R +++ b/R/basic.R @@ -10,7 +10,7 @@ #' @export is.igraph <- function(graph) { # nocov start - lifecycle::deprecate_soft("2.0.0", "is.igraph()", "is_igraph()") + lifecycle::deprecate_warn("2.0.0", "is.igraph()", "is_igraph()") is_igraph(graph = graph) } # nocov end # IGraph R package @@ -56,19 +56,6 @@ is_igraph <- function(graph) { TRUE } -#' Incident vertices of some graph edges -#' @description -#' `r lifecycle::badge("deprecated")` -#' -#' Use [ends()]. -#' @inheritParams ends -#' @export -#' @keywords internal -get.edge <- function(graph, id) { - lifecycle::deprecate_stop("2.1.0", "get.edge()", "ends()") -} - - #' Head of the edge(s) in a graph #' #' For undirected graphs, head and tail is not defined. In this case From 8e598111dcb9adabff96772960f9ea8e9653a97f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 12:04:32 +0200 Subject: [PATCH 07/48] feat!: bump deprecated functions in R/bipartite.R --- R/bipartite.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/bipartite.R b/R/bipartite.R index 5e640313588..24f2d63ebda 100644 --- a/R/bipartite.R +++ b/R/bipartite.R @@ -10,7 +10,7 @@ #' @export bipartite.projection.size <- function(graph, types = NULL) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "bipartite.projection.size()", "bipartite_projection_size()" @@ -37,7 +37,7 @@ bipartite.projection <- function( remove.type = TRUE ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "bipartite.projection()", "bipartite_projection()" @@ -64,7 +64,7 @@ bipartite.projection <- function( #' @export bipartite.mapping <- function(graph) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "bipartite.mapping()", "bipartite_mapping()" From 7ed6a016a272856cd3b6ac677cc7ecdda535fec9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 12:05:30 +0200 Subject: [PATCH 08/48] feat!: bump deprecated functions in R/centrality.R --- R/centrality.R | 46 ++++++++++++++--------------- tests/testthat/_snaps/centrality.md | 4 +-- tests/testthat/test-centrality.R | 2 +- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/R/centrality.R b/R/centrality.R index f239487876f..0cec52a6a44 100644 --- a/R/centrality.R +++ b/R/centrality.R @@ -10,7 +10,7 @@ #' @export subgraph.centrality <- function(graph, diag = FALSE) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "subgraph.centrality()", "subgraph_centrality()" @@ -39,7 +39,7 @@ page.rank <- function( options = NULL ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "page.rank()", "page_rank()") + lifecycle::deprecate_warn("2.0.0", "page.rank()", "page_rank()") page_rank( graph = graph, algo = algo, @@ -69,7 +69,7 @@ hub.score <- function( options = arpack_defaults() ) { # nocov start - lifecycle::deprecate_warn("2.0.0", "hub.score()", "hits_scores()") + lifecycle::deprecate_stop("2.0.0", "hub.score()", "hits_scores()") hub_score(graph = graph, scale = scale, weights = weights, options = options) } # nocov end @@ -90,7 +90,7 @@ authority.score <- function( options = arpack_defaults() ) { # nocov start - lifecycle::deprecate_warn("2.0.0", "authority.score()", "hits_scores()") + lifecycle::deprecate_stop("2.0.0", "authority.score()", "hits_scores()") authority_score( graph = graph, scale = scale, @@ -117,7 +117,7 @@ graph.strength <- function( weights = NULL ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "graph.strength()", "strength()") + lifecycle::deprecate_warn("2.0.0", "graph.strength()", "strength()") strength( graph = graph, vids = vids, @@ -151,7 +151,7 @@ graph.eigen <- function( options = arpack_defaults() ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "graph.eigen()", "spectrum()") + lifecycle::deprecate_warn("2.0.0", "graph.eigen()", "spectrum()") spectrum( graph = graph, algorithm = algorithm, @@ -172,7 +172,7 @@ graph.eigen <- function( #' @export graph.diversity <- function(graph, weights = NULL, vids = V(graph)) { # nocov start - lifecycle::deprecate_soft("2.0.0", "graph.diversity()", "diversity()") + lifecycle::deprecate_warn("2.0.0", "graph.diversity()", "diversity()") diversity(graph = graph, weights = weights, vids = vids) } # nocov end @@ -194,7 +194,7 @@ evcent <- function( options = arpack_defaults() ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "evcent()", "eigen_centrality()") + lifecycle::deprecate_warn("2.0.0", "evcent()", "eigen_centrality()") eigen_centrality( graph = graph, directed = directed, @@ -222,7 +222,7 @@ edge.betweenness <- function( cutoff = -1 ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "edge.betweenness()", "edge_betweenness()") + lifecycle::deprecate_warn("2.0.0", "edge.betweenness()", "edge_betweenness()") edge_betweenness( graph = graph, e = e, @@ -252,7 +252,7 @@ bonpow <- function( sparse = TRUE ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "bonpow()", "power_centrality()") + lifecycle::deprecate_warn("2.0.0", "bonpow()", "power_centrality()") power_centrality( graph = graph, nodes = nodes, @@ -285,7 +285,7 @@ alpha.centrality <- function( sparse = TRUE ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "alpha.centrality()", "alpha_centrality()") + lifecycle::deprecate_warn("2.0.0", "alpha.centrality()", "alpha_centrality()") alpha_centrality( graph = graph, nodes = nodes, @@ -336,7 +336,7 @@ estimate_betweenness <- function( cutoff, weights = NULL ) { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "1.6.0", "estimate_betweenness()", "betweenness()", @@ -498,7 +498,7 @@ estimate_edge_betweenness <- function( cutoff, weights = NULL ) { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "1.6.0", "estimate_edge_betweenness()", "edge_betweenness()", @@ -611,7 +611,7 @@ estimate_closeness <- function( weights = NULL, normalized = FALSE ) { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "1.6.0", "estimate_closeness()", "closeness()", @@ -961,7 +961,7 @@ arpack <- function( complex = !sym ) { if (is.function(options)) { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "1.6.0", "arpack(options = 'must be a list')", details = c( @@ -1170,7 +1170,7 @@ spectrum <- function( options = arpack_defaults() ) { if (is.function(options)) { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "1.6.0", "spectrum(options = 'must be a list')", details = c( @@ -1299,7 +1299,7 @@ eigen_centrality <- function( options = arpack_defaults() ) { if (is.function(options)) { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "1.6.0", "eigen_centrality(options = 'must be a list')", details = c( @@ -1311,13 +1311,13 @@ eigen_centrality <- function( if (lifecycle::is_present(scale)) { if (isTRUE(scale)) { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.1.1", "eigen_centrality(scale)", details = "eigen_centrality() will always behave as if scale=TRUE were used." ) } else { - lifecycle::deprecate_warn( + lifecycle::deprecate_stop( "2.1.1", "eigen_centrality(scale = 'always as if TRUE')", details = "Normalization is always performed" @@ -1522,9 +1522,9 @@ authority_score <- function( weights = NULL, options = arpack_defaults() ) { - lifecycle::deprecate_soft("2.1.0", "authority_score()", "hits_scores()") + lifecycle::deprecate_warn("2.1.0", "authority_score()", "hits_scores()") if (is.function(options)) { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "1.6.0", I("arpack_defaults"), "arpack_defaults()", @@ -1567,9 +1567,9 @@ hub_score <- function( weights = NULL, options = arpack_defaults() ) { - lifecycle::deprecate_soft("2.0.3", "hub_score()", "hits_scores()") + lifecycle::deprecate_warn("2.0.3", "hub_score()", "hits_scores()") if (is.function(options)) { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "1.6.0", I("arpack_defaults"), "arpack_defaults()", diff --git a/tests/testthat/_snaps/centrality.md b/tests/testthat/_snaps/centrality.md index f6ffca6419b..bcb12bae957 100644 --- a/tests/testthat/_snaps/centrality.md +++ b/tests/testthat/_snaps/centrality.md @@ -38,8 +38,8 @@ Code invisible(eigen_centrality(g, scale = FALSE)) Condition - Warning: - The `scale` argument of `eigen_centrality()` always as if TRUE as of igraph 2.1.1. + Error: + ! The `scale` argument of `eigen_centrality()` always as if TRUE as of igraph 2.1.1. i Normalization is always performed # arpack() errors well diff --git a/tests/testthat/test-centrality.R b/tests/testthat/test-centrality.R index 71bd753a7e6..4c806459f42 100644 --- a/tests/testthat/test-centrality.R +++ b/tests/testthat/test-centrality.R @@ -838,7 +838,7 @@ test_that("eigen_centrality() deprecated scale argument", { invisible(eigen_centrality(g, scale = TRUE)) }) # For some reason, this produces different outputs on Windows and macOS - expect_snapshot({ + expect_snapshot(error = TRUE, { invisible(eigen_centrality(g, scale = FALSE)) }) }) From dcc783f785607ed914397434efccb8cf49664e9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 12:06:19 +0200 Subject: [PATCH 09/48] feat!: bump deprecated functions in R/centralization.R --- R/centralization.R | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/R/centralization.R b/R/centralization.R index bd6dfb570ef..e0655d7f295 100644 --- a/R/centralization.R +++ b/R/centralization.R @@ -10,7 +10,7 @@ #' @export centralize.scores <- function(scores, theoretical.max = 0, normalized = TRUE) { # nocov start - lifecycle::deprecate_soft("2.0.0", "centralize.scores()", "centralize()") + lifecycle::deprecate_warn("2.0.0", "centralize.scores()", "centralize()") centralize( scores = scores, theoretical.max = theoretical.max, @@ -35,7 +35,7 @@ centralization.evcent.tmax <- function( scale = TRUE ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "centralization.evcent.tmax()", "centr_eigen_tmax()" @@ -66,7 +66,7 @@ centralization.evcent <- function( normalized = TRUE ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "centralization.evcent()", "centr_eigen()") + lifecycle::deprecate_warn("2.0.0", "centralization.evcent()", "centr_eigen()") centr_eigen( graph = graph, directed = directed, @@ -93,7 +93,7 @@ centralization.degree.tmax <- function( loops = FALSE ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "centralization.degree.tmax()", "centr_degree_tmax()" @@ -118,7 +118,7 @@ centralization.degree <- function( normalized = TRUE ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "centralization.degree()", "centr_degree()" @@ -147,7 +147,7 @@ centralization.closeness.tmax <- function( mode = c("out", "in", "all", "total") ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "centralization.closeness.tmax()", "centr_clo_tmax()" @@ -171,7 +171,7 @@ centralization.closeness <- function( normalized = TRUE ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "centralization.closeness()", "centr_clo()" @@ -195,7 +195,7 @@ centralization.betweenness.tmax <- function( directed = TRUE ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "centralization.betweenness.tmax()", "centr_betw_tmax()" @@ -219,7 +219,7 @@ centralization.betweenness <- function( normalized = TRUE ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "centralization.betweenness()", "centr_betw()" @@ -404,7 +404,7 @@ centr_degree_tmax <- function( loops ) { if (!lifecycle::is_present(loops)) { - lifecycle::deprecate_warn( + lifecycle::deprecate_stop( when = "2.0.0", what = "centr_degree_tmax(loops = 'must be explicit')", details = "The default value (currently `FALSE`) will be dropped in the next release. Add an explicit value for the `loops` argument." @@ -658,7 +658,7 @@ centr_eigen <- function( normalized = TRUE ) { if (lifecycle::is_present(scale)) { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.2.0", "centr_eigen(scale = )", details = "The function always behaves as if `scale = TRUE`. @@ -708,7 +708,7 @@ centr_eigen_tmax <- function( scale = deprecated() ) { if (lifecycle::is_present(scale)) { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.2.0", "centr_eigen_tmax(scale = )", details = "The function always behaves as if `scale = TRUE`. From 8d10f2c3a3c5c9e8103b2e46c23df7d36f65cacc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 12:07:11 +0200 Subject: [PATCH 10/48] feat!: bump deprecated functions in R/cliques.R --- R/cliques.R | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/R/cliques.R b/R/cliques.R index 4bd6018334c..9d3ce765399 100644 --- a/R/cliques.R +++ b/R/cliques.R @@ -10,7 +10,7 @@ #' @export maximal.independent.vertex.sets <- function(graph) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "maximal.independent.vertex.sets()", "max_ivs()" @@ -35,7 +35,7 @@ maximal.cliques.count <- function( subset = NULL ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "maximal.cliques.count()", "count_max_cliques()" @@ -61,7 +61,7 @@ maximal.cliques <- function( file = NULL ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "maximal.cliques()", "max_cliques()") + lifecycle::deprecate_warn("2.0.0", "maximal.cliques()", "max_cliques()") max_cliques(graph = graph, min = min, max = max, subset = subset, file = file) } # nocov end @@ -77,7 +77,7 @@ maximal.cliques <- function( #' @export largest.independent.vertex.sets <- function(graph) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "largest.independent.vertex.sets()", "largest_ivs()" @@ -97,7 +97,7 @@ largest.independent.vertex.sets <- function(graph) { #' @export largest.cliques <- function(graph) { # nocov start - lifecycle::deprecate_soft("2.0.0", "largest.cliques()", "largest_cliques()") + lifecycle::deprecate_warn("2.0.0", "largest.cliques()", "largest_cliques()") largest_cliques(graph = graph) } # nocov end @@ -113,7 +113,7 @@ largest.cliques <- function(graph) { #' @export independent.vertex.sets <- function(graph, min = NULL, max = NULL) { # nocov start - lifecycle::deprecate_soft("2.0.0", "independent.vertex.sets()", "ivs()") + lifecycle::deprecate_warn("2.0.0", "independent.vertex.sets()", "ivs()") ivs(graph = graph, min = min, max = max) } # nocov end @@ -129,7 +129,7 @@ independent.vertex.sets <- function(graph, min = NULL, max = NULL) { #' @export independence.number <- function(graph) { # nocov start - lifecycle::deprecate_soft("2.0.0", "independence.number()", "ivs_size()") + lifecycle::deprecate_warn("2.0.0", "independence.number()", "ivs_size()") ivs_size(graph = graph) } # nocov end @@ -145,7 +145,7 @@ independence.number <- function(graph) { #' @export clique.number <- function(graph) { # nocov start - lifecycle::deprecate_soft("2.0.0", "clique.number()", "clique_num()") + lifecycle::deprecate_warn("2.0.0", "clique.number()", "clique_num()") clique_num(graph = graph) } # nocov end # IGraph R package @@ -615,7 +615,7 @@ max_ivs <- function(graph) { #' @inheritParams max_ivs #' @keywords internal maximal_ivs <- function(graph) { - lifecycle::deprecate_soft("2.1.0", "maximal_ivs()", "max_ivs()") + lifecycle::deprecate_warn("2.1.0", "maximal_ivs()", "max_ivs()") max_ivs(graph) } From ca6f3d0d4a3f103139dfbc95378217a407b075cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 12:07:58 +0200 Subject: [PATCH 11/48] feat!: bump deprecated functions in R/cohesive.blocks.R --- R/cohesive.blocks.R | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/R/cohesive.blocks.R b/R/cohesive.blocks.R index 35844360284..202ed43dad8 100644 --- a/R/cohesive.blocks.R +++ b/R/cohesive.blocks.R @@ -10,7 +10,7 @@ #' @export exportPajek <- function(blocks, graph, file, project.file = TRUE) { # nocov start - lifecycle::deprecate_soft("2.0.0", "exportPajek()", "export_pajek()") + lifecycle::deprecate_warn("2.0.0", "exportPajek()", "export_pajek()") export_pajek( blocks = blocks, graph = graph, @@ -35,7 +35,7 @@ plotHierarchy <- function( ... ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "plotHierarchy()", "plot_hierarchy()") + lifecycle::deprecate_warn("2.0.0", "plotHierarchy()", "plot_hierarchy()") plot_hierarchy(blocks = blocks, layout = layout, ...) } # nocov end @@ -51,7 +51,7 @@ plotHierarchy <- function( #' @export maxcohesion <- function(blocks) { # nocov start - lifecycle::deprecate_soft("2.0.0", "maxcohesion()", "max_cohesion()") + lifecycle::deprecate_warn("2.0.0", "maxcohesion()", "max_cohesion()") max_cohesion(blocks = blocks) } # nocov end @@ -68,7 +68,7 @@ maxcohesion <- function(blocks) { #' @export graph.cohesion <- function(x, ...) { # nocov start - lifecycle::deprecate_soft("2.0.0", "graph.cohesion()", "cohesion()") + lifecycle::deprecate_warn("2.0.0", "graph.cohesion()", "cohesion()") cohesion(x = x, ...) } # nocov end @@ -84,7 +84,7 @@ graph.cohesion <- function(x, ...) { #' @export cohesive.blocks <- function(graph, labels = TRUE) { # nocov start - lifecycle::deprecate_soft("2.0.0", "cohesive.blocks()", "cohesive_blocks()") + lifecycle::deprecate_warn("2.0.0", "cohesive.blocks()", "cohesive_blocks()") cohesive_blocks(graph = graph, labels = labels) } # nocov end @@ -100,7 +100,7 @@ cohesive.blocks <- function(graph, labels = TRUE) { #' @export blockGraphs <- function(blocks, graph) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "blockGraphs()", "graphs_from_cohesive_blocks()" From 64fb47826edd4351ff074cc983fd7996ed956717 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 12:08:49 +0200 Subject: [PATCH 12/48] feat!: bump deprecated functions in R/community.R --- R/community.R | 42 +++++++++++++++--------------- tests/testthat/_snaps/community.md | 6 ++--- tests/testthat/test-community.R | 6 ++--- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/R/community.R b/R/community.R index 352f534ba11..0d9b8cf3781 100644 --- a/R/community.R +++ b/R/community.R @@ -16,7 +16,7 @@ create.communities <- function( modularity = TRUE ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "create.communities()", "make_clusters()") + lifecycle::deprecate_warn("2.0.0", "create.communities()", "make_clusters()") make_clusters( graph = graph, membership = membership, @@ -45,7 +45,7 @@ walktrap.community <- function( membership = TRUE ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "walktrap.community()", "cluster_walktrap()" @@ -85,7 +85,7 @@ spinglass.community <- function( gamma.minus = 1.0 ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "spinglass.community()", "cluster_spinglass()" @@ -118,7 +118,7 @@ spinglass.community <- function( #' @export showtrace <- function(communities) { # nocov start - lifecycle::deprecate_soft("2.0.0", "showtrace()", "show_trace()") + lifecycle::deprecate_warn("2.0.0", "showtrace()", "show_trace()") show_trace(communities = communities) } # nocov end @@ -134,7 +134,7 @@ showtrace <- function(communities) { #' @export optimal.community <- function(graph, weights = NULL) { # nocov start - lifecycle::deprecate_soft("2.0.0", "optimal.community()", "cluster_optimal()") + lifecycle::deprecate_warn("2.0.0", "optimal.community()", "cluster_optimal()") cluster_optimal(graph = graph, weights = weights) } # nocov end @@ -150,7 +150,7 @@ optimal.community <- function(graph, weights = NULL) { #' @export multilevel.community <- function(graph, weights = NULL, resolution = 1) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "multilevel.community()", "cluster_louvain()" @@ -176,7 +176,7 @@ mod.matrix <- function( directed = TRUE ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "mod.matrix()", "modularity_matrix()") + lifecycle::deprecate_warn("2.0.0", "mod.matrix()", "modularity_matrix()") modularity_matrix( graph = graph, membership = membership, @@ -207,7 +207,7 @@ leading.eigenvector.community <- function( env = parent.frame() ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "leading.eigenvector.community()", "cluster_leading_eigen()" @@ -243,7 +243,7 @@ label.propagation.community <- function( fixed = NULL ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "label.propagation.community()", "cluster_label_prop()" @@ -270,7 +270,7 @@ label.propagation.community <- function( #' @export is.hierarchical <- function(communities) { # nocov start - lifecycle::deprecate_soft("2.0.0", "is.hierarchical()", "is_hierarchical()") + lifecycle::deprecate_warn("2.0.0", "is.hierarchical()", "is_hierarchical()") is_hierarchical(communities = communities) } # nocov end @@ -292,7 +292,7 @@ infomap.community <- function( modularity = TRUE ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "infomap.community()", "cluster_infomap()") + lifecycle::deprecate_warn("2.0.0", "infomap.community()", "cluster_infomap()") cluster_infomap( graph = graph, e.weights = e.weights, @@ -320,7 +320,7 @@ fastgreedy.community <- function( weights = NULL ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "fastgreedy.community()", "cluster_fast_greedy()" @@ -355,7 +355,7 @@ edge.betweenness.community <- function( membership = TRUE ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "edge.betweenness.community()", "cluster_edge_betweenness()" @@ -384,7 +384,7 @@ edge.betweenness.community <- function( #' @export dendPlot <- function(x, mode = igraph_opt("dend.plot.type"), ...) { # nocov start - lifecycle::deprecate_soft("2.0.0", "dendPlot()", "plot_dendrogram()") + lifecycle::deprecate_warn("2.0.0", "dendPlot()", "plot_dendrogram()") plot_dendrogram(x = x, mode = mode, ...) } # nocov end @@ -400,7 +400,7 @@ dendPlot <- function(x, mode = igraph_opt("dend.plot.type"), ...) { #' @export cutat <- function(communities, no, steps) { # nocov start - lifecycle::deprecate_soft("2.0.0", "cutat()", "cut_at()") + lifecycle::deprecate_warn("2.0.0", "cutat()", "cut_at()") cut_at(communities = communities, no = no, steps = steps) } # nocov end @@ -420,7 +420,7 @@ contract.vertices <- function( vertex.attr.comb = igraph_opt("vertex.attr.comb") ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "contract.vertices()", "contract()") + lifecycle::deprecate_warn("2.0.0", "contract.vertices()", "contract()") contract( graph = graph, mapping = mapping, @@ -440,7 +440,7 @@ contract.vertices <- function( #' @export code.length <- function(communities) { # nocov start - lifecycle::deprecate_soft("2.0.0", "code.length()", "code_len()") + lifecycle::deprecate_warn("2.0.0", "code.length()", "code_len()") code_len(communities = communities) } # nocov end # IGraph R package @@ -951,7 +951,7 @@ modularity_matrix <- function( ensure_igraph(graph) if (!missing(membership)) { - lifecycle::deprecate_warn( + lifecycle::deprecate_stop( "2.1.0", "modularity_matrix(membership = 'is no longer used')" ) @@ -1636,7 +1636,7 @@ cluster_leiden <- function( check_dots_empty() if (lifecycle::is_present(resolution_parameter)) { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.1.0", "cluster_leiden(resolution_parameter)", "cluster_leiden(resolution)" @@ -2229,7 +2229,7 @@ cluster_leading_eigen <- function( env = parent.frame() ) { if (is.function(options)) { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "1.6.0", "cluster_leading_eigen(options = 'must be a list')", details = c( @@ -2358,7 +2358,7 @@ cluster_label_prop <- function( fixed = NULL ) { if (...length() > 0) { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "1.6.0", "cluster_label_prop(... = )", details = "Arguments `initial` and `fixed` must be named." diff --git a/tests/testthat/_snaps/community.md b/tests/testthat/_snaps/community.md index e01280a95f5..757b8b0be73 100644 --- a/tests/testthat/_snaps/community.md +++ b/tests/testthat/_snaps/community.md @@ -1,8 +1,8 @@ -# modularity_matrix still accepts a membership argument for compatibility +# modularity_matrix no longer accepts a membership argument for compatibility Code x <- modularity_matrix(karate, membership = rep(1, vcount(karate))) Condition - Warning: - The `membership` argument of `modularity_matrix()` is no longer used as of igraph 2.1.0. + Error: + ! The `membership` argument of `modularity_matrix()` is no longer used as of igraph 2.1.0. diff --git a/tests/testthat/test-community.R b/tests/testthat/test-community.R index a5ba5644e72..6891cc9e76d 100644 --- a/tests/testthat/test-community.R +++ b/tests/testthat/test-community.R @@ -376,11 +376,11 @@ test_that("modularity_matrix works", { expect_equal(karate_modmat1, karate_modmat2) }) -test_that("modularity_matrix still accepts a membership argument for compatibility", { +test_that("modularity_matrix no longer accepts a membership argument for compatibility", { karate <- make_graph("zachary") - expect_snapshot( + expect_snapshot(error = TRUE, { x <- modularity_matrix(karate, membership = rep(1, vcount(karate))) - ) + }) }) test_that("cluster_louvain works", { From 50cd9512db7a7b13ef1d8f37ae231f95f117205c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 12:09:38 +0200 Subject: [PATCH 13/48] feat!: bump deprecated functions in R/components.R --- R/components.R | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/R/components.R b/R/components.R index fab025773b2..1c0ab7b0a12 100644 --- a/R/components.R +++ b/R/components.R @@ -10,7 +10,7 @@ #' @export no.clusters <- function(graph, mode = c("weak", "strong")) { # nocov start - lifecycle::deprecate_soft("2.0.0", "no.clusters()", "count_components()") + lifecycle::deprecate_warn("2.0.0", "no.clusters()", "count_components()") count_components(graph = graph, mode = mode) } # nocov end @@ -31,7 +31,7 @@ decompose.graph <- function( min.vertices = 0 ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "decompose.graph()", "decompose()") + lifecycle::deprecate_warn("2.0.0", "decompose.graph()", "decompose()") decompose( graph = graph, mode = mode, @@ -57,7 +57,7 @@ cluster.distribution <- function( ... ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "cluster.distribution()", "component_distribution()" @@ -82,7 +82,7 @@ cluster.distribution <- function( #' @export biconnected.components <- function(graph) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "biconnected.components()", "biconnected_components()" @@ -102,7 +102,7 @@ biconnected.components <- function(graph) { #' @export articulation.points <- function(graph) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "articulation.points()", "articulation_points()" From 0c57a2ad7a31082e0440ab3e4f9f7349209a9260 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 12:10:27 +0200 Subject: [PATCH 14/48] feat!: bump deprecated functions in R/console.R --- R/console.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/console.R b/R/console.R index 71defc045a7..ff898e1bfe0 100644 --- a/R/console.R +++ b/R/console.R @@ -11,7 +11,7 @@ #' @export igraph.console <- function() { # nocov start - lifecycle::deprecate_soft("2.0.0", "igraph.console()", "console()") + lifecycle::deprecate_warn("2.0.0", "igraph.console()", "console()") console() } # nocov end From 5f5b95858360d34c5bb9192ea2b3c48f5777fd06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 12:11:24 +0200 Subject: [PATCH 15/48] feat!: bump deprecated functions in R/conversion.R --- R/conversion.R | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/R/conversion.R b/R/conversion.R index 230cd369bd1..0634fb46949 100644 --- a/R/conversion.R +++ b/R/conversion.R @@ -10,7 +10,7 @@ #' @export igraph.to.graphNEL <- function(graph) { # nocov start - lifecycle::deprecate_soft("2.0.0", "igraph.to.graphNEL()", "as_graphnel()") + lifecycle::deprecate_warn("2.0.0", "igraph.to.graphNEL()", "as_graphnel()") as_graphnel(graph = graph) } # nocov end @@ -31,7 +31,7 @@ igraph.from.graphNEL <- function( unlist.attrs = TRUE ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "igraph.from.graphNEL()", "graph_from_graphnel()" @@ -60,7 +60,7 @@ graph.adjlist <- function( duplicate = TRUE ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "graph.adjlist()", "graph_from_adj_list()") + lifecycle::deprecate_warn("2.0.0", "graph.adjlist()", "graph_from_adj_list()") graph_from_adj_list(adjlist = adjlist, mode = mode, duplicate = duplicate) } # nocov end @@ -82,7 +82,7 @@ get.incidence <- function( sparse = FALSE ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "get.incidence()", "as_biadjacency_matrix()" @@ -108,7 +108,7 @@ get.incidence <- function( #' @export get.edgelist <- function(graph, names = TRUE) { # nocov start - lifecycle::deprecate_soft("2.0.0", "get.edgelist()", "as_edgelist()") + lifecycle::deprecate_warn("2.0.0", "get.edgelist()", "as_edgelist()") as_edgelist(graph = graph, names = names) } # nocov end @@ -124,7 +124,7 @@ get.edgelist <- function(graph, names = TRUE) { #' @export get.data.frame <- function(x, what = c("edges", "vertices", "both")) { # nocov start - lifecycle::deprecate_soft("2.0.0", "get.data.frame()", "as_data_frame()") + lifecycle::deprecate_warn("2.0.0", "get.data.frame()", "as_data_frame()") as_data_frame(x = x, what = what) } # nocov end @@ -147,7 +147,7 @@ get.adjacency <- function( sparse = igraph_opt("sparsematrices") ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "get.adjacency()", "as_adjacency_matrix()") + lifecycle::deprecate_warn("2.0.0", "get.adjacency()", "as_adjacency_matrix()") as_adjacency_matrix( graph = graph, type = type, @@ -175,7 +175,7 @@ get.adjlist <- function( multiple = TRUE ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "get.adjlist()", "as_adj_list()") + lifecycle::deprecate_warn("2.0.0", "get.adjlist()", "as_adj_list()") as_adj_list(graph = graph, mode = mode, loops = loops, multiple = multiple) } # nocov end @@ -195,7 +195,7 @@ get.adjedgelist <- function( loops = c("twice", "once", "ignore") ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "get.adjedgelist()", "as_adj_edge_list()") + lifecycle::deprecate_warn("2.0.0", "get.adjedgelist()", "as_adj_edge_list()") as_adj_edge_list(graph = graph, mode = mode, loops = loops) } # nocov end # IGraph R package @@ -232,7 +232,7 @@ get.adjacency.dense <- function( if (is.logical(loops)) { loops <- ifelse(loops, "once", "ignore") - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.1.0", "get.adjacency.dense(loops = 'must be a character')", details = sprintf( @@ -412,7 +412,7 @@ as_adj <- function( names = TRUE, sparse = igraph_opt("sparsematrices") ) { - lifecycle::deprecate_soft("2.1.0", "as_adj()", "as_adjacency_matrix()") + lifecycle::deprecate_warn("2.1.0", "as_adj()", "as_adjacency_matrix()") as_adjacency_matrix( graph = graph, @@ -1129,7 +1129,7 @@ as_biadjacency_matrix <- function( #' @export as_incidence_matrix <- function(...) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "1.6.0", "as_incidence_matrix()", "as_biadjacency_matrix()" @@ -1367,7 +1367,7 @@ as.directed <- function( graph, mode = c("mutual", "arbitrary", "random", "acyclic") ) { - lifecycle::deprecate_soft("2.1.0", "as.directed()", "as_directed()") + lifecycle::deprecate_warn("2.1.0", "as.directed()", "as_directed()") as_directed(graph, mode = mode) } @@ -1386,7 +1386,7 @@ as.undirected <- function( mode = c("collapse", "each", "mutual"), edge.attr.comb = igraph_opt("edge.attr.comb") ) { - lifecycle::deprecate_soft("2.1.0", "as.undirected()", "as_undirected()") + lifecycle::deprecate_warn("2.1.0", "as.undirected()", "as_undirected()") as_undirected(graph = graph, mode = mode, edge.attr.comb = edge.attr.comb) } @@ -1402,7 +1402,7 @@ as.undirected <- function( #' @export graph.edgelist <- function(el, directed = TRUE) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "graph.edgelist()", "graph_from_edgelist()" @@ -1422,7 +1422,7 @@ graph.edgelist <- function(el, directed = TRUE) { #' @export graph.data.frame <- function(d, directed = TRUE, vertices = NULL) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "graph.data.frame()", "graph_from_data_frame()" From e039949c52e2658080bc1a1b5f568fc71c26560c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 12:12:15 +0200 Subject: [PATCH 16/48] feat!: bump deprecated functions in R/decomposition.R --- R/decomposition.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/decomposition.R b/R/decomposition.R index 8c8e92b570c..47df101955e 100644 --- a/R/decomposition.R +++ b/R/decomposition.R @@ -16,7 +16,7 @@ is.chordal <- function( newgraph = FALSE ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "is.chordal()", "is_chordal()") + lifecycle::deprecate_warn("2.0.0", "is.chordal()", "is_chordal()") is_chordal( graph = graph, alpha = alpha, From b073b21c1e55ce9cf094b8c17408031e2586a0e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 12:13:13 +0200 Subject: [PATCH 17/48] feat!: bump deprecated functions in R/degseq.R --- R/degseq.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/degseq.R b/R/degseq.R index 76a4401822d..918239d17dd 100644 --- a/R/degseq.R +++ b/R/degseq.R @@ -14,7 +14,7 @@ is.graphical.degree.sequence <- function( allowed.edge.types = c("simple", "loops", "multi", "all") ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "is.graphical.degree.sequence()", "is_graphical()" @@ -38,7 +38,7 @@ is.graphical.degree.sequence <- function( #' @export is.degree.sequence <- function(out.deg, in.deg = NULL) { # nocov start - lifecycle::deprecate_soft("2.0.0", "is.degree.sequence()", "is_degseq()") + lifecycle::deprecate_warn("2.0.0", "is.degree.sequence()", "is_degseq()") is_degseq(out.deg = out.deg, in.deg = in.deg) } # nocov end From 7b5946acf47e62c2911b9e1fa1d53db1bf8fae11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 12:14:13 +0200 Subject: [PATCH 18/48] feat!: bump deprecated functions in R/fit.R --- R/fit.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/fit.R b/R/fit.R index e0849b32a4c..4993d32bc4e 100644 --- a/R/fit.R +++ b/R/fit.R @@ -17,7 +17,7 @@ power.law.fit <- function( ... ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "power.law.fit()", "fit_power_law()") + lifecycle::deprecate_warn("2.0.0", "power.law.fit()", "fit_power_law()") fit_power_law( x = x, xmin = xmin, From 5ec9e2d1d1d8e06fac4e1ca7fe117da3a1e0e26d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 12:15:11 +0200 Subject: [PATCH 19/48] feat!: bump deprecated functions in R/flow.R --- R/flow.R | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/R/flow.R b/R/flow.R index 0609fce12c3..43c3f0bf35c 100644 --- a/R/flow.R +++ b/R/flow.R @@ -10,7 +10,7 @@ #' @export vertex.disjoint.paths <- function(graph, source = NULL, target = NULL) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "vertex.disjoint.paths()", "vertex_disjoint_paths()" @@ -35,7 +35,7 @@ vertex.connectivity <- function( checks = TRUE ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "vertex.connectivity()", "vertex_connectivity()" @@ -60,7 +60,7 @@ vertex.connectivity <- function( #' @export stMincuts <- function(graph, source, target, capacity = NULL) { # nocov start - lifecycle::deprecate_soft("2.0.0", "stMincuts()", "st_min_cuts()") + lifecycle::deprecate_warn("2.0.0", "stMincuts()", "st_min_cuts()") st_min_cuts( graph = graph, source = source, @@ -81,7 +81,7 @@ stMincuts <- function(graph, source, target, capacity = NULL) { #' @export stCuts <- function(graph, source, target) { # nocov start - lifecycle::deprecate_soft("2.0.0", "stCuts()", "st_cuts()") + lifecycle::deprecate_warn("2.0.0", "stCuts()", "st_cuts()") st_cuts(graph = graph, source = source, target = target) } # nocov end @@ -97,7 +97,7 @@ stCuts <- function(graph, source, target) { #' @export minimum.size.separators <- function(graph) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "minimum.size.separators()", "min_separators()" @@ -117,7 +117,7 @@ minimum.size.separators <- function(graph) { #' @export minimal.st.separators <- function(graph) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "minimal.st.separators()", "min_st_separators()" @@ -137,7 +137,7 @@ minimal.st.separators <- function(graph) { #' @export is.separator <- function(graph, candidate) { # nocov start - lifecycle::deprecate_soft("2.0.0", "is.separator()", "is_separator()") + lifecycle::deprecate_warn("2.0.0", "is.separator()", "is_separator()") is_separator(graph = graph, candidate = candidate) } # nocov end @@ -153,7 +153,7 @@ is.separator <- function(graph, candidate) { #' @export is.minimal.separator <- function(graph, candidate) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "is.minimal.separator()", "is_min_separator()" @@ -179,7 +179,7 @@ graph.mincut <- function( value.only = TRUE ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "graph.mincut()", "min_cut()") + lifecycle::deprecate_warn("2.0.0", "graph.mincut()", "min_cut()") min_cut( graph = graph, source = source, @@ -201,7 +201,7 @@ graph.mincut <- function( #' @export graph.maxflow <- function(graph, source, target, capacity = NULL) { # nocov start - lifecycle::deprecate_soft("2.0.0", "graph.maxflow()", "max_flow()") + lifecycle::deprecate_warn("2.0.0", "graph.maxflow()", "max_flow()") max_flow(graph = graph, source = source, target = target, capacity = capacity) } # nocov end @@ -217,7 +217,7 @@ graph.maxflow <- function(graph, source, target, capacity = NULL) { #' @export graph.adhesion <- function(graph, checks = TRUE) { # nocov start - lifecycle::deprecate_soft("2.0.0", "graph.adhesion()", "adhesion()") + lifecycle::deprecate_warn("2.0.0", "graph.adhesion()", "adhesion()") adhesion(graph = graph, checks = checks) } # nocov end @@ -238,7 +238,7 @@ edge.disjoint.paths <- function( checks = TRUE ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "edge.disjoint.paths()", "edge_connectivity()" @@ -268,7 +268,7 @@ edge.connectivity <- function( checks = TRUE ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "edge.connectivity()", "edge_connectivity()" @@ -293,7 +293,7 @@ edge.connectivity <- function( #' @export dominator.tree <- function(graph, root, mode = c("out", "in", "all", "total")) { # nocov start - lifecycle::deprecate_soft("2.0.0", "dominator.tree()", "dominator_tree()") + lifecycle::deprecate_warn("2.0.0", "dominator.tree()", "dominator_tree()") dominator_tree(graph = graph, root = root, mode = mode) } # nocov end # IGraph R package From 42d306ca4ac0f94e6d94ef7eb67168f5469ba010 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 12:16:03 +0200 Subject: [PATCH 20/48] feat!: bump deprecated functions in R/foreign.R --- R/foreign.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/foreign.R b/R/foreign.R index ebf9280b01d..b493c1fdb83 100644 --- a/R/foreign.R +++ b/R/foreign.R @@ -25,7 +25,7 @@ write.graph <- function( ... ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "write.graph()", "write_graph()") + lifecycle::deprecate_warn("2.0.0", "write.graph()", "write_graph()") write_graph(graph = graph, file = file, format = format, ...) } # nocov end @@ -55,7 +55,7 @@ read.graph <- function( ... ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "read.graph()", "read_graph()") + lifecycle::deprecate_warn("2.0.0", "read.graph()", "read_graph()") read_graph(file = file, format = format, ...) } # nocov end @@ -81,7 +81,7 @@ graph.graphdb <- function( directed = TRUE ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "graph.graphdb()", "graph_from_graphdb()") + lifecycle::deprecate_warn("2.0.0", "graph.graphdb()", "graph_from_graphdb()") graph_from_graphdb( url = url, prefix = prefix, From b3a5bcd02bbbe56879da64c170c965f6cab4a0dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 12:16:56 +0200 Subject: [PATCH 21/48] feat!: bump deprecated functions in R/games.R --- R/games.R | 70 ++++++++++++++++++------------------- tests/testthat/test-games.R | 6 ++-- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/R/games.R b/R/games.R index f37cb832403..17d42f7fd94 100644 --- a/R/games.R +++ b/R/games.R @@ -17,7 +17,7 @@ watts.strogatz.game <- function( multiple = FALSE ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "watts.strogatz.game()", "sample_smallworld()" @@ -52,7 +52,7 @@ static.power.law.game <- function( finite.size.correction = TRUE ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "static.power.law.game()", "sample_fitness_pl()" @@ -86,7 +86,7 @@ static.fitness.game <- function( multiple = FALSE ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "static.fitness.game()", "sample_fitness()" @@ -118,7 +118,7 @@ sbm.game <- function( loops = FALSE ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "sbm.game()", "sample_sbm()") + lifecycle::deprecate_warn("2.0.0", "sbm.game()", "sample_sbm()") sample_sbm( n = n, pref.matrix = pref.matrix, @@ -148,7 +148,7 @@ preference.game <- function( loops = FALSE ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "preference.game()", "sample_pref()") + lifecycle::deprecate_warn("2.0.0", "preference.game()", "sample_pref()") sample_pref( nodes = nodes, types = types, @@ -178,7 +178,7 @@ lastcit.game <- function( directed = TRUE ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "lastcit.game()", "sample_last_cit()") + lifecycle::deprecate_warn("2.0.0", "lastcit.game()", "sample_last_cit()") sample_last_cit( n = n, edges = edges, @@ -200,7 +200,7 @@ lastcit.game <- function( #' @export k.regular.game <- function(no.of.nodes, k, directed = FALSE, multiple = FALSE) { # nocov start - lifecycle::deprecate_soft("2.0.0", "k.regular.game()", "sample_k_regular()") + lifecycle::deprecate_warn("2.0.0", "k.regular.game()", "sample_k_regular()") sample_k_regular( no.of.nodes = no.of.nodes, k = k, @@ -226,7 +226,7 @@ interconnected.islands.game <- function( n.inter ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "interconnected.islands.game()", "sample_islands()" @@ -251,7 +251,7 @@ interconnected.islands.game <- function( #' @export grg.game <- function(nodes, radius, torus = FALSE, coords = FALSE) { # nocov start - lifecycle::deprecate_soft("2.0.0", "grg.game()", "sample_grg()") + lifecycle::deprecate_warn("2.0.0", "grg.game()", "sample_grg()") sample_grg(nodes = nodes, radius = radius, torus = torus, coords = coords) } # nocov end @@ -267,7 +267,7 @@ grg.game <- function(nodes, radius, torus = FALSE, coords = FALSE) { #' @export growing.random.game <- function(n, m = 1, directed = TRUE, citation = FALSE) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "growing.random.game()", "sample_growing()" @@ -293,7 +293,7 @@ forest.fire.game <- function( directed = TRUE ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "forest.fire.game()", "sample_forestfire()" @@ -326,7 +326,7 @@ establishment.game <- function( directed = FALSE ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "establishment.game()", "sample_traits()") + lifecycle::deprecate_warn("2.0.0", "establishment.game()", "sample_traits()") sample_traits( nodes = nodes, types = types, @@ -353,7 +353,7 @@ degree.sequence.game <- function( method = c("simple", "vl", "simple.no.multiple", "simple.no.multiple.uniform") ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "degree.sequence.game()", "sample_degseq()" @@ -377,7 +377,7 @@ connect.neighborhood <- function( mode = c("all", "out", "in", "total") ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "connect.neighborhood()", "connect()") + lifecycle::deprecate_warn("2.0.0", "connect.neighborhood()", "connect()") connect(graph = graph, order = order, mode = mode) } # nocov end @@ -400,7 +400,7 @@ citing.cited.type.game <- function( attr = TRUE ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "citing.cited.type.game()", "sample_cit_cit_types()" @@ -434,7 +434,7 @@ cited.type.game <- function( attr = TRUE ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "cited.type.game()", "sample_cit_types()") + lifecycle::deprecate_warn("2.0.0", "cited.type.game()", "sample_cit_types()") sample_cit_types( n = n, edges = edges, @@ -464,7 +464,7 @@ callaway.traits.game <- function( directed = FALSE ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "callaway.traits.game()", "sample_traits_callaway()" @@ -499,7 +499,7 @@ bipartite.random.game <- function( mode = c("out", "in", "all") ) { # nocov start - lifecycle::deprecate_warn( + lifecycle::deprecate_stop( "2.0.0", "bipartite.random.game()", details = "Use sample_bipartite_gnp() or sample_bipartite_gnm()" @@ -538,7 +538,7 @@ barabasi.game <- function( start.graph = NULL ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "barabasi.game()", "sample_pa()") + lifecycle::deprecate_warn("2.0.0", "barabasi.game()", "sample_pa()") sample_pa( n = n, power = power, @@ -576,7 +576,7 @@ ba.game <- function( start.graph = NULL ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "ba.game()", "sample_pa()") + lifecycle::deprecate_warn("2.0.0", "ba.game()", "sample_pa()") sample_pa( n = n, power = power, @@ -609,7 +609,7 @@ asymmetric.preference.game <- function( loops = FALSE ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "asymmetric.preference.game()", "sample_asym_pref()" @@ -650,7 +650,7 @@ aging.barabasi.game <- function( time.window = NULL ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "aging.barabasi.game()", "sample_pa_age()") + lifecycle::deprecate_warn("2.0.0", "aging.barabasi.game()", "sample_pa_age()") sample_pa_age( n = n, pa.exp = pa.exp, @@ -696,7 +696,7 @@ aging.ba.game <- function( time.window = NULL ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "aging.ba.game()", "sample_pa_age()") + lifecycle::deprecate_warn("2.0.0", "aging.ba.game()", "sample_pa_age()") sample_pa_age( n = n, pa.exp = pa.exp, @@ -742,7 +742,7 @@ aging.prefatt.game <- function( time.window = NULL ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "aging.prefatt.game()", "sample_pa_age()") + lifecycle::deprecate_warn("2.0.0", "aging.prefatt.game()", "sample_pa_age()") sample_pa_age( n = n, pa.exp = pa.exp, @@ -1158,10 +1158,10 @@ erdos.renyi.game <- function( type <- igraph_match_arg(type) if (type == "gnp") { - lifecycle::deprecate_soft("0.8.0", "erdos.renyi.game()", "sample_gnp()") + lifecycle::deprecate_warn("0.8.0", "erdos.renyi.game()", "sample_gnp()") sample_gnp(n = n, p = p.or.m, directed = directed, loops = loops) } else if (type == "gnm") { - lifecycle::deprecate_soft("0.8.0", "erdos.renyi.game()", "sample_gnm()") + lifecycle::deprecate_warn("0.8.0", "erdos.renyi.game()", "sample_gnm()") sample_gnm(n = n, m = p.or.m, directed = directed, loops = loops) } } @@ -1178,10 +1178,10 @@ random.graph.game <- function( type <- igraph_match_arg(type) if (type == "gnp") { - lifecycle::deprecate_soft("0.8.0", "random.graph.game()", "sample_gnp()") + lifecycle::deprecate_warn("0.8.0", "random.graph.game()", "sample_gnp()") sample_gnp(n = n, p = p.or.m, directed = directed, loops = loops) } else if (type == "gnm") { - lifecycle::deprecate_soft("0.8.0", "random.graph.game()", "sample_gnm()") + lifecycle::deprecate_warn("0.8.0", "random.graph.game()", "sample_gnm()") sample_gnm(n = n, m = p.or.m, directed = directed, loops = loops) } } @@ -1388,7 +1388,7 @@ sample_degseq <- function( ) if (method == "simple") { - lifecycle::deprecate_warn( + lifecycle::deprecate_stop( "2.1.0", "sample_degseq(method = 'must be configuration instead of simple')" ) @@ -1396,7 +1396,7 @@ sample_degseq <- function( } if (method == "simple.no.multiple") { - lifecycle::deprecate_warn( + lifecycle::deprecate_stop( "2.1.0", "sample_degseq(method = 'must be fast.heur.simple instead of simple.no.multiple')" ) @@ -1404,7 +1404,7 @@ sample_degseq <- function( } if (method == "simple.no.multiple.uniform") { - lifecycle::deprecate_warn( + lifecycle::deprecate_stop( "2.1.0", "sample_degseq(method = 'must be configuration.simple instead of simple.no.multiple.uniform')" ) @@ -2474,14 +2474,14 @@ sample_bipartite <- function( mode <- igraph_match_arg(mode) if (type == "gnp") { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.2.0", "sample_bipartite()", "sample_bipartite_gnp()" ) sample_bipartite_gnp(n1, n2, p, directed = directed, mode = mode) } else if (type == "gnm") { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.2.0", "sample_bipartite()", "sample_bipartite_gnm()" @@ -2497,14 +2497,14 @@ sample_bipartite <- function( #' @export bipartite <- function(..., type = NULL) { if (is.null(type) || type == "gnp") { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.1.3", "bipartite()", "bipartite_gnp()" ) bipartite_gnp(...) } else if (type == "gnm") { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.1.3", "bipartite()", "bipartite_gnm()" diff --git a/tests/testthat/test-games.R b/tests/testthat/test-games.R index 46b4c1e7bb5..8f68f2842b0 100644 --- a/tests/testthat/test-games.R +++ b/tests/testthat/test-games.R @@ -155,17 +155,17 @@ test_that("sample_degseq supports the sample_(...) syntax", { test_that("sample_degseq works() -- old method names", { withr::local_options("lifecycle_verbosity" = "warning") - expect_warning( + expect_error( sample_degseq(c(1, 1, 2, 2, 2), method = "simple"), "must be" ) - expect_warning( + expect_error( sample_degseq(c(1, 1, 2, 2, 2), method = "simple.no.multiple"), "must be" ) - expect_warning( + expect_error( sample_degseq(c(1, 1, 2, 2, 2), method = "simple.no.multiple.uniform"), "must be" ) From f0e458212d0a356f71ad91b7db810282ecd83452 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 12:17:49 +0200 Subject: [PATCH 22/48] feat!: bump deprecated functions in R/glet.R --- R/glet.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/glet.R b/R/glet.R index 252b227cfe8..8122a59f55f 100644 --- a/R/glet.R +++ b/R/glet.R @@ -16,7 +16,7 @@ graphlets.project <- function( Mu = rep(1, length(cliques)) ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "graphlets.project()", "graphlet_proj()") + lifecycle::deprecate_warn("2.0.0", "graphlets.project()", "graphlet_proj()") graphlet_proj( graph = graph, weights = weights, @@ -38,7 +38,7 @@ graphlets.project <- function( #' @export graphlets.candidate.basis <- function(graph, weights = NULL) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "graphlets.candidate.basis()", "graphlet_basis()" From 06f99ba8b2452fa6e507fe04d89731dd05a4401d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 12:18:43 +0200 Subject: [PATCH 23/48] feat!: bump deprecated functions in R/hrg.R --- R/hrg.R | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/R/hrg.R b/R/hrg.R index b8eb3c4a860..83f65d16c7d 100644 --- a/R/hrg.R +++ b/R/hrg.R @@ -16,7 +16,7 @@ hrg.predict <- function( num.bins = 25 ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "hrg.predict()", "predict_edges()") + lifecycle::deprecate_warn("2.0.0", "hrg.predict()", "predict_edges()") predict_edges( graph = graph, hrg = hrg, @@ -38,7 +38,7 @@ hrg.predict <- function( #' @export hrg.fit <- function(graph, hrg = NULL, start = FALSE, steps = 0) { # nocov start - lifecycle::deprecate_soft("2.0.0", "hrg.fit()", "fit_hrg()") + lifecycle::deprecate_warn("2.0.0", "hrg.fit()", "fit_hrg()") fit_hrg(graph = graph, hrg = hrg, start = start, steps = steps) } # nocov end @@ -54,7 +54,7 @@ hrg.fit <- function(graph, hrg = NULL, start = FALSE, steps = 0) { #' @export hrg.game <- function(hrg) { # nocov start - lifecycle::deprecate_soft("2.0.0", "hrg.game()", "sample_hrg()") + lifecycle::deprecate_warn("2.0.0", "hrg.game()", "sample_hrg()") sample_hrg(hrg = hrg) } # nocov end @@ -70,7 +70,7 @@ hrg.game <- function(hrg) { #' @export hrg.dendrogram <- function(hrg) { # nocov start - lifecycle::deprecate_soft("2.0.0", "hrg.dendrogram()", "hrg_tree()") + lifecycle::deprecate_warn("2.0.0", "hrg.dendrogram()", "hrg_tree()") hrg_tree(hrg = hrg) } # nocov end @@ -86,7 +86,7 @@ hrg.dendrogram <- function(hrg) { #' @export hrg.create <- function(graph, prob) { # nocov start - lifecycle::deprecate_soft("2.0.0", "hrg.create()", "hrg()") + lifecycle::deprecate_warn("2.0.0", "hrg.create()", "hrg()") hrg(graph = graph, prob = prob) } # nocov end @@ -107,7 +107,7 @@ hrg.consensus <- function( num.samples = 10000 ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "hrg.consensus()", "consensus_tree()") + lifecycle::deprecate_warn("2.0.0", "hrg.consensus()", "consensus_tree()") consensus_tree( graph = graph, hrg = hrg, From ad0fc888105b08bd85caf3ad05639ac6c3b0335d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 12:19:30 +0200 Subject: [PATCH 24/48] feat!: bump deprecated functions in R/incidence.R --- R/incidence.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/incidence.R b/R/incidence.R index 3937ad025af..886aa1a9f8c 100644 --- a/R/incidence.R +++ b/R/incidence.R @@ -17,7 +17,7 @@ graph.incidence <- function( add.names = NULL ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "graph.incidence()", "graph_from_biadjacency_matrix()" @@ -271,7 +271,7 @@ graph_from_biadjacency_matrix <- function( #' @export from_incidence_matrix <- function(...) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "1.6.0", "graph_from_incidence_matrix()", "graph_from_biadjacency_matrix()" @@ -294,7 +294,7 @@ from_incidence_matrix <- function(...) { #' @export graph_from_incidence_matrix <- function(...) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "1.6.0", "graph_from_incidence_matrix()", "graph_from_biadjacency_matrix()" From c37512d0208ebaaef5031827aea44e7144ae8fac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 12:20:15 +0200 Subject: [PATCH 25/48] feat!: bump deprecated functions in R/interface.R --- R/interface.R | 16 ++++++++-------- tests/testthat/test-interface.R | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/R/interface.R b/R/interface.R index 7533cfb8285..9cd977cb47c 100644 --- a/R/interface.R +++ b/R/interface.R @@ -10,7 +10,7 @@ #' @export is.directed <- function(graph) { # nocov start - lifecycle::deprecate_soft("2.0.0", "is.directed()", "is_directed()") + lifecycle::deprecate_warn("2.0.0", "is.directed()", "is_directed()") is_directed(graph = graph) } # nocov end @@ -26,7 +26,7 @@ is.directed <- function(graph) { #' @export delete.vertices <- function(graph, v) { # nocov start - lifecycle::deprecate_soft("2.0.0", "delete.vertices()", "delete_vertices()") + lifecycle::deprecate_warn("2.0.0", "delete.vertices()", "delete_vertices()") delete_vertices(graph = graph, v = v) } # nocov end @@ -42,7 +42,7 @@ delete.vertices <- function(graph, v) { #' @export delete.edges <- function(graph, edges) { # nocov start - lifecycle::deprecate_soft("2.0.0", "delete.edges()", "delete_edges()") + lifecycle::deprecate_warn("2.0.0", "delete.edges()", "delete_edges()") delete_edges(graph = graph, edges = edges) } # nocov end @@ -58,7 +58,7 @@ delete.edges <- function(graph, edges) { #' @export add.vertices <- function(graph, nv, ..., attr = list()) { # nocov start - lifecycle::deprecate_soft("2.0.0", "add.vertices()", "add_vertices()") + lifecycle::deprecate_warn("2.0.0", "add.vertices()", "add_vertices()") add_vertices(graph = graph, nv = nv, attr = attr, ...) } # nocov end @@ -74,7 +74,7 @@ add.vertices <- function(graph, nv, ..., attr = list()) { #' @export add.edges <- function(graph, edges, ..., attr = list()) { # nocov start - lifecycle::deprecate_soft("2.0.0", "add.edges()", "add_edges()") + lifecycle::deprecate_warn("2.0.0", "add.edges()", "add_edges()") add_edges(graph = graph, edges = edges, attr = attr, ...) } # nocov end # IGraph R package @@ -474,7 +474,7 @@ el_to_vec <- function(x, call = rlang::caller_env()) { "get_edge_ids(vp = 'is not allowed to be a 2 times 2 matrix')" ) } else if (nrow == 2) { - lifecycle::deprecate_warn( + lifecycle::deprecate_stop( "2.1.5", "get_edge_ids(vp = 'supplied as a matrix should be a n times 2 matrix, not 2 times n')", details = "either transpose the matrix with t() or convert it to a data.frame with two columns." @@ -584,9 +584,9 @@ get.edge.ids <- function( lifecycle::deprecate_stop("2.0.0", "get.edge.ids(multi = )") } - lifecycle::deprecate_soft("2.0.0", "get.edge.ids(multi = )") + lifecycle::deprecate_warn("2.0.0", "get.edge.ids(multi = )") } - lifecycle::deprecate_soft("2.1.0", "get.edge.ids()", "get_edge_ids()") + lifecycle::deprecate_warn("2.1.0", "get.edge.ids()", "get_edge_ids()") get_edge_ids(graph = graph, vp = vp, directed = directed, error = error) } diff --git a/tests/testthat/test-interface.R b/tests/testthat/test-interface.R index 0e73189645e..9be76e65bc9 100644 --- a/tests/testthat/test-interface.R +++ b/tests/testthat/test-interface.R @@ -220,7 +220,7 @@ test_that("get_edge_id() errors correctly for wrong matrices", { mat <- matrix(c(1, 2, 3, 4), nrow = 2, ncol = 2) lifecycle::expect_defunct(get_edge_ids(g, mat)) mat <- matrix(c(1, 2, 1, 3, 1, 4), nrow = 2, ncol = 3) - lifecycle::expect_deprecated(get_edge_ids(g, mat)) + lifecycle::expect_defunct(get_edge_ids(g, mat)) }) test_that("invalidate_cache works", { From 2f2d008be8d64962c6274de8127513305af49521 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 12:21:10 +0200 Subject: [PATCH 26/48] feat!: bump deprecated functions in R/layout.R --- NAMESPACE | 1 - R/layout.R | 63 +++++++++++++++++-------------------------- man/layout.grid.3d.Rd | 26 ------------------ 3 files changed, 24 insertions(+), 66 deletions(-) delete mode 100644 man/layout.grid.3d.Rd diff --git a/NAMESPACE b/NAMESPACE index 50337bd1418..9a426a10c28 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -609,7 +609,6 @@ export(layout.fruchterman.reingold.grid) export(layout.gem) export(layout.graphopt) export(layout.grid) -export(layout.grid.3d) export(layout.kamada.kawai) export(layout.lgl) export(layout.mds) diff --git a/R/layout.R b/R/layout.R index 1f14bbe0fb6..cd1166e1b5b 100644 --- a/R/layout.R +++ b/R/layout.R @@ -10,7 +10,7 @@ #' @export piecewise.layout <- function(graph, layout = layout_with_kk, ...) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "piecewise.layout()", "layout_components()" @@ -38,7 +38,7 @@ layout.sugiyama <- function( attributes = c("default", "all", "none") ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "layout.sugiyama()", "layout_with_sugiyama()" @@ -66,7 +66,7 @@ layout.sugiyama <- function( #' @export layout.star <- function(graph, center = V(graph)[1], order = NULL) { # nocov start - lifecycle::deprecate_soft("2.0.0", "layout.star()", "layout_as_star()") + lifecycle::deprecate_warn("2.0.0", "layout.star()", "layout_as_star()") layout_as_star(graph = graph, center = center, order = order) } # nocov end @@ -90,7 +90,7 @@ layout.norm <- function( zmax = 1 ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "layout.norm()", "norm_coords()") + lifecycle::deprecate_warn("2.0.0", "layout.norm()", "norm_coords()") norm_coords( layout = layout, xmin = xmin, @@ -114,7 +114,7 @@ layout.norm <- function( #' @export layout.merge <- function(graphs, layouts, method = "dla") { # nocov start - lifecycle::deprecate_soft("2.0.0", "layout.merge()", "merge_coords()") + lifecycle::deprecate_warn("2.0.0", "layout.merge()", "merge_coords()") merge_coords(graphs = graphs, layouts = layouts, method = method) } # nocov end @@ -135,7 +135,7 @@ layout.mds <- function( options = arpack_defaults() ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "layout.mds()", "layout_with_mds()") + lifecycle::deprecate_warn("2.0.0", "layout.mds()", "layout_with_mds()") layout_with_mds(graph = graph, dist = dist, dim = dim, options = options) } # nocov end @@ -151,7 +151,7 @@ layout.mds <- function( #' @export layout.grid <- function(graph, width = 0, height = 0, dim = 2) { # nocov start - lifecycle::deprecate_soft("2.0.0", "layout.grid()", "layout_on_grid()") + lifecycle::deprecate_warn("2.0.0", "layout.grid()", "layout_on_grid()") layout_on_grid(graph = graph, width = width, height = height, dim = dim) } # nocov end @@ -176,7 +176,7 @@ layout.graphopt <- function( max.sa.movement = 5 ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "layout.graphopt()", "layout_with_graphopt()" @@ -212,7 +212,7 @@ layout.gem <- function( temp.init = sqrt(max(vcount(graph), 1)) ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "layout.gem()", "layout_with_gem()") + lifecycle::deprecate_warn("2.0.0", "layout.gem()", "layout_with_gem()") layout_with_gem( graph = graph, coords = coords, @@ -246,7 +246,7 @@ layout.davidson.harel <- function( weight.node.edge.dist = 0.2 * (1 - edge_density(graph)) ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "layout.davidson.harel()", "layout_with_dh()" @@ -283,7 +283,7 @@ layout.bipartite <- function( maxiter = 100 ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "layout.bipartite()", "layout_as_bipartite()" @@ -309,7 +309,7 @@ layout.bipartite <- function( #' @export layout.auto <- function(graph, dim = 2, ...) { # nocov start - lifecycle::deprecate_soft("2.0.0", "layout.auto()", "layout_nicely()") + lifecycle::deprecate_warn("2.0.0", "layout.auto()", "layout_nicely()") layout_nicely(graph = graph, dim = dim, ...) } # nocov end @@ -890,7 +890,7 @@ as_tree <- function(...) layout_spec(layout_as_tree, ...) #' @keywords internal #' @export layout.reingold.tilford <- function(..., params = list()) { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.1.0", "layout.reingold.tilford()", "layout_as_tree()" @@ -955,7 +955,7 @@ in_circle <- function(...) layout_spec(layout_in_circle, ...) #' @keywords internal #' @export layout.circle <- function(..., params = list()) { - lifecycle::deprecate_soft("2.1.0", "layout.circle()", "layout_in_circle()") + lifecycle::deprecate_warn("2.1.0", "layout.circle()", "layout_in_circle()") do_call(layout_in_circle, .args = c(list(...), params)) } @@ -1144,21 +1144,6 @@ layout_on_grid <- function(graph, width = 0, height = 0, dim = 2) { #' @param ... Passed to `layout_on_grid()`. #' @export on_grid <- function(...) layout_spec(layout_on_grid, ...) - - -#' Simple grid layout -#' @description -#' `r lifecycle::badge("deprecated")` -#' -#' Use [layout_on_grid()]. -#' @inheritParams layout_on_grid -#' @export -#' @export -#' @keywords internal -layout.grid.3d <- function(graph, width = 0, height = 0) { - lifecycle::deprecate_stop("2.1.0", "layout.grid.3d()", "layout_on_grid()") -} - ## ---------------------------------------------------------------- #' Graph layout with vertices on the surface of a sphere @@ -1203,7 +1188,7 @@ on_sphere <- function(...) layout_spec(layout_on_sphere, ...) #' @keywords internal #' @export layout.sphere <- function(..., params = list()) { - lifecycle::deprecate_soft("2.1.0", "layout.sphere()", "layout_on_sphere()") + lifecycle::deprecate_warn("2.1.0", "layout.sphere()", "layout_on_sphere()") do_call(layout_on_sphere, .args = c(list(...), params)) } @@ -1258,7 +1243,7 @@ randomly <- function(...) layout_spec(layout_randomly, ...) #' @keywords internal #' @export layout.random <- function(..., params = list()) { - lifecycle::deprecate_soft("2.1.0", "layout.random()", "layout_randomly()") + lifecycle::deprecate_warn("2.1.0", "layout.random()", "layout_randomly()") do_call(layout_randomly, .args = c(list(...), params)) } @@ -1624,7 +1609,7 @@ with_fr <- function(...) layout_spec(layout_with_fr, ...) #' @keywords internal #' @export layout.fruchterman.reingold <- function(..., params = list()) { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.1.0", "layout.fruchterman.reingold()", "layout_with_fr()" @@ -1982,7 +1967,7 @@ with_kk <- function(...) layout_spec(layout_with_kk, ...) #' @keywords internal #' @export layout.kamada.kawai <- function(..., params = list()) { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.1.0", "layout.kamada.kawai()", "layout_with_kk()" @@ -2068,7 +2053,7 @@ with_lgl <- function(...) layout_spec(layout_with_lgl, ...) #' @keywords internal #' @export layout.lgl <- function(..., params = list()) { - lifecycle::deprecate_soft("2.1.0", "layout.lgl()", "layout_with_lgl()") + lifecycle::deprecate_warn("2.1.0", "layout.lgl()", "layout_with_lgl()") do_call(layout_with_lgl, .args = c(list(...), params)) } @@ -2124,7 +2109,7 @@ layout_with_mds <- function( options = arpack_defaults() ) { if (is.function(options)) { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "1.6.0", "layout_with_mds(options = 'must be a list')", details = c( @@ -2659,7 +2644,7 @@ layout_components <- function(graph, layout = layout_with_kk, ...) { #' @export #' @keywords internal layout.spring <- function(graph, ...) { - lifecycle::deprecate_warn("2.1.0", "layout.spring()", "layout_with_fr()") + lifecycle::deprecate_stop("2.1.0", "layout.spring()", "layout_with_fr()") layout_with_fr(graph) } @@ -2677,7 +2662,7 @@ layout.spring <- function(graph, ...) { #' @keywords internal #' @export layout.svd <- function(graph, ...) { - lifecycle::deprecate_warn("2.1.0", "layout.svd()", "layout_with_fr()") + lifecycle::deprecate_stop("2.1.0", "layout.svd()", "layout_with_fr()") layout_with_fr(graph) } @@ -2696,7 +2681,7 @@ layout.svd <- function(graph, ...) { #' @keywords internal #' @export layout.fruchterman.reingold.grid <- function(graph, ...) { - lifecycle::deprecate_warn( + lifecycle::deprecate_stop( "2.1.0", "layout.fruchterman.reingold.grid()", "layout_with_fr()" @@ -2723,7 +2708,7 @@ layout.drl <- function( dim = 2 ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "layout.drl()", "layout_with_drl()") + lifecycle::deprecate_warn("2.0.0", "layout.drl()", "layout_with_drl()") layout_with_drl( graph = graph, use.seed = use.seed, diff --git a/man/layout.grid.3d.Rd b/man/layout.grid.3d.Rd deleted file mode 100644 index e61f36a8654..00000000000 --- a/man/layout.grid.3d.Rd +++ /dev/null @@ -1,26 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/layout.R -\name{layout.grid.3d} -\alias{layout.grid.3d} -\title{Simple grid layout} -\usage{ -layout.grid.3d(graph, width = 0, height = 0) -} -\arguments{ -\item{graph}{The input graph.} - -\item{width}{The number of vertices in a single row of the grid. If this is -zero or negative, then for 2d layouts the width of the grid will be the -square root of the number of vertices in the graph, rounded up to the next -integer. Similarly, it will be the cube root for 3d layouts.} - -\item{height}{The number of vertices in a single column of the grid, for -three dimensional layouts. If this is zero or negative, then it is -determinted automatically.} -} -\description{ -\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} - -Use \code{\link[=layout_on_grid]{layout_on_grid()}}. -} -\keyword{internal} From 33f52eb732e1c0ad437392f8afc160b33779afc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 12:21:53 +0200 Subject: [PATCH 27/48] feat!: bump deprecated functions in R/make.R --- R/make.R | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/R/make.R b/R/make.R index ebb264bed6f..9301e1552f1 100644 --- a/R/make.R +++ b/R/make.R @@ -18,7 +18,7 @@ graph <- function( simplify = TRUE ) { # nocov start - lifecycle::deprecate_soft("2.1.0", "graph()", "make_graph()") + lifecycle::deprecate_warn("2.1.0", "graph()", "make_graph()") if (inherits(edges, "formula")) { if (!missing(n)) { cli::cli_abort("{.arg n} should not be given for graph literals") @@ -143,7 +143,7 @@ graph.famous <- function( simplify = TRUE ) { # nocov start - lifecycle::deprecate_soft("2.1.0", "graph.famous()", "make_graph()") + lifecycle::deprecate_warn("2.1.0", "graph.famous()", "make_graph()") if (inherits(edges, "formula")) { if (!missing(n)) { cli::cli_abort("{.arg n} should not be given for graph literals") @@ -260,7 +260,7 @@ graph.famous <- function( #' @export line.graph <- function(graph) { # nocov start - lifecycle::deprecate_soft("2.1.0", "line.graph()", "make_line_graph()") + lifecycle::deprecate_warn("2.1.0", "line.graph()", "make_line_graph()") ensure_igraph(graph) res <- linegraph_impl( @@ -284,7 +284,7 @@ line.graph <- function(graph) { #' @export graph.ring <- function(n, directed = FALSE, mutual = FALSE, circular = TRUE) { # nocov start - lifecycle::deprecate_soft("2.1.0", "graph.ring()", "make_ring()") + lifecycle::deprecate_warn("2.1.0", "graph.ring()", "make_ring()") res <- ring_impl( n, directed, @@ -311,7 +311,7 @@ graph.ring <- function(n, directed = FALSE, mutual = FALSE, circular = TRUE) { #' @export graph.tree <- function(n, children = 2, mode = c("out", "in", "undirected")) { # nocov start - lifecycle::deprecate_soft("2.1.0", "graph.tree()", "make_tree()") + lifecycle::deprecate_warn("2.1.0", "graph.tree()", "make_tree()") mode <- igraph_match_arg(mode) res <- kary_tree_impl( @@ -343,7 +343,7 @@ graph.star <- function( center = 1 ) { # nocov start - lifecycle::deprecate_soft("2.1.0", "graph.star()", "make_star()") + lifecycle::deprecate_warn("2.1.0", "graph.star()", "make_star()") mode <- igraph_match_arg(mode) res <- star_impl( @@ -371,7 +371,7 @@ graph.star <- function( #' @export graph.lcf <- function(n, shifts, repeats = 1) { # nocov start - lifecycle::deprecate_soft("2.1.0", "graph.lcf()", "graph_from_lcf()") + lifecycle::deprecate_warn("2.1.0", "graph.lcf()", "graph_from_lcf()") # Use the _impl function lcf_vector_impl( n = n, @@ -401,14 +401,14 @@ graph.lattice <- function( circular = deprecated() ) { # nocov start - lifecycle::deprecate_soft("2.1.0", "graph.lattice()", "make_lattice()") + lifecycle::deprecate_warn("2.1.0", "graph.lattice()", "make_lattice()") if (is.numeric(length) && length != floor(length)) { cli::cli_warn("{.arg length} was rounded to the nearest integer.") length <- round(length) } if (lifecycle::is_present(circular)) { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.3", "graph.lattice(circular = 'use periodic argument instead')", details = c("`circular` is now deprecated, use `periodic` instead.") @@ -459,7 +459,7 @@ graph.lattice <- function( #' @export graph.kautz <- function(m, n) { # nocov start - lifecycle::deprecate_soft("2.1.0", "graph.kautz()", "make_kautz_graph()") + lifecycle::deprecate_warn("2.1.0", "graph.kautz()", "make_kautz_graph()") res <- kautz_impl( m = m, n = n @@ -484,7 +484,7 @@ graph.kautz <- function(m, n) { #' @export graph.full.citation <- function(n, directed = TRUE) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.1.0", "graph.full.citation()", "make_full_citation_graph()" @@ -516,7 +516,7 @@ graph.full.bipartite <- function( mode = c("all", "out", "in") ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.1.0", "graph.full.bipartite()", "make_full_bipartite_graph()" @@ -559,7 +559,7 @@ graph.full.bipartite <- function( #' @export graph.full <- function(n, directed = FALSE, loops = FALSE) { # nocov start - lifecycle::deprecate_soft("2.1.0", "graph.full()", "make_full_graph()") + lifecycle::deprecate_warn("2.1.0", "graph.full()", "make_full_graph()") res <- full_impl( n, directed, @@ -584,7 +584,7 @@ graph.full <- function(n, directed = FALSE, loops = FALSE) { #' @export graph.formula <- function(..., simplify = TRUE) { # nocov start - lifecycle::deprecate_soft("2.1.0", "graph.formula()", "graph_from_literal()") + lifecycle::deprecate_warn("2.1.0", "graph.formula()", "graph_from_literal()") mf <- as.list(match.call())[-1] graph_from_literal_i(mf) } # nocov end @@ -601,7 +601,7 @@ graph.formula <- function(..., simplify = TRUE) { #' @export graph.extended.chordal.ring <- function(n, w, directed = FALSE) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.1.0", "graph.extended.chordal.ring()", "make_chordal_ring()" @@ -630,7 +630,7 @@ graph.extended.chordal.ring <- function(n, w, directed = FALSE) { #' @export graph.empty <- function(n = 0, directed = TRUE) { # nocov start - lifecycle::deprecate_soft("2.1.0", "graph.empty()", "make_empty_graph()") + lifecycle::deprecate_warn("2.1.0", "graph.empty()", "make_empty_graph()") # Function call res <- empty_impl( n = n, @@ -652,7 +652,7 @@ graph.empty <- function(n = 0, directed = TRUE) { #' @export graph.de.bruijn <- function(m, n) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.1.0", "graph.de.bruijn()", "make_de_bruijn_graph()" @@ -681,7 +681,7 @@ graph.de.bruijn <- function(m, n) { #' @export graph.bipartite <- function(types, edges, directed = FALSE) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.1.0", "graph.bipartite()", "make_bipartite_graph()" @@ -732,7 +732,7 @@ graph.bipartite <- function(types, edges, directed = FALSE) { #' @export graph.atlas <- function(n) { # nocov start - lifecycle::deprecate_soft("2.1.0", "graph.atlas()", "graph_from_atlas()") + lifecycle::deprecate_warn("2.1.0", "graph.atlas()", "graph_from_atlas()") res <- atlas_impl( number = n ) @@ -1023,7 +1023,7 @@ sample_ <- function(...) { #' graph_(cbind(1:5, 2:6), from_edgelist(directed = FALSE)) #' graph_(cbind(1:5, 2:6), from_edgelist(), directed = FALSE) graph_ <- function(...) { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.1.0", "graph_()", details = c( @@ -1957,7 +1957,7 @@ make_lattice <- function( circular = deprecated() ) { if (lifecycle::is_present(circular)) { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.3", "make_lattice(circular = 'use periodic argument instead')", details = c("`circular` is now deprecated, use `periodic` instead.") From 8d6f397329030beedadb04db747df7b5bdc5039b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 12:21:53 +0200 Subject: [PATCH 28/48] chore: update NEWS.md for lifecycle bumps !NEWS --- NEWS.md | 298 ++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 257 insertions(+), 41 deletions(-) diff --git a/NEWS.md b/NEWS.md index fdb48b31656..cd923355615 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,48 +1,264 @@ -# igraph 2.3.1.9003 - -- Ci: Unify fledge.yaml across cynkratemplate and fledge (#86). - - -# igraph 2.3.1.9002 - -## Chore - -- Add ccache to `.gitignore` and `.Rbuildignore`. - -## Continuous integration - -- Create snapshot update PR against correct branch. - -- Add reference to `/apply-patch` workflow in commit message. - -- Clarify rationale for not deploying on schedule. - -- Really deploy pkgdown only on push. - -- Disable vendoring workflow to avoid noise. - -- Only run fledge on pushes to main. - -- Tweak fledge workflow and ccache action. - -- Cosmetics. - -- Bump action versions. - -- Install clang-format-21. - -- Align fledge workflow. - -- Harmonize. - -## Uncategorized - -- Merge branch 'krlmlr-main'. +# igraph 2.3.1.9001 +## Deprecated and defunct + +- `graph()` is now deprecated with a warning instead of a message. +- `graph.famous()` is now deprecated with a warning instead of a message. +- `line.graph()` is now deprecated with a warning instead of a message. +- `graph.ring()` is now deprecated with a warning instead of a message. +- `graph.tree()` is now deprecated with a warning instead of a message. +- `graph.star()` is now deprecated with a warning instead of a message. +- `graph.lcf()` is now deprecated with a warning instead of a message. +- `graph.lattice()` is now deprecated with a warning instead of a message. +- `graph.lattice()` is now deprecated with a warning instead of a message. +- `graph.kautz()` is now deprecated with a warning instead of a message. +- `graph.full.citation()` is now deprecated with a warning instead of a message. +- `graph.full.bipartite()` is now deprecated with a warning instead of a message. +- `graph.full()` is now deprecated with a warning instead of a message. +- `graph.formula()` is now deprecated with a warning instead of a message. +- `graph.extended.chordal.ring()` is now deprecated with a warning instead of a message. +- `graph.empty()` is now deprecated with a warning instead of a message. +- `graph.de.bruijn()` is now deprecated with a warning instead of a message. +- `graph.bipartite()` is now deprecated with a warning instead of a message. +- `graph.atlas()` is now deprecated with a warning instead of a message. +- `graph_()` is now deprecated with a warning instead of a message. +- `make_lattice()` is now deprecated with a warning instead of a message. +- `layout.grid.3d()` has been removed. +- `piecewise.layout()` is now deprecated with a warning instead of a message. +- `layout.sugiyama()` is now deprecated with a warning instead of a message. +- `layout.star()` is now deprecated with a warning instead of a message. +- `layout.norm()` is now deprecated with a warning instead of a message. +- `layout.merge()` is now deprecated with a warning instead of a message. +- `layout.mds()` is now deprecated with a warning instead of a message. +- `layout.grid()` is now deprecated with a warning instead of a message. +- `layout.graphopt()` is now deprecated with a warning instead of a message. +- `layout.gem()` is now deprecated with a warning instead of a message. +- `layout.davidson.harel()` is now deprecated with a warning instead of a message. +- `layout.bipartite()` is now deprecated with a warning instead of a message. +- `layout.auto()` is now deprecated with a warning instead of a message. +- `layout.reingold.tilford()` is now deprecated with a warning instead of a message. +- `layout.circle()` is now deprecated with a warning instead of a message. +- `layout.sphere()` is now deprecated with a warning instead of a message. +- `layout.random()` is now deprecated with a warning instead of a message. +- `layout.fruchterman.reingold()` is now deprecated with a warning instead of a message. +- `layout.kamada.kawai()` is now deprecated with a warning instead of a message. +- `layout.lgl()` is now deprecated with a warning instead of a message. +- `layout_with_mds()` is now deprecated with a warning instead of a message. +- `layout.spring()` is now defunct (errors instead of warning). +- `layout.svd()` is now defunct (errors instead of warning). +- `layout.fruchterman.reingold.grid()` is now defunct (errors instead of warning). +- `layout.drl()` is now deprecated with a warning instead of a message. +- `nei()` has been removed. +- `innei()` has been removed. +- `outnei()` has been removed. +- `inc()` has been removed. +- `adj()` has been removed. +- `from()` has been removed. +- `to()` has been removed. +- `adj()` has been removed. +- `inc()` has been removed. +- `from()` has been removed. +- `to()` has been removed. +- `is.directed()` is now deprecated with a warning instead of a message. +- `delete.vertices()` is now deprecated with a warning instead of a message. +- `delete.edges()` is now deprecated with a warning instead of a message. +- `add.vertices()` is now deprecated with a warning instead of a message. +- `add.edges()` is now deprecated with a warning instead of a message. +- `get_edge_ids()` is now defunct (errors instead of warning). +- `get.edge.ids()` is now deprecated with a warning instead of a message. +- `get.edge.ids()` is now deprecated with a warning instead of a message. +- `graph.incidence()` is now deprecated with a warning instead of a message. +- `graph_from_incidence_matrix()` is now deprecated with a warning instead of a message. +- `graph_from_incidence_matrix()` is now deprecated with a warning instead of a message. +- `hrg.predict()` is now deprecated with a warning instead of a message. +- `hrg.fit()` is now deprecated with a warning instead of a message. +- `hrg.game()` is now deprecated with a warning instead of a message. +- `hrg.dendrogram()` is now deprecated with a warning instead of a message. +- `hrg.create()` is now deprecated with a warning instead of a message. +- `hrg.consensus()` is now deprecated with a warning instead of a message. +- `graphlets.project()` is now deprecated with a warning instead of a message. +- `graphlets.candidate.basis()` is now deprecated with a warning instead of a message. +- `watts.strogatz.game()` is now deprecated with a warning instead of a message. +- `static.power.law.game()` is now deprecated with a warning instead of a message. +- `static.fitness.game()` is now deprecated with a warning instead of a message. +- `sbm.game()` is now deprecated with a warning instead of a message. +- `preference.game()` is now deprecated with a warning instead of a message. +- `lastcit.game()` is now deprecated with a warning instead of a message. +- `k.regular.game()` is now deprecated with a warning instead of a message. +- `interconnected.islands.game()` is now deprecated with a warning instead of a message. +- `grg.game()` is now deprecated with a warning instead of a message. +- `growing.random.game()` is now deprecated with a warning instead of a message. +- `forest.fire.game()` is now deprecated with a warning instead of a message. +- `establishment.game()` is now deprecated with a warning instead of a message. +- `degree.sequence.game()` is now deprecated with a warning instead of a message. +- `connect.neighborhood()` is now deprecated with a warning instead of a message. +- `citing.cited.type.game()` is now deprecated with a warning instead of a message. +- `cited.type.game()` is now deprecated with a warning instead of a message. +- `callaway.traits.game()` is now deprecated with a warning instead of a message. +- `bipartite.random.game()` is now defunct (errors instead of warning). +- `barabasi.game()` is now deprecated with a warning instead of a message. +- `ba.game()` is now deprecated with a warning instead of a message. +- `asymmetric.preference.game()` is now deprecated with a warning instead of a message. +- `aging.barabasi.game()` is now deprecated with a warning instead of a message. +- `aging.ba.game()` is now deprecated with a warning instead of a message. +- `aging.prefatt.game()` is now deprecated with a warning instead of a message. +- `erdos.renyi.game()` is now deprecated with a warning instead of a message. +- `erdos.renyi.game()` is now deprecated with a warning instead of a message. +- `random.graph.game()` is now deprecated with a warning instead of a message. +- `random.graph.game()` is now deprecated with a warning instead of a message. +- `sample_degseq()` is now defunct (errors instead of warning). +- `sample_degseq()` is now defunct (errors instead of warning). +- `sample_degseq()` is now defunct (errors instead of warning). +- `sample_bipartite()` is now deprecated with a warning instead of a message. +- `sample_bipartite()` is now deprecated with a warning instead of a message. +- `bipartite()` is now deprecated with a warning instead of a message. +- `bipartite()` is now deprecated with a warning instead of a message. +- `write.graph()` is now deprecated with a warning instead of a message. +- `read.graph()` is now deprecated with a warning instead of a message. +- `graph.graphdb()` is now deprecated with a warning instead of a message. +- `vertex.disjoint.paths()` is now deprecated with a warning instead of a message. +- `vertex.connectivity()` is now deprecated with a warning instead of a message. +- `stMincuts()` is now deprecated with a warning instead of a message. +- `stCuts()` is now deprecated with a warning instead of a message. +- `minimum.size.separators()` is now deprecated with a warning instead of a message. +- `minimal.st.separators()` is now deprecated with a warning instead of a message. +- `is.separator()` is now deprecated with a warning instead of a message. +- `is.minimal.separator()` is now deprecated with a warning instead of a message. +- `graph.mincut()` is now deprecated with a warning instead of a message. +- `graph.maxflow()` is now deprecated with a warning instead of a message. +- `graph.adhesion()` is now deprecated with a warning instead of a message. +- `edge.disjoint.paths()` is now deprecated with a warning instead of a message. +- `edge.connectivity()` is now deprecated with a warning instead of a message. +- `dominator.tree()` is now deprecated with a warning instead of a message. +- `power.law.fit()` is now deprecated with a warning instead of a message. +- `is.graphical.degree.sequence()` is now deprecated with a warning instead of a message. +- `is.degree.sequence()` is now deprecated with a warning instead of a message. +- `is.chordal()` is now deprecated with a warning instead of a message. +- `igraph.to.graphNEL()` is now deprecated with a warning instead of a message. +- `igraph.from.graphNEL()` is now deprecated with a warning instead of a message. +- `graph.adjlist()` is now deprecated with a warning instead of a message. +- `get.incidence()` is now deprecated with a warning instead of a message. +- `get.edgelist()` is now deprecated with a warning instead of a message. +- `get.data.frame()` is now deprecated with a warning instead of a message. +- `get.adjacency()` is now deprecated with a warning instead of a message. +- `get.adjlist()` is now deprecated with a warning instead of a message. +- `get.adjedgelist()` is now deprecated with a warning instead of a message. +- `get.adjacency.dense()` is now deprecated with a warning instead of a message. +- `as_adj()` is now deprecated with a warning instead of a message. +- `as_incidence_matrix()` is now deprecated with a warning instead of a message. +- `as.directed()` is now deprecated with a warning instead of a message. +- `as.undirected()` is now deprecated with a warning instead of a message. +- `graph.edgelist()` is now deprecated with a warning instead of a message. +- `graph.data.frame()` is now deprecated with a warning instead of a message. +- `igraph.console()` is now deprecated with a warning instead of a message. +- `no.clusters()` is now deprecated with a warning instead of a message. +- `decompose.graph()` is now deprecated with a warning instead of a message. +- `cluster.distribution()` is now deprecated with a warning instead of a message. +- `biconnected.components()` is now deprecated with a warning instead of a message. +- `articulation.points()` is now deprecated with a warning instead of a message. +- `create.communities()` is now deprecated with a warning instead of a message. +- `walktrap.community()` is now deprecated with a warning instead of a message. +- `spinglass.community()` is now deprecated with a warning instead of a message. +- `showtrace()` is now deprecated with a warning instead of a message. +- `optimal.community()` is now deprecated with a warning instead of a message. +- `multilevel.community()` is now deprecated with a warning instead of a message. +- `mod.matrix()` is now deprecated with a warning instead of a message. +- `leading.eigenvector.community()` is now deprecated with a warning instead of a message. +- `label.propagation.community()` is now deprecated with a warning instead of a message. +- `is.hierarchical()` is now deprecated with a warning instead of a message. +- `infomap.community()` is now deprecated with a warning instead of a message. +- `fastgreedy.community()` is now deprecated with a warning instead of a message. +- `edge.betweenness.community()` is now deprecated with a warning instead of a message. +- `dendPlot()` is now deprecated with a warning instead of a message. +- `cutat()` is now deprecated with a warning instead of a message. +- `contract.vertices()` is now deprecated with a warning instead of a message. +- `code.length()` is now deprecated with a warning instead of a message. +- `modularity_matrix()` is now defunct (errors instead of warning). +- `cluster_leiden()` is now deprecated with a warning instead of a message. +- `cluster_leading_eigen()` is now deprecated with a warning instead of a message. +- `cluster_label_prop()` is now deprecated with a warning instead of a message. +- `exportPajek()` is now deprecated with a warning instead of a message. +- `plotHierarchy()` is now deprecated with a warning instead of a message. +- `maxcohesion()` is now deprecated with a warning instead of a message. +- `graph.cohesion()` is now deprecated with a warning instead of a message. +- `cohesive.blocks()` is now deprecated with a warning instead of a message. +- `blockGraphs()` is now deprecated with a warning instead of a message. +- `maximal.independent.vertex.sets()` is now deprecated with a warning instead of a message. +- `maximal.cliques.count()` is now deprecated with a warning instead of a message. +- `maximal.cliques()` is now deprecated with a warning instead of a message. +- `largest.independent.vertex.sets()` is now deprecated with a warning instead of a message. +- `largest.cliques()` is now deprecated with a warning instead of a message. +- `independent.vertex.sets()` is now deprecated with a warning instead of a message. +- `independence.number()` is now deprecated with a warning instead of a message. +- `clique.number()` is now deprecated with a warning instead of a message. +- `maximal_ivs()` is now deprecated with a warning instead of a message. +- `centralize.scores()` is now deprecated with a warning instead of a message. +- `centralization.evcent.tmax()` is now deprecated with a warning instead of a message. +- `centralization.evcent()` is now deprecated with a warning instead of a message. +- `centralization.degree.tmax()` is now deprecated with a warning instead of a message. +- `centralization.degree()` is now deprecated with a warning instead of a message. +- `centralization.closeness.tmax()` is now deprecated with a warning instead of a message. +- `centralization.closeness()` is now deprecated with a warning instead of a message. +- `centralization.betweenness.tmax()` is now deprecated with a warning instead of a message. +- `centralization.betweenness()` is now deprecated with a warning instead of a message. +- `centr_degree_tmax()` is now defunct (errors instead of warning). +- `centr_eigen()` is now deprecated with a warning instead of a message. +- `centr_eigen_tmax()` is now deprecated with a warning instead of a message. +- `subgraph.centrality()` is now deprecated with a warning instead of a message. +- `page.rank()` is now deprecated with a warning instead of a message. +- `hub.score()` is now defunct (errors instead of warning). +- `authority.score()` is now defunct (errors instead of warning). +- `graph.strength()` is now deprecated with a warning instead of a message. +- `graph.eigen()` is now deprecated with a warning instead of a message. +- `graph.diversity()` is now deprecated with a warning instead of a message. +- `evcent()` is now deprecated with a warning instead of a message. +- `edge.betweenness()` is now deprecated with a warning instead of a message. +- `bonpow()` is now deprecated with a warning instead of a message. +- `alpha.centrality()` is now deprecated with a warning instead of a message. +- `estimate_betweenness()` is now deprecated with a warning instead of a message. +- `estimate_edge_betweenness()` is now deprecated with a warning instead of a message. +- `estimate_closeness()` is now deprecated with a warning instead of a message. +- `arpack()` is now deprecated with a warning instead of a message. +- `spectrum()` is now deprecated with a warning instead of a message. +- `eigen_centrality()` is now deprecated with a warning instead of a message. +- `eigen_centrality()` is now deprecated with a warning instead of a message. +- `eigen_centrality()` is now defunct (errors instead of warning). +- `authority_score()` is now deprecated with a warning instead of a message. +- `arpack_defaults()` is now deprecated with a warning instead of a message. +- `hub_score()` is now deprecated with a warning instead of a message. +- `arpack_defaults()` is now deprecated with a warning instead of a message. +- `bipartite.projection.size()` is now deprecated with a warning instead of a message. +- `bipartite.projection()` is now deprecated with a warning instead of a message. +- `bipartite.mapping()` is now deprecated with a warning instead of a message. +- `get.edge()` has been removed. +- `is.igraph()` is now deprecated with a warning instead of a message. +- `set.vertex.attribute()` is now deprecated with a warning instead of a message. +- `set.graph.attribute()` is now deprecated with a warning instead of a message. +- `set.edge.attribute()` is now deprecated with a warning instead of a message. +- `remove.vertex.attribute()` is now deprecated with a warning instead of a message. +- `remove.graph.attribute()` is now deprecated with a warning instead of a message. +- `remove.edge.attribute()` is now deprecated with a warning instead of a message. +- `list.vertex.attributes()` is now deprecated with a warning instead of a message. +- `list.graph.attributes()` is now deprecated with a warning instead of a message. +- `list.edge.attributes()` is now deprecated with a warning instead of a message. +- `is.weighted()` is now deprecated with a warning instead of a message. +- `is.named()` is now deprecated with a warning instead of a message. +- `is.bipartite()` is now deprecated with a warning instead of a message. +- `get.vertex.attribute()` is now deprecated with a warning instead of a message. +- `get.graph.attribute()` is now deprecated with a warning instead of a message. +- `get.edge.attribute()` is now deprecated with a warning instead of a message. +- `assortativity.nominal()` is now deprecated with a warning instead of a message. +- `assortativity.degree()` is now deprecated with a warning instead of a message. +- `assortativity()` is now deprecated with a warning instead of a message. +- `assortativity()` is now deprecated with a warning instead of a message. +- `assortativity()` is now deprecated with a warning instead of a message. +- `ape::as.phylo()` is now deprecated with a warning instead of a message. +- `graph.adjacency()` is now deprecated with a warning instead of a message. +- `graph_from_adjacency_matrix()` is now deprecated with a warning instead of a message. +- `graph_from_adjacency_matrix()` is now deprecated with a warning instead of a message. -# igraph 2.3.1.9001 ## Chore From 9817ff617c3028a4c8115a05e656537bfc769aac Mon Sep 17 00:00:00 2001 From: maelle Date: Tue, 19 May 2026 10:39:58 +0000 Subject: [PATCH 29/48] chore: Auto-update from GitHub Actions Run: https://github.com/igraph/rigraph/actions/runs/26091648100 --- tools/commit-lifecycle.R | 57 +++++++++++++++++++++++++++++++++------- 1 file changed, 47 insertions(+), 10 deletions(-) diff --git a/tools/commit-lifecycle.R b/tools/commit-lifecycle.R index 49fb84f3307..71b175fe519 100644 --- a/tools/commit-lifecycle.R +++ b/tools/commit-lifecycle.R @@ -37,13 +37,20 @@ # gert::git_pull(repo = here::here(), remote = "origin", refspec = "main") # cli::cli_alert_success("Pulled and fast-forwarded to main") -gert::git_fetch("origin", refspec = "refs/heads/main:refs/heads/main", repo = here::here()) +gert::git_fetch( + "origin", + refspec = "refs/heads/main:refs/heads/main", + repo = here::here() +) gert::git_reset_mixed("main", repo = here::here()) usethis::use_build_ignore("lifecycle") usethis::use_git_ignore("lifecycle") -gert::git_add(c("tools/commit-lifecycle.R", ".gitignore", ".Rbuildignore"), repo = here::here()) +gert::git_add( + c("tools/commit-lifecycle.R", ".gitignore", ".Rbuildignore"), + repo = here::here() +) gert::git_commit("chore: add commit-lifecycle.R script", repo = here::here()) cli::cli_alert_success("Committed tools/commit-lifecycle.R") @@ -58,15 +65,31 @@ for (stem in tools::file_path_sans_ext(r_files)) { file.copy(lifecycle_r, here::here(r_file), overwrite = TRUE) files_to_stage <- r_file - lifecycle_test <- here::here("lifecycle", "tests", "testthat", paste0("test-", stem, ".R")) + lifecycle_test <- here::here( + "lifecycle", + "tests", + "testthat", + paste0("test-", stem, ".R") + ) if (file.exists(lifecycle_test)) { dest_test <- here::here("tests", "testthat", paste0("test-", stem, ".R")) file.copy(lifecycle_test, dest_test, overwrite = TRUE) files_to_stage <- c(files_to_stage, paste0("tests/testthat/test-", stem, ".R")) - lifecycle_snap <- here::here("lifecycle", "tests", "testthat", "_snaps", paste0(stem, ".md")) + lifecycle_snap <- here::here( + "lifecycle", + "tests", + "testthat", + "_snaps", + paste0(stem, ".md") + ) if (file.exists(lifecycle_snap)) { - dest_snap <- here::here("tests", "testthat", "_snaps", paste0(stem, ".md")) + dest_snap <- here::here( + "tests", + "testthat", + "_snaps", + paste0(stem, ".md") + ) file.copy(lifecycle_snap, dest_snap, overwrite = TRUE) files_to_stage <- c(files_to_stage, paste0("tests/testthat/_snaps/", stem, ".md")) } @@ -75,20 +98,34 @@ for (stem in tools::file_path_sans_ext(r_files)) { devtools::document(quiet = TRUE) tryCatch( callr::r( - function(pkg, filter) devtools::test(pkg = pkg, filter = filter, stop_on_failure = FALSE), + function(pkg, filter) { + devtools::test(pkg = pkg, filter = filter, stop_on_failure = FALSE) + }, args = list(pkg = here::here(), filter = stem) ), - error = function(e) cli::cli_alert_warning("Tests errored for {stem}: {conditionMessage(e)}") + error = function(e) { + cli::cli_alert_warning("Tests errored for {stem}: {conditionMessage(e)}") + } ) gert::git_add(c(files_to_stage, "man", "NAMESPACE"), repo = here::here()) - gert::git_commit(paste0("feat!: bump deprecated functions in R/", stem, ".R"), repo = here::here()) + gert::git_commit( + paste0("feat!: bump deprecated functions in R/", stem, ".R"), + repo = here::here() + ) cli::cli_alert_success("Committed {r_file}") } -file.copy(here::here("lifecycle", "NEWS.md"), here::here("NEWS.md"), overwrite = TRUE) +file.copy( + here::here("lifecycle", "NEWS.md"), + here::here("NEWS.md"), + overwrite = TRUE +) gert::git_add("NEWS.md", repo = here::here()) -gert::git_commit("chore: update NEWS.md for lifecycle bumps\n\n!NEWS", repo = here::here()) +gert::git_commit( + "chore: update NEWS.md for lifecycle bumps\n\n!NEWS", + repo = here::here() +) cli::cli_alert_success("Committed NEWS.md") # R CMD check after all the commits From 7077e317897b04a3984e8c94f09ff64cc6ca36fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 12:52:56 +0200 Subject: [PATCH 30/48] feat!: bump deprecate_soft to deprecate_warn in R/minimum.spanning.tree.R --- NEWS.md | 1 + R/minimum.spanning.tree.R | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index cd923355615..eeae295fb2d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,7 @@ ## Deprecated and defunct +- `minimum.spanning.tree(()` is now deprecated with a warning instead of a message. - `graph()` is now deprecated with a warning instead of a message. - `graph.famous()` is now deprecated with a warning instead of a message. - `line.graph()` is now deprecated with a warning instead of a message. diff --git a/R/minimum.spanning.tree.R b/R/minimum.spanning.tree.R index 2f48bb7d6b5..887f0beb62f 100644 --- a/R/minimum.spanning.tree.R +++ b/R/minimum.spanning.tree.R @@ -15,7 +15,7 @@ minimum.spanning.tree <- function( ... ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "minimum.spanning.tree()", "mst()") + lifecycle::deprecate_warn("2.0.0", "minimum.spanning.tree()", "mst()") mst(graph = graph, weights = weights, algorithm = algorithm, ...) } # nocov end # IGraph R package From 03267f8c209c98ca8b8521c3d8db2f352d5196d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 12:53:42 +0200 Subject: [PATCH 31/48] feat!: bump deprecate_soft to deprecate_warn in R/motifs.R --- NEWS.md | 5 +++++ R/motifs.R | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/NEWS.md b/NEWS.md index eeae295fb2d..a6ac59f3072 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,11 @@ ## Deprecated and defunct +- `triad.census(()` is now deprecated with a warning instead of a message. +- `graph.motifs.no(()` is now deprecated with a warning instead of a message. +- `graph.motifs.est(()` is now deprecated with a warning instead of a message. +- `graph.motifs(()` is now deprecated with a warning instead of a message. +- `dyad.census(()` is now deprecated with a warning instead of a message. - `minimum.spanning.tree(()` is now deprecated with a warning instead of a message. - `graph()` is now deprecated with a warning instead of a message. - `graph.famous()` is now deprecated with a warning instead of a message. diff --git a/R/motifs.R b/R/motifs.R index 4c97987133b..694e6f728d1 100644 --- a/R/motifs.R +++ b/R/motifs.R @@ -10,7 +10,7 @@ #' @export triad.census <- function(graph) { # nocov start - lifecycle::deprecate_soft("2.0.0", "triad.census()", "triad_census()") + lifecycle::deprecate_warn("2.0.0", "triad.census()", "triad_census()") triad_census(graph = graph) } # nocov end @@ -26,7 +26,7 @@ triad.census <- function(graph) { #' @export graph.motifs.no <- function(graph, size = 3, cut.prob = rep(0, size)) { # nocov start - lifecycle::deprecate_soft("2.0.0", "graph.motifs.no()", "count_motifs()") + lifecycle::deprecate_warn("2.0.0", "graph.motifs.no()", "count_motifs()") count_motifs(graph = graph, size = size, cut.prob = cut.prob) } # nocov end @@ -52,7 +52,7 @@ graph.motifs.est <- function( sample = NULL ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "graph.motifs.est()", "sample_motifs()") + lifecycle::deprecate_warn("2.0.0", "graph.motifs.est()", "sample_motifs()") sample_motifs( graph = graph, size = size, @@ -78,7 +78,7 @@ graph.motifs.est <- function( #' @export graph.motifs <- function(graph, size = 3, cut.prob = rep(0, size)) { # nocov start - lifecycle::deprecate_soft("2.0.0", "graph.motifs()", "motifs()") + lifecycle::deprecate_warn("2.0.0", "graph.motifs()", "motifs()") motifs(graph = graph, size = size, cut.prob = cut.prob) } # nocov end @@ -94,7 +94,7 @@ graph.motifs <- function(graph, size = 3, cut.prob = rep(0, size)) { #' @export dyad.census <- function(graph) { # nocov start - lifecycle::deprecate_soft("2.0.0", "dyad.census()", "dyad_census()") + lifecycle::deprecate_warn("2.0.0", "dyad.census()", "dyad_census()") dyad_census(graph = graph) } # nocov end From 72c3e12cf16521622a06513a1456c546841f686e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 12:54:44 +0200 Subject: [PATCH 32/48] feat!: bump deprecate_soft to deprecate_warn in R/operators.R --- NEWS.md | 5 +++++ R/operators.R | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/NEWS.md b/NEWS.md index a6ac59f3072..39553c756a2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,11 @@ ## Deprecated and defunct +- `graph.intersection(()` is now deprecated with a warning instead of a message. +- `graph.union(()` is now deprecated with a warning instead of a message. +- `graph.difference(()` is now deprecated with a warning instead of a message. +- `graph.compose(()` is now deprecated with a warning instead of a message. +- `graph.complementer(()` is now deprecated with a warning instead of a message. - `triad.census(()` is now deprecated with a warning instead of a message. - `graph.motifs.no(()` is now deprecated with a warning instead of a message. - `graph.motifs.est(()` is now deprecated with a warning instead of a message. diff --git a/R/operators.R b/R/operators.R index 4c3161dc775..27cf7d455ae 100644 --- a/R/operators.R +++ b/R/operators.R @@ -10,7 +10,7 @@ #' @export graph.intersection <- function(...) { # nocov start - lifecycle::deprecate_soft("2.0.0", "graph.intersection()", "intersection()") + lifecycle::deprecate_warn("2.0.0", "graph.intersection()", "intersection()") intersection(...) } # nocov end @@ -26,7 +26,7 @@ graph.intersection <- function(...) { #' @export graph.union <- function(..., byname = "auto") { # nocov start - lifecycle::deprecate_soft("2.0.0", "graph.union()", "union.igraph()") + lifecycle::deprecate_warn("2.0.0", "graph.union()", "union.igraph()") union.igraph(byname = byname, ...) } # nocov end @@ -42,7 +42,7 @@ graph.union <- function(..., byname = "auto") { #' @export graph.difference <- function(...) { # nocov start - lifecycle::deprecate_soft("2.0.0", "graph.difference()", "difference()") + lifecycle::deprecate_warn("2.0.0", "graph.difference()", "difference()") difference(...) } # nocov end @@ -58,7 +58,7 @@ graph.difference <- function(...) { #' @export graph.disjoint.union <- function(...) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "graph.disjoint.union()", "disjoint_union()" @@ -78,7 +78,7 @@ graph.disjoint.union <- function(...) { #' @export graph.compose <- function(g1, g2, byname = "auto") { # nocov start - lifecycle::deprecate_soft("2.0.0", "graph.compose()", "compose()") + lifecycle::deprecate_warn("2.0.0", "graph.compose()", "compose()") compose(g1 = g1, g2 = g2, byname = byname) } # nocov end @@ -94,7 +94,7 @@ graph.compose <- function(g1, g2, byname = "auto") { #' @export graph.complementer <- function(graph, loops = FALSE) { # nocov start - lifecycle::deprecate_soft("2.0.0", "graph.complementer()", "complementer()") + lifecycle::deprecate_warn("2.0.0", "graph.complementer()", "complementer()") complementer(graph = graph, loops = loops) } # nocov end # IGraph R package From 2cddd686510dedc8de4421354e36b2284d80bbc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 12:57:10 +0200 Subject: [PATCH 33/48] feat!: bump deprecate_soft to deprecate_warn in R/other.R --- NEWS.md | 3 +++ R/other.R | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/NEWS.md b/NEWS.md index 39553c756a2..dbddc587b90 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,9 @@ ## Deprecated and defunct +- `running.mean(()` is now deprecated with a warning instead of a message. +- `igraph.sample(()` is now deprecated with a warning instead of a message. +- `convex.hull(()` is now deprecated with a warning instead of a message. - `graph.intersection(()` is now deprecated with a warning instead of a message. - `graph.union(()` is now deprecated with a warning instead of a message. - `graph.difference(()` is now deprecated with a warning instead of a message. diff --git a/R/other.R b/R/other.R index fac2f133240..1936d98d7ac 100644 --- a/R/other.R +++ b/R/other.R @@ -10,7 +10,7 @@ #' @export running.mean <- function(v, binwidth) { # nocov start - lifecycle::deprecate_soft("2.0.0", "running.mean()", "running_mean()") + lifecycle::deprecate_warn("2.0.0", "running.mean()", "running_mean()") running_mean(v = v, binwidth = binwidth) } # nocov end @@ -26,7 +26,7 @@ running.mean <- function(v, binwidth) { #' @export igraph.sample <- function(low, high, length) { # nocov start - lifecycle::deprecate_soft("2.0.0", "igraph.sample()", "sample_seq()") + lifecycle::deprecate_warn("2.0.0", "igraph.sample()", "sample_seq()") sample_seq(low = low, high = high, length = length) } # nocov end @@ -42,7 +42,7 @@ igraph.sample <- function(low, high, length) { #' @export convex.hull <- function(data) { # nocov start - lifecycle::deprecate_soft("2.0.0", "convex.hull()", "convex_hull()") + lifecycle::deprecate_warn("2.0.0", "convex.hull()", "convex_hull()") convex_hull(data = data) } # nocov end # IGraph R package From d2f0cb20d5ffe5e90cab6434bea65bfe89268439 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 13:00:12 +0200 Subject: [PATCH 34/48] feat!: bump deprecate_soft to deprecate_warn in R/par.R --- NEWS.md | 2 ++ R/par.R | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index dbddc587b90..d18ee057741 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,8 @@ ## Deprecated and defunct +- `igraph.options(()` is now deprecated with a warning instead of a message. +- `getIgraphOpt(()` is now deprecated with a warning instead of a message. - `running.mean(()` is now deprecated with a warning instead of a message. - `igraph.sample(()` is now deprecated with a warning instead of a message. - `convex.hull(()` is now deprecated with a warning instead of a message. diff --git a/R/par.R b/R/par.R index ac5d3d1c3f8..8b32920a48e 100644 --- a/R/par.R +++ b/R/par.R @@ -10,7 +10,7 @@ #' @export igraph.options <- function(...) { # nocov start - lifecycle::deprecate_soft("2.0.0", "igraph.options()", "igraph_options()") + lifecycle::deprecate_warn("2.0.0", "igraph.options()", "igraph_options()") igraph_i_options(...) } # nocov end @@ -26,7 +26,7 @@ igraph.options <- function(...) { #' @export getIgraphOpt <- function(x, default = NULL) { # nocov start - lifecycle::deprecate_soft("2.0.0", "getIgraphOpt()", "igraph_opt()") + lifecycle::deprecate_warn("2.0.0", "getIgraphOpt()", "igraph_opt()") if (missing(default)) { get_config(paste0("igraph::", x), .igraph.pars[[x]]) From 96af2d87e4c9ad9304fdc177fc0e82069cbb7e8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 13:07:34 +0200 Subject: [PATCH 35/48] feat!: bump deprecate_soft to deprecate_warn in R/paths.R --- NEWS.md | 2 ++ R/paths.R | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/NEWS.md b/NEWS.md index d18ee057741..3b7bb104947 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,8 @@ ## Deprecated and defunct +- `path.length.hist(()` is now deprecated with a warning instead of a message. +- `is.dag(()` is now deprecated with a warning instead of a message. - `igraph.options(()` is now deprecated with a warning instead of a message. - `getIgraphOpt(()` is now deprecated with a warning instead of a message. - `running.mean(()` is now deprecated with a warning instead of a message. diff --git a/R/paths.R b/R/paths.R index 093efd56d38..1ff158c6a46 100644 --- a/R/paths.R +++ b/R/paths.R @@ -10,7 +10,7 @@ #' @export path.length.hist <- function(graph, directed = TRUE) { # nocov start - lifecycle::deprecate_soft("2.0.0", "path.length.hist()", "distance_table()") + lifecycle::deprecate_warn("2.0.0", "path.length.hist()", "distance_table()") distance_table(graph = graph, directed = directed) } # nocov end @@ -26,7 +26,7 @@ path.length.hist <- function(graph, directed = TRUE) { #' @export maximum.cardinality.search <- function(graph) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "maximum.cardinality.search()", "max_cardinality()" @@ -46,7 +46,7 @@ maximum.cardinality.search <- function(graph) { #' @export is.dag <- function(graph) { # nocov start - lifecycle::deprecate_soft("2.0.0", "is.dag()", "is_dag()") + lifecycle::deprecate_warn("2.0.0", "is.dag()", "is_dag()") is_dag(graph = graph) } # nocov end ## ----------------------------------------------------------------------- @@ -287,7 +287,7 @@ eccentricity <- function( mode = c("all", "out", "in", "total") ) { if (...length() > 0) { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.1.0", "eccentricity(... =)", details = "The argument `mode` must be named." @@ -345,7 +345,7 @@ radius <- function( mode = c("all", "out", "in", "total") ) { if (...length() > 0) { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.1.0", "radius(... =)", details = "The argument `mode` must be named." From 9afca6a0825f96fcdcfff3299daa096d8ac109e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 13:33:20 +0200 Subject: [PATCH 36/48] feat!: bump deprecate_soft to deprecate_warn in R/plot.shapes.R --- NEWS.md | 4 ++++ R/plot.shapes.R | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/NEWS.md b/NEWS.md index 3b7bb104947..93fc05c64ca 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,10 @@ ## Deprecated and defunct +- `igraph.shape.noplot(()` is now deprecated with a warning instead of a message. +- `igraph.shape.noclip(()` is now deprecated with a warning instead of a message. +- `vertex.shapes(()` is now deprecated with a warning instead of a message. +- `add.vertex.shape(()` is now deprecated with a warning instead of a message. - `path.length.hist(()` is now deprecated with a warning instead of a message. - `is.dag(()` is now deprecated with a warning instead of a message. - `igraph.options(()` is now deprecated with a warning instead of a message. diff --git a/R/plot.shapes.R b/R/plot.shapes.R index b8380cb10fe..3b2bfffcb2a 100644 --- a/R/plot.shapes.R +++ b/R/plot.shapes.R @@ -10,7 +10,7 @@ #' @export igraph.shape.noplot <- function(coords, v = NULL, params) { # nocov start - lifecycle::deprecate_soft("2.0.0", "igraph.shape.noplot()", "shape_noplot()") + lifecycle::deprecate_warn("2.0.0", "igraph.shape.noplot()", "shape_noplot()") shape_noplot(coords = coords, v = v, params = params) } # nocov end @@ -31,7 +31,7 @@ igraph.shape.noclip <- function( end = c("both", "from", "to") ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "igraph.shape.noclip()", "shape_noclip()") + lifecycle::deprecate_warn("2.0.0", "igraph.shape.noclip()", "shape_noclip()") shape_noclip(coords = coords, el = el, params = params, end = end) } # nocov end @@ -47,7 +47,7 @@ igraph.shape.noclip <- function( #' @export vertex.shapes <- function(shape = NULL) { # nocov start - lifecycle::deprecate_soft("2.0.0", "vertex.shapes()", "shapes()") + lifecycle::deprecate_warn("2.0.0", "vertex.shapes()", "shapes()") shapes(shape = shape) } # nocov end @@ -68,7 +68,7 @@ add.vertex.shape <- function( parameters = list() ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "add.vertex.shape()", "add_shape()") + lifecycle::deprecate_warn("2.0.0", "add.vertex.shape()", "add_shape()") add_shape(shape = shape, clip = clip, plot = plot, parameters = parameters) } # nocov end From dd4528e78225cf9a6e1b03556b9343668b341b38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 13:34:34 +0200 Subject: [PATCH 37/48] feat!: bump deprecate_soft to deprecate_warn in R/similarity.R --- R/similarity.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/similarity.R b/R/similarity.R index 4fcb4eb9445..aa8c7c5280c 100644 --- a/R/similarity.R +++ b/R/similarity.R @@ -104,7 +104,7 @@ similarity.jaccard <- function( mode = c("all", "out", "in", "total"), loops = FALSE ) { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.1.0", "similarity.jaccard()", "similarity(method)", @@ -135,7 +135,7 @@ similarity.dice <- function( mode = c("all", "out", "in", "total"), loops = FALSE ) { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.1.0", "similarity.dice()", "similarity(method)", @@ -165,7 +165,7 @@ similarity.invlogweighted <- function( vids = V(graph), mode = c("all", "out", "in", "total") ) { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.1.0", "similarity.invlogweighted()", "similarity(method)", From e09c0bc40ffb0b985d3753c03c28fa68a0cf4ceb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 13:36:00 +0200 Subject: [PATCH 38/48] feat!: bump deprecate_soft to deprecate_warn in R/simple.R --- NEWS.md | 1 + R/simple.R | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 93fc05c64ca..a2b24075b6a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,7 @@ ## Deprecated and defunct +- `is.simple(()` is now deprecated with a warning instead of a message. - `igraph.shape.noplot(()` is now deprecated with a warning instead of a message. - `igraph.shape.noclip(()` is now deprecated with a warning instead of a message. - `vertex.shapes(()` is now deprecated with a warning instead of a message. diff --git a/R/simple.R b/R/simple.R index 48126722a49..c2de4f1fdbb 100644 --- a/R/simple.R +++ b/R/simple.R @@ -10,7 +10,7 @@ #' @export is.simple <- function(graph) { # nocov start - lifecycle::deprecate_soft("2.0.0", "is.simple()", "is_simple()") + lifecycle::deprecate_warn("2.0.0", "is.simple()", "is_simple()") is_simple(graph = graph) } # nocov end From a8dd7d5e864135cf020c258a52bc7c0636964c74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 13:37:27 +0200 Subject: [PATCH 39/48] feat!: bump deprecate_soft to deprecate_warn in R/stochastic_matrix.R --- NEWS.md | 1 + R/stochastic_matrix.R | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index a2b24075b6a..28ef4c6ee39 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,7 @@ ## Deprecated and defunct +- `get.stochastic(()` is now deprecated with a warning instead of a message. - `is.simple(()` is now deprecated with a warning instead of a message. - `igraph.shape.noplot(()` is now deprecated with a warning instead of a message. - `igraph.shape.noclip(()` is now deprecated with a warning instead of a message. diff --git a/R/stochastic_matrix.R b/R/stochastic_matrix.R index b829072fb1a..01ece7ee3ca 100644 --- a/R/stochastic_matrix.R +++ b/R/stochastic_matrix.R @@ -14,7 +14,7 @@ get.stochastic <- function( sparse = igraph_opt("sparsematrices") ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "get.stochastic()", "stochastic_matrix()") + lifecycle::deprecate_warn("2.0.0", "get.stochastic()", "stochastic_matrix()") stochastic_matrix(graph = graph, column.wise = column.wise, sparse = sparse) } # nocov end # IGraph R package From d41f28f667f50fcd07d01a5ad116a59362db6276 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 13:38:54 +0200 Subject: [PATCH 40/48] feat!: bump deprecated functions in R/structural-properties.R --- NEWS.md | 26 ++++++++++++++++ R/structural-properties.R | 64 +++++++++++++++++++-------------------- 2 files changed, 58 insertions(+), 32 deletions(-) diff --git a/NEWS.md b/NEWS.md index 28ef4c6ee39..1dea43e2094 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,32 @@ ## Deprecated and defunct +- `get.shortest.paths(()` is now deprecated with a warning instead of a message. +- `get.diameter(()` is now deprecated with a warning instead of a message. +- `unfold.tree(()` is now deprecated with a warning instead of a message. +- `topological.sort(()` is now deprecated with a warning instead of a message. +- `shortest.paths(()` is now deprecated with a warning instead of a message. +- `neighborhood.size(()` is now deprecated with a warning instead of a message. +- `is.mutual(()` is now deprecated with a warning instead of a message. +- `is.multiple(()` is now deprecated with a warning instead of a message. +- `is.matching(()` is now deprecated with a warning instead of a message. +- `is.loop(()` is now deprecated with a warning instead of a message. +- `is.connected(()` is now deprecated with a warning instead of a message. +- `induced.subgraph(()` is now deprecated with a warning instead of a message. +- `has.multiple(()` is now deprecated with a warning instead of a message. +- `graph.neighborhood(()` is now deprecated with a warning instead of a message. +- `graph.laplacian(()` is now deprecated with a warning instead of a message. +- `graph.knn(()` is now deprecated with a warning instead of a message. +- `graph.dfs(()` is now deprecated with a warning instead of a message. +- `graph.density(()` is now deprecated with a warning instead of a message. +- `graph.coreness(()` is now deprecated with a warning instead of a message. +- `graph.bfs(()` is now deprecated with a warning instead of a message. +- `farthest.nodes(()` is now deprecated with a warning instead of a message. +- `count.multiple(()` is now deprecated with a warning instead of a message. +- `clusters(()` is now deprecated with a warning instead of a message. +- `average.path.length(()` is now deprecated with a warning instead of a message. +- `bfs(()` is now defunct (errors instead of warning). +- `dfs(()` is now defunct (errors instead of warning). - `get.stochastic(()` is now deprecated with a warning instead of a message. - `is.simple(()` is now deprecated with a warning instead of a message. - `igraph.shape.noplot(()` is now deprecated with a warning instead of a message. diff --git a/R/structural-properties.R b/R/structural-properties.R index c6c99025cf1..17f85cfbad5 100644 --- a/R/structural-properties.R +++ b/R/structural-properties.R @@ -20,7 +20,7 @@ get.shortest.paths <- function( algorithm = c("automatic", "unweighted", "dijkstra", "bellman-ford") ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "get.shortest.paths()", "shortest_paths()") + lifecycle::deprecate_warn("2.0.0", "get.shortest.paths()", "shortest_paths()") shortest_paths( graph = graph, from = from, @@ -52,7 +52,7 @@ get.all.shortest.paths <- function( weights = NULL ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "get.all.shortest.paths()", "all_shortest_paths()" @@ -83,7 +83,7 @@ get.diameter <- function( weights = NULL ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "get.diameter()", "get_diameter()") + lifecycle::deprecate_warn("2.0.0", "get.diameter()", "get_diameter()") get_diameter( graph = graph, directed = directed, @@ -104,7 +104,7 @@ get.diameter <- function( #' @export unfold.tree <- function(graph, mode = c("all", "out", "in", "total"), roots) { # nocov start - lifecycle::deprecate_soft("2.0.0", "unfold.tree()", "unfold_tree()") + lifecycle::deprecate_warn("2.0.0", "unfold.tree()", "unfold_tree()") unfold_tree(graph = graph, mode = mode, roots = roots) } # nocov end @@ -120,7 +120,7 @@ unfold.tree <- function(graph, mode = c("all", "out", "in", "total"), roots) { #' @export topological.sort <- function(graph, mode = c("out", "all", "in")) { # nocov start - lifecycle::deprecate_soft("2.0.0", "topological.sort()", "topo_sort()") + lifecycle::deprecate_warn("2.0.0", "topological.sort()", "topo_sort()") topo_sort(graph = graph, mode = mode) } # nocov end @@ -149,7 +149,7 @@ shortest.paths <- function( ) ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "shortest.paths()", "distances()") + lifecycle::deprecate_warn("2.0.0", "shortest.paths()", "distances()") algorithm <- igraph_match_arg(algorithm) mode <- igraph_match_arg(mode) distances( @@ -180,7 +180,7 @@ neighborhood.size <- function( mindist = 0 ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "neighborhood.size()", "ego_size()") + lifecycle::deprecate_warn("2.0.0", "neighborhood.size()", "ego_size()") ego_size( graph = graph, order = order, @@ -207,7 +207,7 @@ maximum.bipartite.matching <- function( eps = .Machine$double.eps ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "maximum.bipartite.matching()", "max_bipartite_match()" @@ -232,7 +232,7 @@ maximum.bipartite.matching <- function( #' @export is.mutual <- function(graph, eids = E(graph), loops = TRUE) { # nocov start - lifecycle::deprecate_soft("2.0.0", "is.mutual()", "which_mutual()") + lifecycle::deprecate_warn("2.0.0", "is.mutual()", "which_mutual()") which_mutual(graph = graph, eids = eids, loops = loops) } # nocov end @@ -248,7 +248,7 @@ is.mutual <- function(graph, eids = E(graph), loops = TRUE) { #' @export is.multiple <- function(graph, eids = E(graph)) { # nocov start - lifecycle::deprecate_soft("2.0.0", "is.multiple()", "which_multiple()") + lifecycle::deprecate_warn("2.0.0", "is.multiple()", "which_multiple()") which_multiple(graph = graph, eids = eids) } # nocov end @@ -264,7 +264,7 @@ is.multiple <- function(graph, eids = E(graph)) { #' @export is.maximal.matching <- function(graph, matching, types = NULL) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "is.maximal.matching()", "is_max_matching()" @@ -284,7 +284,7 @@ is.maximal.matching <- function(graph, matching, types = NULL) { #' @export is.matching <- function(graph, matching, types = NULL) { # nocov start - lifecycle::deprecate_soft("2.0.0", "is.matching()", "is_matching()") + lifecycle::deprecate_warn("2.0.0", "is.matching()", "is_matching()") is_matching(graph = graph, matching = matching, types = types) } # nocov end @@ -300,7 +300,7 @@ is.matching <- function(graph, matching, types = NULL) { #' @export is.loop <- function(graph, eids = E(graph)) { # nocov start - lifecycle::deprecate_soft("2.0.0", "is.loop()", "which_loop()") + lifecycle::deprecate_warn("2.0.0", "is.loop()", "which_loop()") which_loop(graph = graph, eids = eids) } # nocov end @@ -316,7 +316,7 @@ is.loop <- function(graph, eids = E(graph)) { #' @export is.connected <- function(graph, mode = c("weak", "strong")) { # nocov start - lifecycle::deprecate_soft("2.0.0", "is.connected()", "is_connected()") + lifecycle::deprecate_warn("2.0.0", "is.connected()", "is_connected()") is_connected(graph = graph, mode = mode) } # nocov end @@ -336,7 +336,7 @@ induced.subgraph <- function( impl = c("auto", "copy_and_delete", "create_from_scratch") ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "induced.subgraph()", "induced_subgraph()") + lifecycle::deprecate_warn("2.0.0", "induced.subgraph()", "induced_subgraph()") induced_subgraph(graph = graph, vids = vids, impl = impl) } # nocov end @@ -352,7 +352,7 @@ induced.subgraph <- function( #' @export has.multiple <- function(graph) { # nocov start - lifecycle::deprecate_soft("2.0.0", "has.multiple()", "any_multiple()") + lifecycle::deprecate_warn("2.0.0", "has.multiple()", "any_multiple()") any_multiple(graph = graph) } # nocov end @@ -374,7 +374,7 @@ graph.neighborhood <- function( mindist = 0 ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "graph.neighborhood()", "make_ego_graph()") + lifecycle::deprecate_warn("2.0.0", "graph.neighborhood()", "make_ego_graph()") make_ego_graph( graph = graph, order = order, @@ -401,7 +401,7 @@ graph.laplacian <- function( sparse = igraph_opt("sparsematrices") ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "graph.laplacian()", "laplacian_matrix()") + lifecycle::deprecate_warn("2.0.0", "graph.laplacian()", "laplacian_matrix()") laplacian_matrix( graph = graph, normalized = normalized, @@ -428,7 +428,7 @@ graph.knn <- function( weights = NULL ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "graph.knn()", "knn()") + lifecycle::deprecate_warn("2.0.0", "graph.knn()", "knn()") knn( graph = graph, vids = vids, @@ -465,7 +465,7 @@ graph.dfs <- function( neimode ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "graph.dfs()", "dfs()") + lifecycle::deprecate_warn("2.0.0", "graph.dfs()", "dfs()") dfs( graph = graph, root = root, @@ -495,7 +495,7 @@ graph.dfs <- function( #' @export graph.density <- function(graph, loops = FALSE) { # nocov start - lifecycle::deprecate_soft("2.0.0", "graph.density()", "edge_density()") + lifecycle::deprecate_warn("2.0.0", "graph.density()", "edge_density()") edge_density(graph = graph, loops = loops) } # nocov end @@ -511,7 +511,7 @@ graph.density <- function(graph, loops = FALSE) { #' @export graph.coreness <- function(graph, mode = c("all", "out", "in")) { # nocov start - lifecycle::deprecate_soft("2.0.0", "graph.coreness()", "coreness()") + lifecycle::deprecate_warn("2.0.0", "graph.coreness()", "coreness()") coreness(graph = graph, mode = mode) } # nocov end @@ -544,7 +544,7 @@ graph.bfs <- function( neimode ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "graph.bfs()", "bfs()") + lifecycle::deprecate_warn("2.0.0", "graph.bfs()", "bfs()") bfs( graph = graph, root = root, @@ -581,7 +581,7 @@ farthest.nodes <- function( weights = NULL ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "farthest.nodes()", "farthest_vertices()") + lifecycle::deprecate_warn("2.0.0", "farthest.nodes()", "farthest_vertices()") farthest_vertices( graph = graph, directed = directed, @@ -602,7 +602,7 @@ farthest.nodes <- function( #' @export degree.distribution <- function(graph, cumulative = FALSE, ...) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "degree.distribution()", "degree_distribution()" @@ -622,7 +622,7 @@ degree.distribution <- function(graph, cumulative = FALSE, ...) { #' @export count.multiple <- function(graph, eids = E(graph)) { # nocov start - lifecycle::deprecate_soft("2.0.0", "count.multiple()", "count_multiple()") + lifecycle::deprecate_warn("2.0.0", "count.multiple()", "count_multiple()") count_multiple(graph = graph, eids = eids) } # nocov end @@ -638,7 +638,7 @@ count.multiple <- function(graph, eids = E(graph)) { #' @export clusters <- function(graph, mode = c("weak", "strong")) { # nocov start - lifecycle::deprecate_soft("2.0.0", "clusters()", "components()") + lifecycle::deprecate_warn("2.0.0", "clusters()", "components()") components(graph = graph, mode = mode) } # nocov end @@ -660,7 +660,7 @@ average.path.length <- function( details = FALSE ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "average.path.length()", "mean_distance()") + lifecycle::deprecate_warn("2.0.0", "average.path.length()", "mean_distance()") mean_distance( graph = graph, weights = weights, @@ -1639,7 +1639,7 @@ subgraph_from_edges <- function(graph, eids, delete.vertices = TRUE) { #' @export subgraph.edges <- function(graph, eids, delete.vertices = TRUE) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.1.0", "subgraph.edges()", "subgraph_from_edges()" @@ -2725,7 +2725,7 @@ bfs <- function( } if (lifecycle::is_present(father)) { - lifecycle::deprecate_warn("2.2.0", "bfs(father = )", "bfs(parent = )") + lifecycle::deprecate_stop("2.2.0", "bfs(father = )", "bfs(parent = )") if (missing(parent)) { parent <- father } @@ -2987,7 +2987,7 @@ dfs <- function( } if (lifecycle::is_present(father)) { - lifecycle::deprecate_warn("2.2.0", "dfs(father = )", "dfs(parent = )") + lifecycle::deprecate_stop("2.2.0", "dfs(father = )", "dfs(parent = )") if (missing(parent)) { parent <- father } @@ -3336,7 +3336,7 @@ laplacian_matrix <- function( ) { # Argument checks if (lifecycle::is_present(normalized)) { - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.3", "make_lattice(normalized = 'provide normalization instead')", details = c( From 977c19427603e7c2238e79227b9932d0ef9dcbed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 13:40:05 +0200 Subject: [PATCH 41/48] feat!: bump deprecate_soft to deprecate_warn in R/structure.info.R --- NEWS.md | 1 + R/structure.info.R | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 1dea43e2094..1b497b0ef55 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,7 @@ ## Deprecated and defunct +- `are.connected(()` is now deprecated with a warning instead of a message. - `get.shortest.paths(()` is now deprecated with a warning instead of a message. - `get.diameter(()` is now deprecated with a warning instead of a message. - `unfold.tree(()` is now deprecated with a warning instead of a message. diff --git a/R/structure.info.R b/R/structure.info.R index 813a2a9f93a..3f24c0f6b5b 100644 --- a/R/structure.info.R +++ b/R/structure.info.R @@ -10,7 +10,7 @@ #' @export are.connected <- function(graph, v1, v2) { # nocov start - lifecycle::deprecate_soft("2.0.0", "are.connected()", "are_adjacent()") + lifecycle::deprecate_warn("2.0.0", "are.connected()", "are_adjacent()") are_adjacent(graph = graph, v1 = v1, v2 = v2) } # nocov end From 1378cc961cf3b65549a80de7a2defb983e5609a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 13:41:39 +0200 Subject: [PATCH 42/48] feat!: bump deprecate_soft to deprecate_warn in R/tkplot.R --- NEWS.md | 9 +++++++++ R/tkplot.R | 20 ++++++++++---------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/NEWS.md b/NEWS.md index 1b497b0ef55..f01f57897ee 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,15 @@ ## Deprecated and defunct +- `tkplot.setcoords(()` is now deprecated with a warning instead of a message. +- `tkplot.rotate(()` is now deprecated with a warning instead of a message. +- `tkplot.reshape(()` is now deprecated with a warning instead of a message. +- `tkplot.off(()` is now deprecated with a warning instead of a message. +- `tkplot.getcoords(()` is now deprecated with a warning instead of a message. +- `tkplot.fit.to.screen(()` is now deprecated with a warning instead of a message. +- `tkplot.close(()` is now deprecated with a warning instead of a message. +- `tkplot.center(()` is now deprecated with a warning instead of a message. +- `tkplot.canvas(()` is now deprecated with a warning instead of a message. - `are.connected(()` is now deprecated with a warning instead of a message. - `get.shortest.paths(()` is now deprecated with a warning instead of a message. - `get.diameter(()` is now deprecated with a warning instead of a message. diff --git a/R/tkplot.R b/R/tkplot.R index 0e39ec364a8..1092800a955 100644 --- a/R/tkplot.R +++ b/R/tkplot.R @@ -10,7 +10,7 @@ #' @export tkplot.setcoords <- function(tkp.id, coords) { # nocov start - lifecycle::deprecate_soft("2.0.0", "tkplot.setcoords()", "tk_set_coords()") + lifecycle::deprecate_warn("2.0.0", "tkplot.setcoords()", "tk_set_coords()") tk_set_coords(tkp.id = tkp.id, coords = coords) } # nocov end @@ -26,7 +26,7 @@ tkplot.setcoords <- function(tkp.id, coords) { #' @export tkplot.rotate <- function(tkp.id, degree = NULL, rad = NULL) { # nocov start - lifecycle::deprecate_soft("2.0.0", "tkplot.rotate()", "tk_rotate()") + lifecycle::deprecate_warn("2.0.0", "tkplot.rotate()", "tk_rotate()") tk_rotate(tkp.id = tkp.id, degree = degree, rad = rad) } # nocov end @@ -42,7 +42,7 @@ tkplot.rotate <- function(tkp.id, degree = NULL, rad = NULL) { #' @export tkplot.reshape <- function(tkp.id, newlayout, ..., params) { # nocov start - lifecycle::deprecate_soft("2.0.0", "tkplot.reshape()", "tk_reshape()") + lifecycle::deprecate_warn("2.0.0", "tkplot.reshape()", "tk_reshape()") tk_reshape(tkp.id = tkp.id, newlayout = newlayout, params = params, ...) } # nocov end @@ -58,7 +58,7 @@ tkplot.reshape <- function(tkp.id, newlayout, ..., params) { #' @export tkplot.off <- function() { # nocov start - lifecycle::deprecate_soft("2.0.0", "tkplot.off()", "tk_off()") + lifecycle::deprecate_warn("2.0.0", "tkplot.off()", "tk_off()") tk_off() } # nocov end @@ -74,7 +74,7 @@ tkplot.off <- function() { #' @export tkplot.getcoords <- function(tkp.id, norm = FALSE) { # nocov start - lifecycle::deprecate_soft("2.0.0", "tkplot.getcoords()", "tk_coords()") + lifecycle::deprecate_warn("2.0.0", "tkplot.getcoords()", "tk_coords()") tk_coords(tkp.id = tkp.id, norm = norm) } # nocov end @@ -90,7 +90,7 @@ tkplot.getcoords <- function(tkp.id, norm = FALSE) { #' @export tkplot.fit.to.screen <- function(tkp.id, width = NULL, height = NULL) { # nocov start - lifecycle::deprecate_soft("2.0.0", "tkplot.fit.to.screen()", "tk_fit()") + lifecycle::deprecate_warn("2.0.0", "tkplot.fit.to.screen()", "tk_fit()") tk_fit(tkp.id = tkp.id, width = width, height = height) } # nocov end @@ -106,7 +106,7 @@ tkplot.fit.to.screen <- function(tkp.id, width = NULL, height = NULL) { #' @export tkplot.export.postscript <- function(tkp.id) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "tkplot.export.postscript()", "tk_postscript()" @@ -126,7 +126,7 @@ tkplot.export.postscript <- function(tkp.id) { #' @export tkplot.close <- function(tkp.id, window.close = TRUE) { # nocov start - lifecycle::deprecate_soft("2.0.0", "tkplot.close()", "tk_close()") + lifecycle::deprecate_warn("2.0.0", "tkplot.close()", "tk_close()") tk_close(tkp.id = tkp.id, window.close = window.close) } # nocov end @@ -142,7 +142,7 @@ tkplot.close <- function(tkp.id, window.close = TRUE) { #' @export tkplot.center <- function(tkp.id) { # nocov start - lifecycle::deprecate_soft("2.0.0", "tkplot.center()", "tk_center()") + lifecycle::deprecate_warn("2.0.0", "tkplot.center()", "tk_center()") tk_center(tkp.id = tkp.id) } # nocov end @@ -158,7 +158,7 @@ tkplot.center <- function(tkp.id) { #' @export tkplot.canvas <- function(tkp.id) { # nocov start - lifecycle::deprecate_soft("2.0.0", "tkplot.canvas()", "tk_canvas()") + lifecycle::deprecate_warn("2.0.0", "tkplot.canvas()", "tk_canvas()") tk_canvas(tkp.id = tkp.id) } # nocov end # IGraph R package From 49c740d1eff8cc36ec249361e149e724ba1f7703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 13:42:47 +0200 Subject: [PATCH 43/48] feat!: bump deprecate_soft to deprecate_warn in R/topology.R --- NEWS.md | 2 ++ R/topology.R | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/NEWS.md b/NEWS.md index f01f57897ee..41055bcdeba 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,8 @@ ## Deprecated and defunct +- `permute.vertices(()` is now deprecated with a warning instead of a message. +- `automorphisms(()` is now deprecated with a warning instead of a message. - `tkplot.setcoords(()` is now deprecated with a warning instead of a message. - `tkplot.rotate(()` is now deprecated with a warning instead of a message. - `tkplot.reshape(()` is now deprecated with a warning instead of a message. diff --git a/R/topology.R b/R/topology.R index 8386e479087..2d951b778c8 100644 --- a/R/topology.R +++ b/R/topology.R @@ -10,7 +10,7 @@ #' @export permute.vertices <- function(graph, permutation) { # nocov start - lifecycle::deprecate_soft("2.0.0", "permute.vertices()", "permute()") + lifecycle::deprecate_warn("2.0.0", "permute.vertices()", "permute()") permute(graph = graph, permutation = permutation) } # nocov end @@ -26,7 +26,7 @@ permute.vertices <- function(graph, permutation) { #' @export graph.isocreate <- function(size, number, directed = TRUE) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "graph.isocreate()", "graph_from_isomorphism_class()" @@ -54,7 +54,7 @@ graph.automorphisms <- function( sh = c("fm", "f", "fs", "fl", "flm", "fsm") ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "graph.automorphisms()", "count_automorphisms()" @@ -78,7 +78,7 @@ canonical.permutation <- function( sh = c("fm", "f", "fs", "fl", "flm", "fsm") ) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "canonical.permutation()", "canonical_permutation()" @@ -102,7 +102,7 @@ automorphisms <- function( sh = c("fm", "f", "fs", "fl", "flm", "fsm") ) { # nocov start - lifecycle::deprecate_soft("2.0.0", "automorphisms()", "count_automorphisms()") + lifecycle::deprecate_warn("2.0.0", "automorphisms()", "count_automorphisms()") count_automorphisms(graph = graph, colors = colors, sh = sh) } # nocov end From 12a64ac0ec4e813a92847c09d19bdaf803fae638 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 13:43:48 +0200 Subject: [PATCH 44/48] feat!: bump deprecate_soft to deprecate_warn in R/triangles.R --- R/triangles.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/triangles.R b/R/triangles.R index a318bc66c6e..723d1fc08bb 100644 --- a/R/triangles.R +++ b/R/triangles.R @@ -10,7 +10,7 @@ #' @export adjacent.triangles <- function(graph, vids = V(graph)) { # nocov start - lifecycle::deprecate_soft( + lifecycle::deprecate_warn( "2.0.0", "adjacent.triangles()", "count_triangles()" From c763bdae1c7e8d54a83581eaf88f0b63c5648ce6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 13:46:02 +0200 Subject: [PATCH 45/48] feat!: bump deprecate_soft to deprecate_warn in R/versions.R --- NEWS.md | 1 + R/versions.R | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 41055bcdeba..07f8ebd4528 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,7 @@ ## Deprecated and defunct +- `igraph.version(()` is now deprecated with a warning instead of a message. - `permute.vertices(()` is now deprecated with a warning instead of a message. - `automorphisms(()` is now deprecated with a warning instead of a message. - `tkplot.setcoords(()` is now deprecated with a warning instead of a message. diff --git a/R/versions.R b/R/versions.R index 4855aa30ffe..5effcc955f6 100644 --- a/R/versions.R +++ b/R/versions.R @@ -202,7 +202,7 @@ clear_native_ptr <- function(g) { #' @export igraph.version <- function() { # nocov start - lifecycle::deprecate_soft("2.0.0", "igraph.version()", "igraph_version()") + lifecycle::deprecate_warn("2.0.0", "igraph.version()", "igraph_version()") igraph_version() } # nocov end From e26db2522e3bf56de1247d3116605b13aaf9c2fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 13:54:21 +0200 Subject: [PATCH 46/48] chore: tools --- tools/bump-lifecycle.R | 440 +++++++++++++++++++++++++++++++++++++++ tools/commit-lifecycle.R | 30 ++- tools/handle-lifecycle.R | 98 +++++++++ 3 files changed, 550 insertions(+), 18 deletions(-) create mode 100644 tools/bump-lifecycle.R create mode 100644 tools/handle-lifecycle.R diff --git a/tools/bump-lifecycle.R b/tools/bump-lifecycle.R new file mode 100644 index 00000000000..24bccd6e139 --- /dev/null +++ b/tools/bump-lifecycle.R @@ -0,0 +1,440 @@ +library(treesitter) +library(treesitter.r) + +# --- Reset to baseline (undo any previous partial run) --- +# .claude/settings.local.json is untracked, so git reset --hard leaves it alone. +# This script is tracked, so we save and restore it across the reset. +local({ + baseline <- "fb68fc60b2e673a2994885ed454dbbaca709096c" + script_path <- here::here("tools", "bump-lifecycle.R") + saved <- readLines(script_path, warn = FALSE) + cli::cli_alert_info("Resetting to {substr(baseline, 1L, 7L)} ...") + system2("git", c("-C", here::here(), "reset", "--hard", baseline)) + writeLines(saved, script_path) + cli::cli_alert_success("Restored tools/bump-lifecycle.R") +}) + +lang <- treesitter.r::language() + +# deprecate_soft / deprecate_warn / deprecate_stop are all 14 chars — same length, +# so substr<-() replacement never shifts line/column positions. +next_level <- c( + deprecate_soft = "deprecate_warn", + deprecate_warn = "deprecate_stop" +) + +# Uncomment to inspect node types for a sample expression: +# text <- 'lifecycle::deprecate_soft("1.0.0", "foo()")' +# node_show_s_expression(tree_root_node(parser_parse(parser(lang), text))) + +# --- tree navigation helpers --- + +fn_to_call <- function(fn_node) { + # "deprecate_X" identifier -> namespace_operator -> call + node_parent(node_parent(fn_node)) +} + +# A pure shim is a function whose body contains exactly one statement: the deprecate_stop() call. +is_pure_shim <- function(fn_node) { + call_node <- fn_to_call(fn_node) + body_node <- node_parent(call_node) # braced_expression (the { } body) + fn_def_node <- node_parent(body_node) # function_definition + asgn_node <- node_parent(fn_def_node) # binary_operator (<-) + + if (node_type(fn_def_node) != "function_definition") { + return(FALSE) + } + if (node_type(asgn_node) != "binary_operator") { + return(FALSE) + } + length(node_named_children(body_node)) == 1L +} + +get_asgn_node <- function(fn_node) { + node_parent(node_parent(node_parent(fn_to_call(fn_node)))) +} + +get_fn_name <- function(fn_node) { + node_text(node_named_children(get_asgn_node(fn_node))[[1L]]) +} + +# Returns TRUE if fn_name appears as an identifier in any R file other than current_path. +# Used to protect shims that are still referenced internally. +is_referenced_elsewhere <- function(fn_name, current_path) { + escaped <- gsub("([.^$|*+?(){}\\[\\]])", "\\\\\\1", fn_name) + pattern <- paste0("(?= 1L && grepl("^\\s*(#'.*)?$", lines[i])) { + i <- i - 1L + } + if (i + 1L > first_fn_line - 1L) { + integer(0L) + } else { + seq(i + 1L, first_fn_line - 1L) + } +} + +# --- test helpers --- + +# Add `error = TRUE` to the expect_snapshot() call at row_1indexed in test_file. +add_error_true <- function(test_file, row_1indexed) { + if (!file.exists(test_file)) { + return(invisible(FALSE)) + } + lines <- readLines(test_file, warn = FALSE) + text <- paste(lines, collapse = "\n") + root <- tree_root_node(parser_parse(parser(lang), text)) + + q <- query( + lang, + '(call function: (identifier) @fn (#eq? @fn "expect_snapshot"))' + ) + caps <- query_captures(q, root) + fn_nodes <- caps$node[caps$name == "fn"] + + for (fn in fn_nodes) { + if (point_row(node_start_point(fn)) + 1L != row_1indexed) { + next + } + + call_node <- node_parent(fn) + args_node <- Filter( + \(n) node_type(n) == "arguments", + node_children(call_node) + ) + if (length(args_node) == 0L) { + next + } + args_node <- args_node[[1L]] + + if (grepl("error\\s*=\\s*TRUE", node_text(args_node))) { + return(invisible(FALSE)) + } + + # Insert `error = TRUE, ` right after the opening `(` + open_row <- point_row(node_start_point(args_node)) + 1L + open_col <- point_column(node_start_point(args_node)) + 1L + line <- lines[open_row] + lines[open_row] <- paste0( + substr(line, 1L, open_col), + "error = TRUE, ", + substr(line, open_col + 1L, nchar(line)) + ) + writeLines(lines, test_file) + return(invisible(TRUE)) + } + invisible(FALSE) +} + +# Patch expect_snapshot() calls for lifecycle errors found by run_one(). +# failures: list of {msg, src_file, line} returned from the callr subprocess. +fix_lifecycle_snapshot_failures <- function(failures, root) { + fixed <- FALSE + for (f in failures) { + if (!grepl("lifecycle_error_deprecated|defunctError|defunct", f$msg)) next + src_file <- f$src_file + line <- f$line + if (is.null(src_file) || is.null(line) || is.na(line)) next + file_path <- if (file.exists(src_file)) src_file else { + file.path(root, "tests", "testthat", basename(src_file)) + } + if (!file.exists(file_path)) next + if (add_error_true(file_path, line)) fixed <- TRUE + } + fixed +} + +# --- test runner --- + +# Accumulates {commit, tests} pairs for changes that left tests failing. +unresolved_failures <- list() +n_commits <- 0L + +# Returns character vector of still-failing test names (empty if all pass). +run_tests <- function(path) { + src_name <- fs::path_ext_remove(fs::path_file(path)) + test_file <- here::here("tests", "testthat", paste0("test-", src_name, ".R")) + if (!file.exists(test_file)) return(character(0)) + + root <- here::here() + + # Each call runs in a fresh subprocess — no memory accumulation in the main session. + run_one <- function(update_snapshots = FALSE) { + callr::r( + function(root, src_name, update_snapshots) { + if (update_snapshots) options(testthat.snapshot.update = TRUE) + result <- testthat::test_local( + root, filter = src_name, stop_on_failure = FALSE, reporter = "minimal" + ) + df <- as.data.frame(result) + failures <- list() + for (fr in result) { + for (exp in fr) { + if (!inherits(exp, c("expectation_failure", "expectation_error"))) next + msg <- tryCatch(conditionMessage(exp), error = function(e) "") + srcref <- tryCatch(exp$srcref, error = function(e) NULL) + src_file <- tryCatch(attr(srcref, "srcfile")$filename, error = function(e) NULL) + line <- tryCatch(as.integer(srcref)[1L], error = function(e) NA_integer_) + failures[[length(failures) + 1L]] <- list(msg = msg, src_file = src_file, line = line) + } + } + list( + n_fail = sum(df$failed, na.rm = TRUE) + sum(df$error, na.rm = TRUE), + bad_tests = df$test[df$failed + df$error > 0L], + failures = failures + ) + }, + args = list(root = root, src_name = src_name, update_snapshots = update_snapshots) + ) + } + + out <- run_one() + + if (out$n_fail > 0L && fix_lifecycle_snapshot_failures(out$failures, root)) { + out <- run_one() + } + + if (out$n_fail > 0L) { + out <- run_one(update_snapshots = TRUE) + if (out$n_fail > 0L) { + bad <- out$bad_tests + cli::cli_alert_warning( + "{out$n_fail} test(s) still failing after snapshot update (need manual fixes): {paste(bad, collapse = ', ')}" + ) + return(bad) + } + } + + character(0) +} + +commit_change <- function(path, msg) { + bad <- run_tests(path) + if (length(bad) > 0L) { + unresolved_failures[[length(unresolved_failures) + 1L]] <<- list( + commit = msg, + tests = bad + ) + } + gert::git_add(fs::path_rel(path, here::here())) + # Stage any modified test or snapshot files produced during the test run + status <- gert::git_status() + extra <- status$file[startsWith(status$file, "tests/") & !status$staged] + if (length(extra) > 0L) { + gert::git_add(extra) + } + gert::git_commit(msg) + n_commits <<- n_commits + 1L +} + +write_unresolved_report <- function() { + if (length(unresolved_failures) == 0L) return(invisible(NULL)) + out <- here::here("lifecycle-TODO.md") + lines <- c( + "# lifecycle bump — unresolved test failures", + "", + paste0( + "These commits were made but left tests failing that need manual fixes ", + "(tests call deprecated functions expecting a result, not an error):" + ), + "" + ) + for (item in unresolved_failures) { + lines <- c( + lines, + paste0("## `", item$commit, "`"), + "", + paste0("- ", item$tests), + "" + ) + } + writeLines(lines, out) + cli::cli_alert_warning("Wrote {length(unresolved_failures)} unresolved item(s) to lifecycle-TODO.md") +} + +# --- queries --- + +bump_query <- query( + lang, + ' + (call + function: (namespace_operator + lhs: (identifier) @ns + rhs: (identifier) @fn) + arguments: (arguments + (argument) + (argument value: (string content: (string_content) @what))) + (#eq? @ns "lifecycle") + (#match? @fn "^deprecate_(soft|warn)$")) +' +) + +stop_query <- query( + lang, + ' + (call + function: (namespace_operator + lhs: (identifier) @ns + rhs: (identifier) @fn) + arguments: (arguments + (argument) + (argument value: (string content: (string_content) @what))) + (#eq? @ns "lifecycle") + (#eq? @fn "deprecate_stop")) +' +) + +# --- per-file processing --- + +process_file <- function(path) { + + # ---- 1. BUMP: deprecate_soft -> deprecate_warn, deprecate_warn -> deprecate_stop ---- + + lines <- readLines(path, warn = FALSE) + root <- tree_root_node(parser_parse( + parser(lang), + paste(lines, collapse = "\n") + )) + matches <- query_matches(bump_query, root)[[1]] + + if (length(matches) > 0L) { + fn_nodes <- lapply(matches, \(m) m$node[m$name == "fn"][[1]]) + what_nodes <- lapply(matches, \(m) m$node[m$name == "what"][[1]]) + rows <- vapply(fn_nodes, \(n) point_row(node_start_point(n)), numeric(1)) + cols <- vapply(fn_nodes, \(n) point_column(node_start_point(n)), numeric(1)) + old_names <- vapply(fn_nodes, node_text, character(1)) + whats <- vapply(what_nodes, node_text, character(1)) + + # Calls with >2 args produce a duplicate match for the same @fn node. + # Keep only the first occurrence (args 1+2 = version+what). + dups <- duplicated(paste(rows, cols, sep = ":")) + fn_nodes <- fn_nodes[!dups] + what_nodes <- what_nodes[!dups] + rows <- rows[!dups] + cols <- cols[!dups] + old_names <- old_names[!dups] + whats <- whats[!dups] + + for (i in order(rows, decreasing = TRUE)) { + r <- rows[i] + 1L + c <- cols[i] + 1L + new_name <- next_level[[old_names[i]]] + substr(lines[r], c, c + 13L) <- new_name + writeLines(lines, path) + msg <- sprintf( + "feat!: bump %s from %s to %s", + whats[i], + old_names[i], + new_name + ) + commit_change(path, msg) + } + } + + # ---- 2. REMOVE: pure deprecate_stop shim functions ---- + + # Re-parse after bumps (newly-bumped deprecate_stop shims are included here). + lines <- readLines(path, warn = FALSE) + root <- tree_root_node(parser_parse( + parser(lang), + paste(lines, collapse = "\n") + )) + stop_matches <- query_matches(stop_query, root)[[1]] + fn_nodes <- lapply(stop_matches, \(m) m$node[m$name == "fn"][[1]]) + what_nodes <- lapply(stop_matches, \(m) m$node[m$name == "what"][[1]]) + + # Same deduplication: calls with a third argument (e.g. `with`) match twice. + if (length(fn_nodes) > 0L) { + stop_rows <- vapply( + fn_nodes, + \(n) point_row(node_start_point(n)), + numeric(1) + ) + stop_cols <- vapply( + fn_nodes, + \(n) point_column(node_start_point(n)), + numeric(1) + ) + stop_dups <- duplicated(paste(stop_rows, stop_cols, sep = ":")) + fn_nodes <- fn_nodes[!stop_dups] + what_nodes <- what_nodes[!stop_dups] + } + + if (length(fn_nodes) == 0L) { + return(invisible(NULL)) + } + + shim_mask <- vapply(fn_nodes, is_pure_shim, logical(1)) + fn_shims <- fn_nodes[shim_mask] + what_shims <- what_nodes[shim_mask] + if (length(fn_shims) == 0L) { + return(invisible(NULL)) + } + + asgn_nodes <- lapply(fn_shims, get_asgn_node) + starts <- vapply( + asgn_nodes, + \(n) point_row(node_start_point(n)) + 1L, + numeric(1) + ) + ends <- vapply(asgn_nodes, \(n) point_row(node_end_point(n)) + 1L, numeric(1)) + whats <- vapply(what_shims, node_text, character(1)) + + for (j in order(starts, decreasing = TRUE)) { + fn_name <- get_fn_name(fn_shims[[j]]) + if (is_referenced_elsewhere(fn_name, path)) { + cli::cli_alert_warning( + "Skipping removal of {fn_name}(): still referenced in other R files (fix iterators manually)" + ) + unresolved_failures[[length(unresolved_failures) + 1L]] <<- list( + commit = sprintf("feat!: remove deprecated %s (lifecycle::deprecate_stop)", whats[j]), + tests = paste0(fn_name, "() skipped: still referenced in other R files") + ) + next + } + lines <- readLines(path, warn = FALSE) + doc_range <- preceding_doc_range(lines, starts[j]) + fn_range <- seq(starts[j], ends[j]) + after_line <- ends[j] + 1L + trail <- if ( + after_line <= length(lines) && grepl("^\\s*$", lines[after_line]) + ) { + after_line + } else { + integer(0L) + } + writeLines(lines[-c(doc_range, fn_range, trail)], path) + msg <- sprintf( + "feat!: remove deprecated %s (lifecycle::deprecate_stop)", + whats[j] + ) + commit_change(path, msg) + } +} + +# --- run over all R source files --- + +r_files <- fs::dir_ls(here::here("R"), glob = "*.R") + +cli::cli_progress_bar( + total = length(r_files), + format = "{cli::pb_bar} {cli::pb_current}/{cli::pb_total} | {n_commits} commits | ETA {cli::pb_eta} | {cli::pb_status}", + format_done = "{cli::pb_total} files done | {n_commits} commits in {cli::pb_elapsed}", + clear = FALSE +) +for (path in r_files) { + cli::cli_progress_update(status = basename(path)) + process_file(path) + cli::cli_progress_update(inc = 1L) +} +cli::cli_progress_done() + +write_unresolved_report() diff --git a/tools/commit-lifecycle.R b/tools/commit-lifecycle.R index 71b175fe519..30de5ae3083 100644 --- a/tools/commit-lifecycle.R +++ b/tools/commit-lifecycle.R @@ -37,20 +37,18 @@ # gert::git_pull(repo = here::here(), remote = "origin", refspec = "main") # cli::cli_alert_success("Pulled and fast-forwarded to main") -gert::git_fetch( - "origin", - refspec = "refs/heads/main:refs/heads/main", - repo = here::here() -) -gert::git_reset_mixed("main", repo = here::here()) +if (gert::git_ahead_behind("main", repo = here::here())$ahead == 0) { + gert::git_fetch("origin", refspec = "refs/heads/main:refs/heads/main", repo = here::here()) + gert::git_reset_mixed("main", repo = here::here()) +} else { + cli::cli_alert_info("Commits already ahead of main — skipping reset, resuming") +} -usethis::use_build_ignore("lifecycle") -usethis::use_git_ignore("lifecycle") +if (gert::git_ahead_behind("main", repo = here::here())$ahead == 0) { + usethis::use_build_ignore("lifecycle") + usethis::use_git_ignore("lifecycle") -gert::git_add( - c("tools/commit-lifecycle.R", ".gitignore", ".Rbuildignore"), - repo = here::here() -) +gert::git_add(c("tools/commit-lifecycle.R", ".gitignore", ".Rbuildignore"), repo = here::here()) gert::git_commit("chore: add commit-lifecycle.R script", repo = here::here()) cli::cli_alert_success("Committed tools/commit-lifecycle.R") @@ -98,14 +96,10 @@ for (stem in tools::file_path_sans_ext(r_files)) { devtools::document(quiet = TRUE) tryCatch( callr::r( - function(pkg, filter) { - devtools::test(pkg = pkg, filter = filter, stop_on_failure = FALSE) - }, + function(pkg, filter) devtools::test(pkg = pkg, filter = filter, stop_on_failure = FALSE), args = list(pkg = here::here(), filter = stem) ), - error = function(e) { - cli::cli_alert_warning("Tests errored for {stem}: {conditionMessage(e)}") - } + error = function(e) cli::cli_alert_warning("Tests errored for {stem}: {conditionMessage(e)}") ) gert::git_add(c(files_to_stage, "man", "NAMESPACE"), repo = here::here()) diff --git a/tools/handle-lifecycle.R b/tools/handle-lifecycle.R new file mode 100644 index 00000000000..f0b9a98e417 --- /dev/null +++ b/tools/handle-lifecycle.R @@ -0,0 +1,98 @@ +# For each R file still containing lifecycle::deprecate_soft or lifecycle::deprecate_warn: +# advance the level with regex, document, test (stop on error so you can fix), +# prompt to continue, add NEWS item, commit. + +already_committed <- system2("git", c("diff", "--name-only", "main..HEAD"), stdout = TRUE) +already_committed <- basename(already_committed[grepl("^R/", already_committed)]) + +r_files <- sort(setdiff( + list.files(here::here("R"), pattern = "\\.R$", full.names = FALSE), + already_committed +)) + +for (f in r_files) { + path <- here::here("R", f) + lines <- readLines(path, warn = FALSE) + + has_soft <- any(grepl("lifecycle::deprecate_soft", lines, fixed = TRUE)) + has_warn <- any(grepl("lifecycle::deprecate_warn", lines, fixed = TRUE)) + + if (!has_soft && !has_warn) next + + stem <- tools::file_path_sans_ext(f) + cli::cli_alert_info("Processing R/{f}") + + # Extract function names before replacement for NEWS + extract_fns <- function(lines, level) { + hits <- grep(paste0("lifecycle::", level), lines, fixed = TRUE, value = TRUE) + m <- regmatches(hits, regexpr( + paste0('lifecycle::', level, '\\([^,]+,\\s*"([^("]+)\\('), + hits, perl = TRUE + )) + sub(paste0('.*"'), "", m[nzchar(m)]) + } + soft_fns <- extract_fns(lines, "deprecate_soft") + warn_fns <- extract_fns(lines, "deprecate_warn") + + # Advance: warn -> stop first to avoid double-replacement + lines <- gsub("lifecycle::deprecate_warn", "lifecycle::deprecate_stop", lines, fixed = TRUE) + lines <- gsub("lifecycle::deprecate_soft", "lifecycle::deprecate_warn", lines, fixed = TRUE) + writeLines(lines, path) + + devtools::document(quiet = TRUE) + + # Tests — stop on failure so the user can fix + if (file.exists(here::here("tests", "testthat", paste0("test-", stem, ".R")))) { + callr::r( + function(pkg, filter) devtools::test(pkg = pkg, filter = filter, stop_on_failure = TRUE), + args = list(pkg = here::here(), filter = stem) + ) + } + + answer <- readline(paste0("Tests passed for R/", f, ". Commit? [Enter = yes / n = stop] ")) + if (trimws(tolower(answer)) == "n") stop("Stopped at R/", f, ". Fix, then commit manually and re-run.") + + # Add NEWS items + news_entries <- c( + if (length(soft_fns) > 0) + paste0("- `", soft_fns, "()` is now deprecated with a warning instead of a message."), + if (length(warn_fns) > 0) + paste0("- `", warn_fns, "()` is now defunct (errors instead of warning).") + ) + + news_lines <- readLines(here::here("NEWS.md"), warn = FALSE) + depr_idx <- which(news_lines == "## Deprecated and defunct") + + if (length(depr_idx) > 0) { + insert_pos <- depr_idx[[1]] + 2L + new_news <- c( + news_lines[seq_len(insert_pos - 1L)], + news_entries, + news_lines[seq(insert_pos, length(news_lines))] + ) + } else { + first_ver_idx <- which(grepl("^# igraph", news_lines))[[1]] + new_news <- c( + news_lines[seq_len(first_ver_idx)], + "", + "## Deprecated and defunct", + "", + news_entries, + "", + news_lines[seq(first_ver_idx + 1L, length(news_lines))] + ) + } + writeLines(new_news, here::here("NEWS.md")) + + commit_msg <- if (has_soft && has_warn) { + paste0("feat!: bump deprecated functions in R/", f) + } else if (has_soft) { + paste0("feat!: bump deprecate_soft to deprecate_warn in R/", f) + } else { + paste0("feat!: bump deprecate_warn to deprecate_stop in R/", f) + } + + gert::git_add(c(paste0("R/", f), "man", "NAMESPACE", "NEWS.md"), repo = here::here()) + gert::git_commit(commit_msg, repo = here::here()) + cli::cli_alert_success("Committed R/{f}") +} From 3805f60e5a59053c2b7605531897ea2edfb7008b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 19 May 2026 15:05:00 +0200 Subject: [PATCH 47/48] oops --- tools/commit-lifecycle.R | 42 ++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/tools/commit-lifecycle.R b/tools/commit-lifecycle.R index 30de5ae3083..36521d3e358 100644 --- a/tools/commit-lifecycle.R +++ b/tools/commit-lifecycle.R @@ -38,19 +38,29 @@ # cli::cli_alert_success("Pulled and fast-forwarded to main") if (gert::git_ahead_behind("main", repo = here::here())$ahead == 0) { - gert::git_fetch("origin", refspec = "refs/heads/main:refs/heads/main", repo = here::here()) + gert::git_fetch( + "origin", + refspec = "refs/heads/main:refs/heads/main", + repo = here::here() + ) gert::git_reset_mixed("main", repo = here::here()) } else { - cli::cli_alert_info("Commits already ahead of main — skipping reset, resuming") + cli::cli_alert_info( + "Commits already ahead of main — skipping reset, resuming" + ) } if (gert::git_ahead_behind("main", repo = here::here())$ahead == 0) { usethis::use_build_ignore("lifecycle") usethis::use_git_ignore("lifecycle") -gert::git_add(c("tools/commit-lifecycle.R", ".gitignore", ".Rbuildignore"), repo = here::here()) -gert::git_commit("chore: add commit-lifecycle.R script", repo = here::here()) -cli::cli_alert_success("Committed tools/commit-lifecycle.R") + gert::git_add( + c("tools/commit-lifecycle.R", "tools/handle-lifecycle.R", ".gitignore", ".Rbuildignore"), + repo = here::here() + ) + gert::git_commit("chore: add commit-lifecycle.R script", repo = here::here()) + cli::cli_alert_success("Committed tools/commit-lifecycle.R") +} # one commit per R script (copied back from the 'lifecycle' directory) + corresponding R test file if needed + run `document()` + run `test()`. @@ -94,13 +104,21 @@ for (stem in tools::file_path_sans_ext(r_files)) { } devtools::document(quiet = TRUE) - tryCatch( - callr::r( - function(pkg, filter) devtools::test(pkg = pkg, filter = filter, stop_on_failure = FALSE), - args = list(pkg = here::here(), filter = stem) - ), - error = function(e) cli::cli_alert_warning("Tests errored for {stem}: {conditionMessage(e)}") - ) + if (file.exists(lifecycle_test)) { + tryCatch( + callr::r( + function(pkg, filter) { + devtools::test(pkg = pkg, filter = filter, stop_on_failure = FALSE) + }, + args = list(pkg = here::here(), filter = stem) + ), + error = function(e) { + cli::cli_alert_warning( + "Tests errored for {stem}: {conditionMessage(e)}" + ) + } + ) + } gert::git_add(c(files_to_stage, "man", "NAMESPACE"), repo = here::here()) gert::git_commit( From 4950cf7b366ff283fe675de4c1203ecccae19d00 Mon Sep 17 00:00:00 2001 From: maelle Date: Tue, 19 May 2026 13:13:04 +0000 Subject: [PATCH 48/48] chore: Auto-update from GitHub Actions Run: https://github.com/igraph/rigraph/actions/runs/26099065495 --- tools/bump-lifecycle.R | 96 ++++++++++++++++++++++++++++------------ tools/handle-lifecycle.R | 73 +++++++++++++++++++++++------- 2 files changed, 125 insertions(+), 44 deletions(-) diff --git a/tools/bump-lifecycle.R b/tools/bump-lifecycle.R index 24bccd6e139..e940961f15c 100644 --- a/tools/bump-lifecycle.R +++ b/tools/bump-lifecycle.R @@ -64,9 +64,13 @@ is_referenced_elsewhere <- function(fn_name, current_path) { escaped <- gsub("([.^$|*+?(){}\\[\\]])", "\\\\\\1", fn_name) pattern <- paste0("(? 0L], - failures = failures + failures = failures ) }, - args = list(root = root, src_name = src_name, update_snapshots = update_snapshots) + args = list( + root = root, + src_name = src_name, + update_snapshots = update_snapshots + ) ) } @@ -221,7 +255,7 @@ commit_change <- function(path, msg) { if (length(bad) > 0L) { unresolved_failures[[length(unresolved_failures) + 1L]] <<- list( commit = msg, - tests = bad + tests = bad ) } gert::git_add(fs::path_rel(path, here::here())) @@ -236,7 +270,9 @@ commit_change <- function(path, msg) { } write_unresolved_report <- function() { - if (length(unresolved_failures) == 0L) return(invisible(NULL)) + if (length(unresolved_failures) == 0L) { + return(invisible(NULL)) + } out <- here::here("lifecycle-TODO.md") lines <- c( "# lifecycle bump — unresolved test failures", @@ -257,7 +293,9 @@ write_unresolved_report <- function() { ) } writeLines(lines, out) - cli::cli_alert_warning("Wrote {length(unresolved_failures)} unresolved item(s) to lifecycle-TODO.md") + cli::cli_alert_warning( + "Wrote {length(unresolved_failures)} unresolved item(s) to lifecycle-TODO.md" + ) } # --- queries --- @@ -295,7 +333,6 @@ stop_query <- query( # --- per-file processing --- process_file <- function(path) { - # ---- 1. BUMP: deprecate_soft -> deprecate_warn, deprecate_warn -> deprecate_stop ---- lines <- readLines(path, warn = FALSE) @@ -395,8 +432,11 @@ process_file <- function(path) { "Skipping removal of {fn_name}(): still referenced in other R files (fix iterators manually)" ) unresolved_failures[[length(unresolved_failures) + 1L]] <<- list( - commit = sprintf("feat!: remove deprecated %s (lifecycle::deprecate_stop)", whats[j]), - tests = paste0(fn_name, "() skipped: still referenced in other R files") + commit = sprintf( + "feat!: remove deprecated %s (lifecycle::deprecate_stop)", + whats[j] + ), + tests = paste0(fn_name, "() skipped: still referenced in other R files") ) next } @@ -426,7 +466,7 @@ r_files <- fs::dir_ls(here::here("R"), glob = "*.R") cli::cli_progress_bar( total = length(r_files), - format = "{cli::pb_bar} {cli::pb_current}/{cli::pb_total} | {n_commits} commits | ETA {cli::pb_eta} | {cli::pb_status}", + format = "{cli::pb_bar} {cli::pb_current}/{cli::pb_total} | {n_commits} commits | ETA {cli::pb_eta} | {cli::pb_status}", format_done = "{cli::pb_total} files done | {n_commits} commits in {cli::pb_elapsed}", clear = FALSE ) diff --git a/tools/handle-lifecycle.R b/tools/handle-lifecycle.R index f0b9a98e417..5103b1c8e37 100644 --- a/tools/handle-lifecycle.R +++ b/tools/handle-lifecycle.R @@ -2,8 +2,15 @@ # advance the level with regex, document, test (stop on error so you can fix), # prompt to continue, add NEWS item, commit. -already_committed <- system2("git", c("diff", "--name-only", "main..HEAD"), stdout = TRUE) -already_committed <- basename(already_committed[grepl("^R/", already_committed)]) +already_committed <- system2( + "git", + c("diff", "--name-only", "main..HEAD"), + stdout = TRUE +) +already_committed <- basename(already_committed[grepl( + "^R/", + already_committed +)]) r_files <- sort(setdiff( list.files(here::here("R"), pattern = "\\.R$", full.names = FALSE), @@ -17,40 +24,71 @@ for (f in r_files) { has_soft <- any(grepl("lifecycle::deprecate_soft", lines, fixed = TRUE)) has_warn <- any(grepl("lifecycle::deprecate_warn", lines, fixed = TRUE)) - if (!has_soft && !has_warn) next + if (!has_soft && !has_warn) { + next + } stem <- tools::file_path_sans_ext(f) cli::cli_alert_info("Processing R/{f}") # Extract function names before replacement for NEWS extract_fns <- function(lines, level) { - hits <- grep(paste0("lifecycle::", level), lines, fixed = TRUE, value = TRUE) - m <- regmatches(hits, regexpr( - paste0('lifecycle::', level, '\\([^,]+,\\s*"([^("]+)\\('), - hits, perl = TRUE - )) + hits <- grep( + paste0("lifecycle::", level), + lines, + fixed = TRUE, + value = TRUE + ) + m <- regmatches( + hits, + regexpr( + paste0('lifecycle::', level, '\\([^,]+,\\s*"([^("]+)\\('), + hits, + perl = TRUE + ) + ) sub(paste0('.*"'), "", m[nzchar(m)]) } soft_fns <- extract_fns(lines, "deprecate_soft") - warn_fns <- extract_fns(lines, "deprecate_warn") + warn_fns <- extract_fns(lines, "deprecate_warn") # Advance: warn -> stop first to avoid double-replacement - lines <- gsub("lifecycle::deprecate_warn", "lifecycle::deprecate_stop", lines, fixed = TRUE) - lines <- gsub("lifecycle::deprecate_soft", "lifecycle::deprecate_warn", lines, fixed = TRUE) + lines <- gsub( + "lifecycle::deprecate_warn", + "lifecycle::deprecate_stop", + lines, + fixed = TRUE + ) + lines <- gsub( + "lifecycle::deprecate_soft", + "lifecycle::deprecate_warn", + lines, + fixed = TRUE + ) writeLines(lines, path) devtools::document(quiet = TRUE) # Tests — stop on failure so the user can fix - if (file.exists(here::here("tests", "testthat", paste0("test-", stem, ".R")))) { + if ( + file.exists(here::here("tests", "testthat", paste0("test-", stem, ".R"))) + ) { callr::r( - function(pkg, filter) devtools::test(pkg = pkg, filter = filter, stop_on_failure = TRUE), + function(pkg, filter) { + devtools::test(pkg = pkg, filter = filter, stop_on_failure = TRUE) + }, args = list(pkg = here::here(), filter = stem) ) } - answer <- readline(paste0("Tests passed for R/", f, ". Commit? [Enter = yes / n = stop] ")) - if (trimws(tolower(answer)) == "n") stop("Stopped at R/", f, ". Fix, then commit manually and re-run.") + answer <- readline(paste0( + "Tests passed for R/", + f, + ". Commit? [Enter = yes / n = stop] " + )) + if (trimws(tolower(answer)) == "n") { + stop("Stopped at R/", f, ". Fix, then commit manually and re-run.") + } # Add NEWS items news_entries <- c( @@ -92,7 +130,10 @@ for (f in r_files) { paste0("feat!: bump deprecate_warn to deprecate_stop in R/", f) } - gert::git_add(c(paste0("R/", f), "man", "NAMESPACE", "NEWS.md"), repo = here::here()) + gert::git_add( + c(paste0("R/", f), "man", "NAMESPACE", "NEWS.md"), + repo = here::here() + ) gert::git_commit(commit_msg, repo = here::here()) cli::cli_alert_success("Committed R/{f}") }