Skip to content

refactor: Rename vertex-selector arguments to vertices and vertex - #2864

Merged
schochastics merged 34 commits into
claude/issue-2788-subagents-faw1t1-5from
claude/issue-2788-subagents-faw1t1-6
Dec 3, 2026
Merged

schochastics merged 34 commits into
claude/issue-2788-subagents-faw1t1-5from
claude/issue-2788-subagents-faw1t1-6

Conversation

@krlmlr

@krlmlr krlmlr commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Part of #2788 (PR 6 of the stack, on top of #2863); executes the selector decision from the #2788 thread (krlmlr: "vertex/edge and vertices/edges, the alternative v/e and vv/ee is weird"): vertices for a subset, vertex for a single vertex, and n for a count (#2860).

What this does

Renames the vertex-subset selector to vertices in 24 functions (+3 aliases that follow automatically):

  • Head selectors, head renames in the registry (positional calls unchanged and silent; the old name stays as a trailing deprecated() formal, and the generated block soft-deprecates a call that names it, see refactor: Rename algo to algorithm in page_rank(), feedback_arc_set() and feedback_vertex_set() #2859): betweenness, closeness, strength, harmonic_centrality, power_centrality, alpha_centrality (was v/vids/nodes); degree, distances (to untouched), constraint, ego, ego_size, make_ego_graph, induced_subgraph, knn; adjacent_vertices, incident_edges; local_efficiency, similarity.
  • Tail selectors, pure registry rename: diversity, page_rank, transitivity.
  • Functions without registry entries (trailing deprecated() formal with a hand-written bridge, no ... inserted): cocitation, bibcoupling, delete_vertices, isomorphism_class, count_triangles, max_degree.

Single-vertex arguments become vertex: neighbors(v), incident(v) and subcomponent(v) are head renames in the registry, as above. sample_spanning_tree(vid) is a pure registry rename, and cluster_spinglass(vertex) already had the right name. (An earlier version of this PR kept v per the older #692 scheme; krlmlr's later comment in #2788 is the decision.)

Abbreviation guards regenerate accordingly: v/vi/vid on the vids functions and v–verte on head cases become explicit ambiguity/spell-out errors where they could mean either spelling; a bare v = on former-vids functions now silently partial-matches vertices (same meaning it always had).

The branch was brought up to date by replaying this PR's commit onto the updated #2863 (recorded as a merge, no force-push). Full test suite at the time of the original PR: 9357 passing; the only failures are the two environment-bound ones (network for graph_from_graphdb, callr needing an installed igraph).

Deliberately left for follow-up

The #2788 stack

Each PR is based on the previous one and merges in this order:

  1. refactor: Rename algo to algorithm in page_rank(), feedback_arc_set() and feedback_vertex_set() #2859: algo → algorithm
  2. refactor: Rename nodes to n in generators and centr_*_tmax() #2860: nodes → n (vertex counts)
  3. refactor: snake_case weights arguments in clique functions and cluster_infomap() #2861: weights arguments
  4. refactor: Rename normalization flags to normalized #2862: normalization flags → normalized
  5. refactor: Purge legacy alias formals via the migration registry #2863: hand-rolled alias formals into the registry
  6. refactor: Rename vertex-selector arguments to vertices and vertex #2864: selectors → vertices/vertex ← this PR
  7. refactor: Rename edge-selector arguments to edges #2943: edge selectors → edges
  8. refactor: Rename index to vertices/edges in the attribute accessors #2944: attribute accessors: index → vertices/edges
  9. refactor: Rename iteration arguments to n_iter/max_iter #2945: iterations → n_iter/max_iter
  10. refactor: snake_case the dotted arguments of the graph generators and degree-sequence functions #2946: snake_case: generators and degree sequences
  11. refactor: snake_case the dotted arguments of the layout functions #2947: snake_case: layouts
  12. refactor: snake_case the dotted arguments of the community, HRG, motif and graphlet functions #2948: snake_case: community, HRG, motifs, graphlets (Mu → mu)
  13. refactor: snake_case the dotted arguments of the structural and conversion functions #2950: snake_case: structural and conversion functions
  14. refactor: Rename algorithm-selection arguments to algorithm and measure selection to measure #2951: algorithm family → algorithm/measure (closes Algorithm-selection argument names: census of method/algorithm/algo/impl/implementation #2932)

🤖 Generated with Claude Code

https://claude.ai/code/session_01RTPj4qNv2FWui6etixZeuR


Generated by Claude Code

@github-actions

Copy link
Copy Markdown
Contributor

This is how benchmark results would change (along with a 95% confidence interval in relative change) if 7954b20 is merged into claude/issue-2788-subagents-faw1t1-5:

  • ✔️as_adjacency_matrix: 775ms -> 778ms [-1.1%, +2.03%]
  • ✔️as_biadjacency_matrix: 780ms -> 773ms [-2.39%, +0.75%]
  • ✔️as_data_frame_both: 1.63ms -> 1.63ms [-1.48%, +2.41%]
  • ✔️as_long_data_frame: 4ms -> 4.01ms [-0.44%, +0.97%]
  • ✔️es_attr_filter: 2.74ms -> 2.76ms [-2%, +3.32%]
  • ✔️graph_from_adjacency_matrix: 128ms -> 127ms [-2.09%, +0.89%]
  • ✔️graph_from_data_frame: 3.68ms -> 3.68ms [-0.72%, +0.9%]
  • ✔️vs_attr_filter: 1.61ms -> 1.52ms [-13.35%, +2.55%]
  • ✔️vs_by_name: 1.03ms -> 1.04ms [-1%, +1.95%]
    Further explanation regarding interpretation and methodology can be found in the documentation.

…c_set()` and `feedback_vertex_set()` (#2788, #526)

The legacy `algo` spelling is recovered by the generated ARG_HANDLE blocks
and soft-deprecated;
abbreviations of both spellings are guarded as ambiguous.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RTPj4qNv2FWui6etixZeuR
…2788, #692)

Vertex-count arguments unify on `n`:
11 game generators and their spec twins,
the four `centr_*_tmax()` functions
(`centr_degree_tmax()` and `centr_eigen_tmax()` newly gain
their keyword-only migration on the way),
and `graph_from_graphdb()`.
Head positions keep working positionally;
named `nodes =` callers are soft-deprecated
via surviving sentinel formals or registry recovery.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RTPj4qNv2FWui6etixZeuR
…er_infomap()` (#2788)

`vertex.weights` -> `vertex_weights`, `min.weight` -> `min_weight`,
`max.weight` -> `max_weight` in the weighted-clique functions,
and `e.weights` -> `weights`, `v.weights` -> `vertex_weights`
in `cluster_infomap()`,
via registry renames with soft-deprecated recovery.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RTPj4qNv2FWui6etixZeuR
`power_centrality(rescale = )`, `hits_scores(scale = )`
and `tk_coords(norm = )` unify on `normalized`,
matching the nine functions that already use that name.
Legacy spellings are soft-deprecated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RTPj4qNv2FWui6etixZeuR
`layout_with_fr(maxiter = )` folds into the registry
as a rename to `niter`
(the alias was silent before, now it soft-deprecates),
`layout_with_kk(start = )` gains its missing soft-deprecation,
`cluster_leiden()` joins the registry
with `resolution_parameter` recovered as `resolution`,
and the long-dead `neimode`/`father` formals and result aliases
of `bfs()`/`dfs()` are removed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RTPj4qNv2FWui6etixZeuR
The subset selectors `v`, `vids` and `nodes` unify on `vertices`
across 24 functions,
implementing the #692 scheme:
`vertices` selects a subset,
`n` counts (previous PR),
and single-vertex arguments keep `v`
(`neighbors()`, `incident()`, `subcomponent()`).
Head selectors keep positional calls working
and recover named legacy spellings
via surviving sentinel formals;
tail selectors ride the registry recovery.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RTPj4qNv2FWui6etixZeuR
@krlmlr
krlmlr force-pushed the claude/issue-2788-subagents-faw1t1-6 branch from 7954b20 to c597e14 Compare September 3, 2026 09:57
schochastics and others added 2 commits October 15, 2026 21:12
…-2788-subagents-faw1t1-6

Resolved by replaying c597e14 onto the updated base branch and
regenerating the migration blocks.

Part of #2788.
`neighbors()`, `incident()` and `subcomponent()` rename `v` to `vertex`,
and `sample_spanning_tree()` renames `vid` to `vertex`,
following the #2788 decision (`vertex`/`vertices`, not `v`).
Named legacy calls are recovered with a soft-deprecation.

Part of #2788.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

This is how benchmark results would change (along with a 95% confidence interval in relative change) if 2ae1a8c is merged into claude/issue-2788-subagents-faw1t1-5:

  • ✔️E_named: 149ms -> 147ms [-5.4%, +2.28%]
  • ✔️V_named: 264ms -> 264ms [-2.82%, +2.6%]
  • ✔️all_simple_paths_named: 98.1ms -> 99.6ms [-1.74%, +4.76%]
  • ✔️as_adjacency_matrix: 129ms -> 132ms [-0.44%, +5.25%]
  • ✔️as_biadjacency_matrix: 142ms -> 141ms [-2.41%, +1.71%]
  • ✔️as_data_frame_both: 147ms -> 147ms [-3.21%, +3.26%]
  • ✔️as_long_data_frame: 120ms -> 127ms [-2.12%, +13.82%]
  • ❗🐌ego_order2_named: 114ms -> 120ms [+4.37%, +7.19%]
  • ✔️es_attr_assign: 139ms -> 141ms [-4.15%, +6.6%]
  • ✔️es_attr_filter: 139ms -> 140ms [-3.42%, +4.98%]
  • ✔️graph_from_adjacency_matrix: 163ms -> 164ms [-1.38%, +3.19%]
  • ✔️graph_from_data_frame: 166ms -> 161ms [-7.54%, +1.21%]
  • ✔️head_of_named: 107ms -> 108ms [-1.24%, +2.51%]
  • ✔️incident_edges: 129ms -> 129ms [-1.83%, +1.92%]
  • ✔️max_cliques_named: 18.2ms -> 19.5ms [-6.15%, +19.78%]
  • ❗🐌neighbors_by_name: 158ms -> 161ms [+0.16%, +3.31%]
  • ✔️union_named: 155ms -> 160ms [-1.15%, +8.15%]
  • ✔️vs_attr_filter: 173ms -> 171ms [-3.37%, +1.73%]
  • ✔️vs_by_name: 149ms -> 150ms [-2.48%, +3.16%]
    Further explanation regarding interpretation and methodology can be found in the documentation.

…-2788-subagents-faw1t1-6

# Conflicts:
#	R/centrality.R
#	R/structural-properties.R
#	R/trees.R
#	tests/testthat/_snaps/structural-properties.md
#	tests/testthat/test-centrality.R
@schochastics schochastics reopened this Dec 3, 2026
…-2788-subagents-faw1t1-6

# Conflicts:
#	tests/testthat/_snaps/structural-properties.md
@schochastics schochastics reopened this Dec 3, 2026
schochastics and others added 6 commits December 3, 2026 11:20
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The generator re-matches a call that uses an old head name against the old
signature, so the hand-written bridges for registered functions are gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schochastics schochastics reopened this Dec 3, 2026
@schochastics schochastics reopened this Dec 3, 2026
@schochastics schochastics reopened this Dec 3, 2026
@schochastics
schochastics merged commit f9e5cee into main Dec 3, 2026
12 checks passed
@schochastics
schochastics deleted the claude/issue-2788-subagents-faw1t1-6 branch December 3, 2026 20:01
schochastics pushed a commit to schochastics/rigraph that referenced this pull request Dec 4, 2026
…igraph#2864)

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: David Schoch <david@schochastics.net>
Co-authored-by: schochastics <schochastics@users.noreply.github.com>
(cherry picked from commit f9e5cee)

R-side fix: snapshot the deprecation through expect_snapshot_igraph(), so the flavor's package name is normalized.
schochastics pushed a commit to schochastics/rigraph that referenced this pull request Dec 4, 2026
…igraph#2864)

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: David Schoch <david@schochastics.net>
Co-authored-by: schochastics <schochastics@users.noreply.github.com>
(cherry picked from commit f9e5cee)

R-side fix: snapshot the deprecation through expect_snapshot_igraph(), so the flavor's package name is normalized.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Algorithm-selection argument names: census of method/algorithm/algo/impl/implementation

3 participants