Skip to content

test: cover migrated centrality, community, and centralization signatures - #2786

Merged
krlmlr merged 1 commit into
mainfrom
claude/ellipsis-tests-centrality-family
Jul 27, 2026
Merged

test: cover migrated centrality, community, and centralization signatures#2786
krlmlr merged 1 commit into
mainfrom
claude/ellipsis-tests-centrality-family

Conversation

@krlmlr

@krlmlr krlmlr commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Argument-coverage tests for the 25 functions migrated in the already-merged
#2763 (centrality), #2765 (community), and #2764 (centralization).

For every migrated function:

  • each keyword-only tail argument is exercised by name with a
    non-default value and a value-based assertion (exact scores, partition
    invariants, algebraic identities such as the resolution identity
    B(2) = 2·B(1) − A and exo linearity);
  • a legacy positional recovery test proves the old call form still works
    and emits the soft deprecation
    (lifecycle::expect_deprecated() + equality against the named call).

Tally for centrality|community|centralization: FAIL 0 · WARN 0 · PASS 2708
(one new snapshot in _snaps/community.md).

Notes:

  • modularity_matrix(): a working legacy positional recovery is impossible
    (its first old slot is the hard-deprecated membership); covered with an
    error snapshot capturing both the recovery warning and the membership
    error.
  • Stochastic cluster_* functions use igraph_local_seed() with seeded
    expect_identical() recovery comparisons.
  • centr_betw_tmax()/centr_clo_tmax() cover both the graph= and the
    graph = NULL + nodes= forms, cross-checked against
    centr_*()$theoretical_max.
  • Weighted cluster_edge_betweenness() emits an igraph C warning when
    selecting a membership; asserted explicitly so the suite stays
    warning-clean.

Part of the lifecycle/coverage exercise on top of the #2782 baseline.


Generated by Claude Code

…ures

Add argument-coverage tests for the 25 functions
whose optional arguments moved behind the ellipsis:
every keyword-only tail argument is passed by name
with a non-default value where the semantics allow,
and the legacy positional call is exercised
through its deprecation warning.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016M32izVHZPfxAqemAe4BrX
@krlmlr
krlmlr merged commit e36c84a into main Jul 27, 2026
6 checks passed
@krlmlr
krlmlr deleted the claude/ellipsis-tests-centrality-family branch July 27, 2026 17:53
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