refactor: move optional arguments of conversion functions behind the ellipsis - #2766
Merged
Conversation
krlmlr
force-pushed
the
claude/ellipsis-conversion
branch
2 times, most recently
from
July 26, 2026 11:09
f439827 to
b2fa62d
Compare
Contributor
|
This is how benchmark results would change (along with a 95% confidence interval in relative change) if b2fa62d is merged into main:
|
krlmlr
marked this pull request as ready for review
July 26, 2026 15:03
krlmlr
force-pushed
the
claude/ellipsis-conversion
branch
from
July 26, 2026 16:24
b2fa62d to
0f7d122
Compare
…ellipsis Insert `...` between the defining arguments and the optional modifiers of 11 functions, following the zoning rules in CONTRIBUTING.md. Legacy positional and abbreviated calls are recovered by the generated ARG_HANDLE blocks (registry: tools/migrations/conversion.R) and emit a single soft deprecation for igraph 3.0.0. No defaults change and no arguments are renamed. Functions: as_adj_edge_list, as_adj_list, as_directed, as_edgelist, from_adjacency, graph_from_adj_list, graph_from_adjacency_matrix, graph_from_biadjacency_matrix, graph_from_data_frame, graph_from_edgelist, graph_from_graphnel Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016M32izVHZPfxAqemAe4BrX
Same fix as #2781: the migration rewriter collapsed multi-line enum defaults and air skips c() calls, so restore the original layout. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016M32izVHZPfxAqemAe4BrX
Contributor
|
This is how benchmark results would change (along with a 95% confidence interval in relative change) if 1afcaa5 is merged into main:
|
Add argument-coverage tests for the 11 conversion-topic functions
moved to keyword-only tails:
every tail argument is passed by name with a non-default value
where the file did not already exercise it,
and each function's legacy positional call
is checked to warn and recover.
The graph_from_graphnel() tests reuse the existing
skip_if_not_installed("graph") guard,
so they are exercised on CI only.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016M32izVHZPfxAqemAe4BrX
The two internal callers passed `mode` positionally, which reaches the recovery path of the migrated signatures and would warn in the graphNEL tests on CI (lifecycle treats the package under test as a direct caller). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016M32izVHZPfxAqemAe4BrX
Contributor
|
This is how benchmark results would change (along with a 95% confidence interval in relative change) if b709507 is merged into main:
|
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 the repo-wide ellipsis migration coordinated in #2757 —
see that PR for the full rationale (CONTRIBUTING.md, Argument Order and the Ellipsis).
Based directly on
main(the registry split landed via #2779); a single topic commit.What this does
Inserts
...between the defining arguments (head) and the optionalmodifiers (tail) of 11 exported conversion functions.
Arguments after
...become keyword-only.ARG_HANDLE block and emit a single
lifecycle::deprecate_soft("3.0.0", …)—behavior is unchanged.
tools/migrations/conversion.R; blocks regenerated viaRscript tools/generate-migrations.R(idempotent, CI-checked).New signatures
from_adjacency()adjmatrixmode, weighted, diag, add.colnames, add.rownamesgraph_from_adjacency_matrix()adjmatrixmode, weighted, diag, add.colnames, add.rownamesas_adj_edge_list()graphmode, loopsas_adj_list()graphmode, loops, multipleas_directed()graphmodeas_edgelist()graphnamesgraph_from_adj_list()adjlistmode, duplicategraph_from_data_frame()d, directedverticesgraph_from_edgelist()eldirectedgraph_from_graphnel()graphNELname, weight, unlist.attrsgraph_from_biadjacency_matrix()incidencedirected, mode, multiple, weighted, add.namesNotes for review
igraph.r2cdocs(GitHub API unreachable), so
man/*.Rdfiles were updated mechanically(usage +
...argument item) instead of viadevtools::document().R CMD check's usage↔formals validation passes; a follow-up
devtools::document()run may reflow whitespace but should produce nosemantic diff.
named arguments (they are the same soft-deprecation user code will see).