Skip to content

refactor: move optional arguments of walks-cycles functions behind the ellipsis - #2775

Merged
krlmlr merged 2 commits into
mainfrom
claude/ellipsis-walks-cycles
Jul 27, 2026
Merged

refactor: move optional arguments of walks-cycles functions behind the ellipsis#2775
krlmlr merged 2 commits into
mainfrom
claude/ellipsis-walks-cycles

Conversation

@krlmlr

@krlmlr krlmlr commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

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 optional
modifiers
(tail) of 3 exported walks-cycles functions.
Arguments after ... become keyword-only.

  • Legacy positional or abbreviated calls are recovered by the generated
    ARG_HANDLE block and emit a single lifecycle::deprecate_soft("3.0.0", …)
    behavior is unchanged.
  • No defaults change, no arguments are renamed, deprecated functions untouched.
  • Registry: tools/migrations/walks-cycles.R; blocks regenerated via
    Rscript tools/generate-migrations.R (idempotent, CI-checked).
  • Rd usage/arguments updated mechanically (see note below).

New signatures

function head (positional) keyword-only tail
find_cycle() graph mode
random_edge_walk() graph, start, steps weights, mode, stuck
random_walk() graph, start, steps weights, mode, stuck

Notes for review

  • The environment used to prepare this PR cannot install igraph.r2cdocs
    (GitHub API unreachable), so man/*.Rd files were updated mechanically
    (usage + ... argument item) instead of via devtools::document().
    R CMD check's usage↔formals validation passes; a follow-up
    devtools::document() run may reflow whitespace but should produce no
    semantic diff.
  • Package tests that called these functions positionally were updated to
    named arguments (they are the same soft-deprecation user code will see).

@krlmlr
krlmlr force-pushed the claude/ellipsis-walks-cycles branch from bcf5938 to 124f169 Compare July 26, 2026 10:52
@krlmlr
krlmlr marked this pull request as ready for review July 26, 2026 15:03
@krlmlr krlmlr closed this Jul 26, 2026
@krlmlr
krlmlr force-pushed the claude/ellipsis-walks-cycles branch from 124f169 to 0f7d122 Compare July 26, 2026 16:24
…e ellipsis

Insert `...` between the defining arguments and the optional
modifiers of 3 functions,
following the zoning rules in CONTRIBUTING.md.
Legacy positional and abbreviated calls are recovered
by the generated ARG_HANDLE blocks
(registry: tools/migrations/walks-cycles.R)
and emit a single soft deprecation for igraph 3.0.0.
No defaults change and no arguments are renamed.

Functions: find_cycle, random_edge_walk, random_walk

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016M32izVHZPfxAqemAe4BrX
@krlmlr krlmlr reopened this Jul 26, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016M32izVHZPfxAqemAe4BrX
@krlmlr
krlmlr merged commit e07eb2e into main Jul 27, 2026
8 checks passed
@krlmlr
krlmlr deleted the claude/ellipsis-walks-cycles branch July 27, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants