Skip to content

v0.2.0#5

Merged
jhollway merged 35 commits intomainfrom
develop
Mar 22, 2026
Merged

v0.2.0#5
jhollway merged 35 commits intomainfrom
develop

Conversation

@jhollway
Copy link
Copy Markdown
Contributor

@jhollway jhollway commented Mar 21, 2026

Description

Package

  • Added roxygen2 parameter templates (param_attr, param_data,
    param_dir, param_memb, param_motf, param_norm, param_select) and
    net/node/tie-level templates (net_measure, net_motif, node_mark,
    node_measure, node_member, node_motif, tie_mark, tie_measure) for
    consistent function documentation.
  • Fixed startup messages.

Measuring

  • Renamed node_adoption_time() to node_by_adopt_time()
  • Renamednode_thresholds() to node_by_adopt_threshold()
  • Separated centralisation scripts into different files per measure type
    (betweenness, closeness, degree, eigenvector) for easier maintenance,
    and into different documentation per level (node, tie) for better organization.
  • Updated and separated brokerage, diversity/assortativity, cohesion, closure,
    cliques, components, features, and hierarchy documentation by level.

Members

  • Separated node_in_community() documentation from the hierarchical
    and non-hierarchical community-detection algorithms.
  • Core documentation split into separate mark, measure, and member pages.

Motifs

  • Renamed net_by_change() to net_x_change() and related functions to reflect their motif (subgraph-counting) nature.
  • Renamed

Methods

  • Added gap method for cluster k-selection in method_k().
  • Renamed model_k() to method_k() and related cluster-selection utilities
    renamed for clarity.

Checklist:

  • Documentation
    • DESCRIPTION file version is bumped by the appropriate increment (major, minor, patch)
    • Date in DESCRIPTION is correct
    • Longer functions are commented inline or broken down into helper functions to help debugging
  • PR form
    • Title indicates expected version number
    • PR description above and the NEWS.md file are aligned
    • Description above itemizes changes under subsection titles, e.g. "## Data"
    • Closed, fixed, or related issues are referenced and explained in the description above, e.g. "Fixed #0 by adding A"

jhollway added 26 commits March 19, 2026 16:51
…e clearer about inheritance and avoid base function conflicts
…ime() and node_by_adopt_threshold() respectively
Copilot AI review requested due to automatic review settings March 21, 2026 17:32
@jhollway jhollway self-assigned this Mar 21, 2026
@jhollway
Copy link
Copy Markdown
Contributor Author

@copilot can you please fill in NEWS.md outlining the changes in this PR?

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 21, 2026

@jhollway I've opened a new pull request, #6, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI mentioned this pull request Mar 21, 2026
7 tasks
Co-authored-by: jhollway <5595229+jhollway@users.noreply.github.com>
Agent-Logs-Url: https://github.com/stocnet/netrics/sessions/884854c5-d15b-40c2-9e84-62c1fbba2040
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR prepares the netrics v0.2.0 release by reorganizing documentation (roxygen templates + generated Rd), refining function grouping/naming (notably change metrics moving from net_by_* measures to net_x_* motifs), and updating pkgdown reference structure and tests accordingly.

Changes:

  • Bumps package version/date to 0.2.0 (2026-03-21) and updates CRAN submission notes.
  • Refactors/documentation reorganization: adds man-roxygen/ templates, splits/renames doc topics (e.g., brokerage motifs into node vs network topics), and updates pkgdown reference indexing.
  • Adjusts tests and README function listings to match renamed/recategorized APIs (e.g., diffusion “adopt” naming, change motifs).

Reviewed changes

Copilot reviewed 115 out of 115 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
DESCRIPTION Version/date bumped for v0.2.0 release.
R/measure_change.R Moves change-related APIs to net_x_* motif-style outputs and updates roxygen grouping.
R/measure_features.R Updates net_by_scalefree() messaging/KS handling (contains a critical issue).
R/member_core.R Splits docs into mark/measure/member sections and renames node_is_core() arg to centrality.
R/motif_brokerage.R Splits brokerage motifs docs into node vs network topics; expands templates usage.
man-roxygen/* Introduces reusable roxygen templates for params/returns (some templates/docs currently inconsistent).
pkgdown/_pkgdown.yml Reorganizes reference index entries to match new topic structure.
tests/testthat/* Updates test routing for renamed/regrouped functions (motif vs measure).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread R/measure_features.R Outdated
Comment thread R/measure_features.R Outdated
Comment thread man-roxygen/node_mark.R Outdated
Comment thread man-roxygen/node_motif.R
Comment thread man-roxygen/net_motif.R
Comment thread man-roxygen/param_memb.R Outdated
Comment thread man/motif_periods.Rd
Comment thread R/netrics-defunct.R Outdated
Comment thread R/member_core.R
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 21, 2026

Codecov Report

❌ Patch coverage is 79.93311% with 120 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.07%. Comparing base (38226b8) to head (aa15887).
⚠️ Report is 37 commits behind head on main.

Files with missing lines Patch % Lines
R/method_k.R 14.70% 29 Missing ⚠️
R/measure_centrality_degree.R 76.13% 21 Missing ⚠️
R/measure_heterogeneity.R 67.18% 21 Missing ⚠️
R/measure_centrality_closeness.R 89.86% 15 Missing ⚠️
R/measure_closure.R 54.54% 10 Missing ⚠️
R/measure_centrality_between.R 91.11% 8 Missing ⚠️
R/measure_centrality_eigen.R 89.74% 8 Missing ⚠️
R/measure_features.R 60.00% 2 Missing ⚠️
R/motif_brokerage.R 83.33% 2 Missing ⚠️
R/mark_nodes.R 94.44% 1 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main       #5      +/-   ##
==========================================
- Coverage   81.94%   81.07%   -0.88%     
==========================================
  Files          21       24       +3     
  Lines        2360     2394      +34     
==========================================
+ Hits         1934     1941       +7     
- Misses        426      453      +27     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 21, 2026

@jhollway I've opened a new pull request, #7, to work on those changes. Once the pull request is ready, I'll request review from you.

@jhollway jhollway merged commit 96dfc13 into main Mar 22, 2026
3 of 5 checks passed
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.

3 participants