Skip to content

Resolve the last input-contract and plotting inconsistencies - #5

Merged
agallinat merged 1 commit into
mainfrom
last-inconsistencies
Oct 3, 2026
Merged

agallinat merged 1 commit into
mainfrom
last-inconsistencies

Conversation

@agallinat

Copy link
Copy Markdown
Owner
  • Fix five runtime defects and add a testthat suite
  • Prepare DESCRIPTION, LICENSE and .Rbuildignore for CRAN
  • Make all examples executable
  • Replace deprecated ggplot2 and igraph calls
  • Extract shared graph validator and collapse duplicate diffusion kernel
  • Add release infrastructure and fix documentation typos
  • Do not claim untested platforms in cran-comments.md
  • Adopt the .9000 development-version convention
  • Stop setting a future plan inside network_diffusion_with_pvalues()
  • Make the plot return slot uniform across the package
  • Fix silently wrong participation coefficients in calculate_roles()
  • Fix NaN AUC in robustness_analysis() and audit the surrounding pattern
  • Resolve the last input-contract and plotting inconsistencies

Two small items, both long-standing.

calculate_roles() and layout_horizontal_tree() were the only exports not
implementing the data.frame branch of the input preamble: they errored on
an edge list with igraph's internal "Must provide a graph object" rather
than netkit's own message. Both now route through as_netkit_graph() like
the other twelve, so the flexible-input convention holds across the whole
public API. calculate_roles() passes backfill_names = TRUE because it keys
results by vertex name. Both @PARAM blocks updated.

highlight_nodes() set frame.color to NA for every vertex whenever
"outline" was not among the requested methods, which made plot.igraph warn
"vertex attribute frame.color contains NAs. Replacing with default value
black" on every such call. Note this fired for method = "label" and
method = "fill", not for "outline" -- the opposite of what the earlier
note in CLAUDE.md claimed. plot_Net() already falls back to the fill
colour when given no frame.color, which renders an invisible frame, so the
attribute is now simply left unset (and any stale one deleted) instead of
being set to NA.

Test-suite warnings go from 5 to 1. The remaining one is "package 'future'
was built under R version 4.4.3", an artifact of the local R installation
rather than anything in netkit. Getting there also meant asserting the
warnings that are deliberate rather than leaving them as ambient noise in
the summary: assign_attributes() announcing an overwrite, and the pair
raised on the spinglass path (find_modules() falling back to the largest
connected component, and calculate_roles() reporting the resulting partial
coverage).

Tests go from 411 to 425.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@agallinat
agallinat force-pushed the last-inconsistencies branch from 6eecc80 to d8576f4 Compare October 3, 2026 16:41
@agallinat
agallinat merged commit cbb0b63 into main Oct 3, 2026
5 checks passed
agallinat added a commit that referenced this pull request Oct 5, 2026
cbb0b63 is the GitHub merge commit for PR #5. Its tree is identical to
d8576f4, which this branch already contains, so the merge changes no files --
it only reunites the two histories.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

1 participant