refactor: Rename nodes to n in generators and centr_*_tmax() - #2860
Open
krlmlr wants to merge 1 commit into
Open
refactor: Rename nodes to n in generators and centr_*_tmax()#2860krlmlr wants to merge 1 commit into
nodes to n in generators and centr_*_tmax()#2860krlmlr wants to merge 1 commit into
Conversation
…2788, #692) Vertex-count arguments unify on `n`: 11 game generators and their spec twins, the four `centr_*_tmax()` functions (`centr_degree_tmax()` and `centr_eigen_tmax()` newly gain their keyword-only migration on the way), and `graph_from_graphdb()`. Head positions keep working positionally; named `nodes =` callers are soft-deprecated via surviving sentinel formals or registry recovery. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RTPj4qNv2FWui6etixZeuR
Contributor
|
This is how benchmark results would change (along with a 95% confidence interval in relative change) if b391ca2 is merged into claude/issue-2788-subagents-faw1t1:
|
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 2 of the stack, on top of #2859); executes the
nodes→nrow of the survey — the direction #692 recorded as essentially uncontested (62 functions already usen).What this does
Renames the vertex-count argument
nodestonin 16 functions:sample_grg/grg,sample_pref/pref,sample_asym_pref/asym_pref,sample_traits/traits,sample_traits_callaway/traits_callaway,sample_forestfire.centr_betw_tmax,centr_clo_tmax,centr_degree_tmax,centr_eigen_tmax. The latter two had no registry entry and no...yet, so they gain their standard 3.0.0 keyword-only migration here (loopsstays required-with-no-default in the tail,unfold_tree()style; the existingloops/scalelifecycle guards are preserved).graph_from_graphdb(1):nodessits after..., so this is a pure registry rename (bare-symbolnodes = ninold) — legacynodes =calls are recovered by the generated block under the usual single soft-deprecation.nodesis a head formal everywhere else, which the recovery machinery cannot rescue from...— so those functions follow theas_adjacency_matrix()attr/weightsprecedent: positional calls bindnunchanged (no warning), and a surviving trailingnodes = deprecated()sentinel catches by-name legacy calls with a soft-deprecation and a conflict error when both spellings are supplied. Dot-case wrapper functions (grg.game()etc.) keep their frozen signatures and forwardn = nodes.Selector-
nodesfunctions (ego()family,constraint(),alpha_centrality(),power_centrality()) are deliberately untouched — they rename toverticesin a later PR of this stack.Notes for review
node =,nod =) of the retired head name now fail loudly with the "spell out the full argument name" guidance instead of partial-matching — same trade-off theattr→weightsrename shipped.tests/testthat/_snaps/foreign.mdwas updated by hand for the renamed error text becausegraph_from_graphdb()needs network access unavailable in the development sandbox; the offline-renderable messages were verified to match exactly.🤖 Generated with Claude Code
https://claude.ai/code/session_01RTPj4qNv2FWui6etixZeuR
Generated by Claude Code