Skip to content

refactor: snake_case weights arguments in clique functions and cluster_infomap() - #2861

Open
krlmlr wants to merge 1 commit into
claude/issue-2788-subagents-faw1t1-2from
claude/issue-2788-subagents-faw1t1-3
Open

refactor: snake_case weights arguments in clique functions and cluster_infomap()#2861
krlmlr wants to merge 1 commit into
claude/issue-2788-subagents-faw1t1-2from
claude/issue-2788-subagents-faw1t1-3

Conversation

@krlmlr

@krlmlr krlmlr commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Part of #2788 (PR 3 of the stack, on top of #2860); executes the weights-spelling row of the survey plus the vertex.weights/min.weight/max.weight names called out in the issue comments.

What this does

Pure registry renames (all arguments already sit after ... with 3.0.0 entries); legacy spellings are recovered under the standard single soft-deprecation:

  • weighted_cliques(): vertex.weightsvertex_weights, min.weightmin_weight, max.weightmax_weight
  • largest_weighted_cliques(), weighted_clique_num(): vertex.weightsvertex_weights
  • cluster_infomap(): e.weightsweights and v.weightsvertex_weights — this pair was missing from the Comprehensive plan: argument renames for 3.0.0 #2788 survey table; e.weights has exactly the standard weights semantics (NULL picks up the weight edge attribute), and v.weights matches cluster_leiden()'s existing vertex_weights. The infomap.community() wrapper keeps its frozen dotted formals (now documented locally with deprecated badges) and forwards to the new names.

This aligns the whole package on exactly two vertex-weight spellings (vertex_weights) and one edge-weight spelling (weights) among non-deprecated functions.

Deliberately out of scope (survey corrections)

The issue's weights row lists two functions this PR does not touch, because renaming them to weights would be semantically wrong:

  • make_chordal_ring(w)w is the shift matrix defining the extended chordal ring, not edge weights. A rename should go to something like shifts (follow-up decision).
  • graph_from_graphnel(weight) — a logical toggle ("import graphNEL edge weights?"), not a weights vector. A rename should go to something like use_weights (follow-up decision).

Other weight-adjacent spellings left alone on semantic grounds: out.weights/in.weights in sample_chung_lu() (fitness vectors), weight.* in layout_with_dh() (objective-function coefficients). These belong to the dotted-name case sweep.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RTPj4qNv2FWui6etixZeuR


Generated by Claude Code

…er_infomap()` (#2788)

`vertex.weights` -> `vertex_weights`, `min.weight` -> `min_weight`,
`max.weight` -> `max_weight` in the weighted-clique functions,
and `e.weights` -> `weights`, `v.weights` -> `vertex_weights`
in `cluster_infomap()`,
via registry renames with soft-deprecated recovery.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RTPj4qNv2FWui6etixZeuR
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