Repository navigation
refactor: Rename edge-selector arguments to edges - #2943
Merged
schochastics merged 30 commits intoDec 3, 2026
Merged
schochastics merged 30 commits into
schochastics merged 30 commits into
Conversation
`eids`, `es` and `e` unify on `edges` in `count_multiple()`, `reverse_edges()`, `subgraph_from_edges()`, `which_loop()`, `which_multiple()`, `which_mutual()`, `ends()`, `head_of()`, `tail_of()` and `edge_betweenness()`, mirroring `vertices`. Named legacy calls are recovered with a soft-deprecation. Part of #2788. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The frozen wrapper forwards `eids = `, which now also soft-deprecates. Part of #2788. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Oct 15, 2026
This was referenced Oct 15, 2026
Merged
Contributor
|
This is how benchmark results would change (along with a 95% confidence interval in relative change) if 332c66b is merged into claude/issue-2788-subagents-faw1t1-6:
|
…-2788-subagents-faw1t1-7 # Conflicts: # tests/testthat/test-centrality.R
…-2788-subagents-faw1t1-7
…-2788-subagents-faw1t1-7
Contributor
|
This is how benchmark results would change (along with a 95% confidence interval in relative change) if 64f018c is merged into claude/issue-2788-subagents-faw1t1-6:
Further explanation regarding interpretation and methodology can be found in the documentation. Last updated for commit 64f018c. |
The @return text still named the `e` argument, renamed to `edges` here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-2788-subagents-faw1t1-7 # Conflicts: # tests/testthat/test-interface.R # tests/testthat/test-structural-properties.R
…-2788-subagents-faw1t1-7
…-2788-subagents-faw1t1-7
…-2788-subagents-faw1t1-7 # Conflicts: # R/centrality.R # R/interface.R # R/structural-properties.R
…-2788-subagents-faw1t1-7
…-2788-subagents-faw1t1-7
…-2788-subagents-faw1t1-7
…-2788-subagents-faw1t1-7 # Conflicts: # tests/testthat/_snaps/structural-properties.md
…-2788-subagents-faw1t1-7
…-2788-subagents-faw1t1-7 # Conflicts: # tests/testthat/_snaps/structural-properties.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-2788-subagents-faw1t1-7
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>
…-2788-subagents-faw1t1-7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-2788-subagents-faw1t1-7
This was referenced Dec 3, 2026
schochastics
added a commit
to schochastics/rigraph
that referenced
this pull request
Dec 4, 2026
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Co-authored-by: krlmlr <krlmlr@users.noreply.github.com> Co-authored-by: schochastics <schochastics@users.noreply.github.com> (cherry picked from commit 0bfe350)
schochastics
added a commit
to schochastics/rigraph
that referenced
this pull request
Dec 4, 2026
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Co-authored-by: krlmlr <krlmlr@users.noreply.github.com> Co-authored-by: schochastics <schochastics@users.noreply.github.com> (cherry picked from commit 0bfe350)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #2788 (PR 7 of the stack, on top of #2864). It implements the edge mirror of the selector decision:
vertices/edgesfor subsets andvertex/edgefor a single element (krlmlr's last comment in #2788: "vertex/edge and vertices/edges, the alternative v/e and vv/ee is weird").What this does
Renames the edge-subset selector to
edgesin 10 functions:eids→edges:count_multiple(),reverse_edges(),subgraph_from_edges(),which_loop(),which_multiple(),which_mutual()es→edges:ends(),head_of(),tail_of()e→edges:edge_betweenness()All of these are head arguments, or belong to functions without
..., so positional calls keep working without a warning, and the old name stays as a trailingdeprecated()formal.edge_betweenness(),ends(),subgraph_from_edges()andwhich_mutual()have registry entries, so the generated block handles the rename (see #2859).count_multiple(),head_of(),tail_of(),reverse_edges(),which_loop()andwhich_multiple()have none and use a hand-written bridge. Either way, a call that uses the old name gets one soft-deprecation, and an error if both spellings are supplied.edgesis also the constructor input ofmake_graph()and friends, but no function has both meanings, so there is no clash.Internal callers (
E()viaends()) and the tests use the new names. There are new tests for the legacy spellings, andtests/testthat/test-basic.Ris new becausehead_of()/tail_of()had no tests.The deprecated wrappers (
is.mutual(),is.multiple(),is.loop(),count.multiple()) are untouched. They keep forwardingeids =, which is recovered silently, because the soft deprecation only fires for user calls.Not in this PR
edge.indexin the edge-attribute accessors comes in the next PR.The #2788 stack
Each PR is based on the previous one and merges in this order:
algotoalgorithminpage_rank(),feedback_arc_set()andfeedback_vertex_set()#2859:algo→algorithmnodestonin generators andcentr_*_tmax()#2860:nodes→n(vertex counts)cluster_infomap()#2861: weights argumentsnormalized#2862: normalization flags →normalizedverticesandvertex#2864: selectors →vertices/vertexedges#2943: edge selectors →edges← this PRindextovertices/edgesin the attribute accessors #2944: attribute accessors:index→vertices/edgesn_iter/max_iter#2945: iterations →n_iter/max_iterMu→mu)algorithmand measure selection tomeasure#2951: algorithm family →algorithm/measure(closes Algorithm-selection argument names: census ofmethod/algorithm/algo/impl/implementation#2932)🤖 Generated with Claude Code