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
5253256
refactor: Rename `nodes` to `n` in generators and `centr_*_tmax()` (#…
claude Aug 17, 2026
3a153fb
Merge branch 'claude/issue-2788-subagents-faw1t1' into claude/issue-2…
schochastics Oct 15, 2026
d9a30da
Merge branch 'claude/issue-2788-subagents-faw1t1' into claude/issue-2…
schochastics Dec 2, 2026
aa18f71
Merge branch 'claude/issue-2788-subagents-faw1t1' into claude/issue-2…
schochastics Dec 2, 2026
6ba2bd1
Merge branch 'claude/issue-2788-subagents-faw1t1' into claude/issue-2…
schochastics Dec 2, 2026
0cde4bd
test: Cover the remaining `nodes = ` renames
schochastics Dec 2, 2026
1e6ebe4
Merge branch 'claude/issue-2788-subagents-faw1t1' into claude/issue-2…
schochastics Dec 3, 2026
dac5432
Merge branch 'claude/issue-2788-subagents-faw1t1' into claude/issue-2…
schochastics Dec 3, 2026
9f67415
test: Compare the traits generators by graph now that they return one
schochastics Dec 3, 2026
de1a09d
Merge branch 'claude/issue-2788-subagents-faw1t1' into claude/issue-2…
schochastics Dec 3, 2026
c388791
refactor: Let the generator own the `nodes` renames
schochastics Dec 3, 2026
623b4c0
Merge branch 'claude/issue-2788-subagents-faw1t1' into claude/issue-2…
schochastics Dec 3, 2026
86d8789
chore: Regenerate the migration blocks
schochastics Dec 3, 2026
85bb290
Merge branch 'claude/issue-2788-subagents-faw1t1' into claude/issue-2…
schochastics Dec 3, 2026
18c7730
Merge remote-tracking branch 'origin/claude/issue-2788-subagents-faw1…
schochastics Dec 3, 2026
a87ece2
Merge remote-tracking branch 'origin/claude/issue-2788-subagents-faw1…
schochastics Dec 3, 2026
577ccd4
Merge remote-tracking branch 'origin/claude/issue-2788-subagents-faw1…
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
316 changes: 285 additions & 31 deletions R/centralization.R

Large diffs are not rendered by default.

29 changes: 17 additions & 12 deletions R/foreign.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ read.graph <- function(
#' `graph.graphdb()` was renamed to [graph_from_graphdb()] to create a more
#' consistent API.
#' @inheritParams graph_from_graphdb
#' @param nodes `r lifecycle::badge("deprecated")` Use `n` in
#' [graph_from_graphdb()] instead.
#' @keywords internal
#' @export
graph.graphdb <- function(
Expand All @@ -86,7 +88,7 @@ graph.graphdb <- function(
url = url,
prefix = prefix,
type = type,
nodes = nodes,
n = nodes,
pair = pair,
which = which,
base = base,
Expand Down Expand Up @@ -785,7 +787,7 @@ write.graph.dot <- function(graph, file) {
#' [read_graph()] with the proper arguments to read the file.
#'
#' If `url` is `NULL`, and this is the default, then the filename is
#' assembled from the `base`, `prefix`, `type`, `nodes`,
#' assembled from the `base`, `prefix`, `type`, `n`,
#' `pair` and `which` arguments.
#'
#' Unfortunately the original graph database homepage is now defunct, but see
Expand All @@ -804,7 +806,7 @@ write.graph.dot <- function(graph, file) {
#' `m3Dr4`, `m3Dr6`, `m4D`, `m4Dr2`, `m4Dr4`,
#' `m4Dr6`, `b03`, `b03m`, `b06`, `b06m`, `b09`,
#' `b09m`.
#' @param nodes The number of vertices in the graph.
#' @param n The number of vertices in the graph.
#' @param pair Specifies which graph of the pair to read. Possible values:
#' `A` and `B`.
#' @param which Gives the number of the graph to read. For every graph type
Expand All @@ -829,7 +831,7 @@ graph_from_graphdb <- function(
...,
prefix = "iso",
type = "r001",
nodes = NULL,
n = NULL,
pair = "A",
which = 0,
base = "https://github.com/igraph/graphsdb/raw/refs/heads/main",
Expand All @@ -852,7 +854,7 @@ graph_from_graphdb <- function(
base::list(env = base::environment(), recovered = base::c(
if (!base::missing(prefix)) base::c(prefix = "prefix"),
if (!base::missing(type)) base::c(type = "type"),
if (!base::missing(nodes)) base::c(nodes = "nodes"),
if (!base::missing(nodes)) base::c(n = "nodes"),
if (!base::missing(pair)) base::c(pair = "pair"),
if (!base::missing(which)) base::c(which = "which"),
if (!base::missing(base)) base::c(base = "base"),
Expand All @@ -863,7 +865,6 @@ graph_from_graphdb <- function(
.arg_given <- base::c(
if (!base::missing(prefix)) "prefix",
if (!base::missing(type)) "type",
if (!base::missing(nodes)) "nodes",
if (!base::missing(pair)) "pair",
if (!base::missing(which)) "which",
if (!base::missing(base)) "base",
Expand All @@ -874,6 +875,10 @@ graph_from_graphdb <- 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(n)) "n"
))
if (base::length(.arg_conflict) > 0L) cli::cli_abort(base::c("Argument {.arg {(.arg_conflict)}} of {.fn graph_from_graphdb} 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 @@ -882,7 +887,7 @@ graph_from_graphdb <- 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 `graph_from_graphdb()` with positional or abbreviated arguments"),
what = base::I("Calling `graph_from_graphdb()` with positional, abbreviated or renamed arguments"),
details = base::c(
i = base::paste0("Detected call: graph_from_graphdb(", base::paste(base::c("url", .arg_shown), collapse = ", "), ")"),
i = base::paste0("Use instead: graph_from_graphdb(", base::paste(base::c("url", base::paste0(.arg_names, " = ")), collapse = ", "), ")")
Expand All @@ -892,8 +897,8 @@ graph_from_graphdb <- function(
}
# END GENERATED ARG_HANDLE

if (is.null(nodes) && is.null(url)) {
cli::cli_abort("Either {.arg nodes}' or `{.arg url}' must be non-null.")
if (is.null(n) && is.null(url)) {
cli::cli_abort("Either {.arg n}' or `{.arg url}' must be non-null.")
}

if (is.null(url)) {
Expand Down Expand Up @@ -922,9 +927,9 @@ graph_from_graphdb <- function(
"b09",
"b09m"
)
sizecode <- if (nodes <= 100) {
sizecode <- if (n <= 100) {
"s"
} else if (nodes < 2000) {
} else if (n < 2000) {
"m"
} else {
"l"
Expand Down Expand Up @@ -963,7 +968,7 @@ graph_from_graphdb <- function(
type,
"_",
sizecode,
nodes,
n,
".",
pair,
formatC(which, width = 2, flag = "0"),
Expand Down
Loading
Loading