refactor: move optional arguments of games functions behind the ellipsis - #2760
Merged
Conversation
krlmlr
force-pushed
the
claude/ellipsis-games
branch
2 times, most recently
from
July 26, 2026 11:09
8513c90 to
6b344a7
Compare
Contributor
|
This is how benchmark results would change (along with a 95% confidence interval in relative change) if 6b344a7 is merged into main:
|
krlmlr
marked this pull request as ready for review
July 26, 2026 15:03
krlmlr
force-pushed
the
claude/ellipsis-games
branch
2 times, most recently
from
July 26, 2026 15:20
a97ad56 to
782b681
Compare
Contributor
|
This is how benchmark results would change (along with a 95% confidence interval in relative change) if 782b681 is merged into main:
|
Insert `...` between the defining arguments and the optional modifiers of 36 functions, following the zoning rules in CONTRIBUTING.md. Legacy positional and abbreviated calls are recovered by the generated ARG_HANDLE blocks (registry: tools/migrations/games.R) and emit a single soft deprecation for igraph 3.0.0. No defaults change and no arguments are renamed. Functions: asym_pref, cit_cit_types, cit_types, dot_product, gnm, gnp, grg, last_cit, pa, pa_age, pref, sample_asym_pref, sample_cit_cit_types, sample_cit_types, sample_correlated_gnp, sample_degseq, sample_dot_product, sample_fitness, sample_fitness_pl, sample_forestfire, sample_gnm, sample_gnp, sample_grg, sample_k_regular, sample_last_cit, sample_pa, sample_pa_age, sample_pref, sample_sbm, sample_smallworld, sample_traits, sample_traits_callaway, sbm, smallworld, traits, traits_callaway Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016M32izVHZPfxAqemAe4BrX
krlmlr
force-pushed
the
claude/ellipsis-games
branch
from
July 26, 2026 16:23
782b681 to
45c0e12
Compare
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
Add argument-coverage tests for the 36 migrated games functions: every keyword-only tail argument is passed by name with a real assertion, and every function's legacy positional call path is checked to warn and recover. Spec twins (`pa()`, `gnp()`, ...) are covered by compact `sample_()` equivalence tests. Known limitations exercised and documented in the tests: `sample_pa_age()`'s `out.seq`/`out.dist` cannot produce a graph (pre-existing, also broken on main), and `sample_last_cit()`'s recovery passes `pref` alongside `agebins` because the shim forces interdependent defaults before recovery. 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 5f6cd9e is merged into main:
|
1 task
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 36 exported games functions.
Arguments after
...become keyword-only.ARG_HANDLE block and emit a single
lifecycle::deprecate_soft("3.0.0", …)—behavior is unchanged.
tools/migrations/games.R; blocks regenerated viaRscript tools/generate-migrations.R(idempotent, CI-checked).New signatures
asym_pref()nodes, typestype.dist.matrix, pref.matrix, loopscit_cit_types()n, edges, typespref, directed, attrcit_types()n, edges, typespref, directed, attrdot_product()vecsdirectedgnm()n, mdirected, loopsgnp()n, pdirected, loopsgrg()nodes, radiustorus, coordslast_cit()n, edgesagebins, pref, directedpa()n, power, mout.dist, out.seq, out.pref, zero.appeal, directed, algorithm, start.graphpa_age()n, pa.exp, aging.exp, maging.bin, out.dist, out.seq, out.pref, directed, zero.deg.appeal, zero.age.appeal, deg.coef, age.coef, time.windowpref()nodes, typestype.dist, fixed.sizes, pref.matrix, directed, loopssample_asym_pref()nodes, typestype.dist.matrix, pref.matrix, loopssample_cit_cit_types()n, edges, typespref, directed, attrsample_cit_types()n, edges, typespref, directed, attrsample_correlated_gnp()old.graph, corrp, permutationsample_degseq()out.deg, in.degmethodsample_dot_product()vecsdirectedsample_fitness()no.of.edges, fitness.out, fitness.inloops, multiplesample_fitness_pl()no.of.nodes, no.of.edges, exponent.out, exponent.inloops, multiple, finite.size.correctionsample_forestfire()nodes, fw.probbw.factor, ambs, directedsample_gnm()n, mdirected, loopssample_gnp()n, pdirected, loopssample_grg()nodes, radiustorus, coordssample_k_regular()no.of.nodes, kdirected, multiplesample_last_cit()n, edgesagebins, pref, directedsample_pa()n, power, mout.dist, out.seq, out.pref, zero.appeal, directed, algorithm, start.graphsample_pa_age()n, pa.exp, aging.exp, maging.bin, out.dist, out.seq, out.pref, directed, zero.deg.appeal, zero.age.appeal, deg.coef, age.coef, time.windowsample_pref()nodes, typestype.dist, fixed.sizes, pref.matrix, directed, loopssample_sbm()n, pref.matrix, block.sizesdirected, loopssample_smallworld()dim, size, nei, ploops, multiplesample_traits()nodes, types, ktype.dist, pref.matrix, directedsample_traits_callaway()nodes, typesedge.per.step, type.dist, pref.matrix, directedsbm()n, pref.matrix, block.sizesdirected, loopssmallworld()dim, size, nei, ploops, multipletraits()nodes, types, ktype.dist, pref.matrix, directedtraits_callaway()nodes, typesedge.per.step, type.dist, pref.matrix, directedNotes 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).