test: cover migrated centrality, community, and centralization signatures - #2786
Merged
Conversation
…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
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.
Argument-coverage tests for the 25 functions migrated in the already-merged
#2763 (centrality), #2765 (community), and #2764 (centralization).
For every migrated function:
non-default value and a value-based assertion (exact scores, partition
invariants, algebraic identities such as the resolution identity
B(2) = 2·B(1) − Aandexolinearity);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 anerror snapshot capturing both the recovery warning and the membership
error.
cluster_*functions useigraph_local_seed()with seededexpect_identical()recovery comparisons.centr_betw_tmax()/centr_clo_tmax()cover both thegraph=and thegraph = NULL+nodes=forms, cross-checked againstcentr_*()$theoretical_max.cluster_edge_betweenness()emits an igraph C warning whenselecting 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