refactor: snake_case weights arguments in clique functions and cluster_infomap() - #2861
Open
krlmlr wants to merge 1 commit into
Open
Conversation
…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
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 #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.weightnames 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.weights→vertex_weights,min.weight→min_weight,max.weight→max_weightlargest_weighted_cliques(),weighted_clique_num():vertex.weights→vertex_weightscluster_infomap():e.weights→weightsandv.weights→vertex_weights— this pair was missing from the Comprehensive plan: argument renames for 3.0.0 #2788 survey table;e.weightshas exactly the standardweightssemantics (NULLpicks up theweightedge attribute), andv.weightsmatchescluster_leiden()'s existingvertex_weights. Theinfomap.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
weightswould be semantically wrong:make_chordal_ring(w)—wis the shift matrix defining the extended chordal ring, not edge weights. A rename should go to something likeshifts(follow-up decision).graph_from_graphnel(weight)— a logical toggle ("import graphNEL edge weights?"), not a weights vector. A rename should go to something likeuse_weights(follow-up decision).Other weight-adjacent spellings left alone on semantic grounds:
out.weights/in.weightsinsample_chung_lu()(fitness vectors),weight.*inlayout_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