Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
9d1e64d
refactor: Rename `algo` to `algorithm` in `page_rank()`, `feedback_ar…
claude Aug 17, 2026
d010bfd
fix(migrations): don't treat a prefix-rename abbreviation as ambiguous
schochastics Sep 3, 2026
aa14fa9
Merge remote-tracking branch 'origin/main' into claude/issue-2788-sub…
schochastics Oct 15, 2026
b44ae03
chore: Regenerate migration blocks and use `expect_snapshot_igraph()`…
schochastics Oct 15, 2026
22ba5d7
Merge branch 'main' into claude/issue-2788-subagents-faw1t1
schochastics Dec 2, 2026
d659e07
test: Use `test_path()` without the `testthat::` prefix
schochastics Dec 2, 2026
3659ea4
test: Source the migration generator through one helper
schochastics Dec 2, 2026
621357c
Merge branch 'main' into claude/issue-2788-subagents-faw1t1
schochastics Dec 3, 2026
ea405ce
Merge branch 'main' into claude/issue-2788-subagents-faw1t1
schochastics Dec 3, 2026
767c882
feat: Let the migration generator re-match calls that use an old head…
schochastics Dec 3, 2026
31ad3ae
feat: Name the legacy argument when a re-matched call supplies one twice
schochastics Dec 3, 2026
a81d7c6
feat: Show the detected call when a re-matched call recovers old tail…
schochastics Dec 3, 2026
d34a54e
feat: Support head renames in functions that pass `...` on
schochastics Dec 3, 2026
02448e8
feat: Render no `...` recovery for a head rename with nothing past th…
schochastics Dec 3, 2026
6d6f35d
fix: Keep `value` last in the replacement-function migration fixture
schochastics Dec 3, 2026
2db505c
fix: Give the legacy re-match helper its own name
schochastics Dec 3, 2026
e508e36
Merge remote-tracking branch 'origin/main' into HEAD
schochastics Dec 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions R/centrality.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ subgraph.centrality <- function(graph, diag = FALSE) {
#' `page.rank()` was renamed to [page_rank()] to create a more
#' consistent API.
#' @inheritParams page_rank
#' @param algo `r lifecycle::badge("deprecated")` Use `algorithm` in
#' [page_rank()] instead.
#' @keywords internal
#' @export
page.rank <- function(
Expand All @@ -42,7 +44,7 @@ page.rank <- function(
lifecycle::deprecate_warn("2.0.0", "page.rank()", "page_rank()")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When will we get rid of those functions? Could we try deprecate_stop() in a PR? They're dead weight we're carrying around.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets do a separate PR that removes those wrappers for good :)

page_rank(
graph = graph,
algo = algo,
algorithm = algo,
vids = vids,
directed = directed,
damping = damping,
Expand Down Expand Up @@ -1914,7 +1916,7 @@ hub_score <- function(
#'
#' @param graph The graph object.
#' @inheritParams rlang::args_dots_empty
#' @param algo Character scalar, which implementation to use to carry out the
#' @param algorithm Character scalar, which implementation to use to carry out the
#' calculation. The default is `"prpack"`, which uses the PRPACK library
#' (<https://github.com/dgleich/prpack>) to calculate PageRank scores
#' by solving a set of linear equations. This is a new implementation in igraph
Expand Down Expand Up @@ -1983,7 +1985,7 @@ hub_score <- function(
page_rank <- function(
graph,
...,
algo = c("prpack", "arpack"),
algorithm = c("prpack", "arpack"),
vids = NULL,
directed = TRUE,
damping = 0.85,
Expand All @@ -2005,7 +2007,7 @@ page_rank <- function(
cli::cli_abort(base::c("Unexpected argument passed to {.fn page_rank}: {.arg {(.arg_extra)}}.", i = "Arguments after {.arg ...} must be spelled out in full."), call = base::parent.frame())
}
base::list(env = base::environment(), recovered = base::c(
if (!base::missing(algo)) base::c(algo = "algo"),
if (!base::missing(algo)) base::c(algorithm = "algo"),
if (!base::missing(vids)) base::c(vids = "vids"),
if (!base::missing(directed)) base::c(directed = "directed"),
if (!base::missing(damping)) base::c(damping = "damping"),
Expand All @@ -2015,7 +2017,6 @@ page_rank <- function(
))
}
.arg_given <- base::c(
if (!base::missing(algo)) "algo",
if (!base::missing(vids)) "vids",
if (!base::missing(directed)) "directed",
if (!base::missing(damping)) "damping",
Expand All @@ -2027,6 +2028,10 @@ page_rank <- function(
.arg_recovered <- .arg_handle$recovered[!base::is.element(.arg_handle$recovered, .arg_given)]
if (base::length(.arg_recovered) > 0L) {
.arg_names <- base::names(.arg_recovered)
.arg_conflict <- base::intersect(.arg_names, base::c(
if (!base::missing(algorithm)) "algorithm"
))
if (base::length(.arg_conflict) > 0L) cli::cli_abort(base::c("Argument {.arg {(.arg_conflict)}} of {.fn page_rank} was supplied more than once.", i = "Pass it exactly once, by its new name {.arg {(.arg_conflict)}}."))
for (.arg_i in base::seq_along(.arg_recovered)) base::do.call(base::delayedAssign, base::list(.arg_names[[.arg_i]], base::call("[[", .arg_handle$env, .arg_recovered[[.arg_i]]), base::baseenv(), base::environment()))
.arg_dots <- base::substitute(...())
.arg_tags <- base::as.character(base::names(.arg_dots))
Expand All @@ -2035,7 +2040,7 @@ page_rank <- function(
.arg_shown <- base::ifelse(base::is.na(.arg_tag_of), .arg_recovered, base::paste0(.arg_tag_of, " = "))
lifecycle::deprecate_soft(
"3.0.0",
what = base::I("Calling `page_rank()` with positional or abbreviated arguments"),
what = base::I("Calling `page_rank()` with positional, abbreviated or renamed arguments"),
details = base::c(
i = base::paste0("Detected call: page_rank(", base::paste(base::c("graph", .arg_shown), collapse = ", "), ")"),
i = base::paste0("Use instead: page_rank(", base::paste(base::c("graph", base::paste0(.arg_names, " = ")), collapse = ", "), ")")
Expand All @@ -2051,7 +2056,7 @@ page_rank <- function(

personalized_pagerank_impl(
graph = graph,
algo = algo,
algo = algorithm,
vids = vids,
directed = directed,
damping = damping,
Expand Down
2 changes: 0 additions & 2 deletions R/community.R
Original file line number Diff line number Diff line change
Expand Up @@ -3714,8 +3714,6 @@ contract <- function(
# BEGIN GENERATED ARG_HANDLE: contract, do not edit, see tools/generate-migrations.R
# fmt: skip
if (...length() > 0L) {
.arg_ambiguous <- base::intersect(base::names(base::substitute(...())), base::c("v", "ve", "ver", "vert", "verte", "vertex"))
if (base::length(.arg_ambiguous) > 0L) cli::cli_abort("Argument {.arg {(.arg_ambiguous[[1L]])}} matches multiple arguments of {.fn contract}.")
# Pre-3.0.0 signature: contract(graph, mapping, vertex.attr.comb)
.old_signature <- function(vertex.attr.comb, ...) {
if (...length() > 0L) {
Expand Down
2 changes: 0 additions & 2 deletions R/conversion.R
Original file line number Diff line number Diff line change
Expand Up @@ -824,8 +824,6 @@ as_undirected <- function(
# BEGIN GENERATED ARG_HANDLE: as_undirected, do not edit, see tools/generate-migrations.R
# fmt: skip
if (...length() > 0L) {
.arg_ambiguous <- base::intersect(base::names(base::substitute(...())), base::c("e", "ed", "edg", "edge"))
if (base::length(.arg_ambiguous) > 0L) cli::cli_abort("Argument {.arg {(.arg_ambiguous[[1L]])}} matches multiple arguments of {.fn as_undirected}.")
# Pre-3.0.0 signature: as_undirected(graph, mode, edge.attr.comb)
.old_signature <- function(edge.attr.comb, ...) {
if (...length() > 0L) {
Expand Down
Loading
Loading