Skip to content

v2.0.2#134

Open
jhollway wants to merge 13 commits intomainfrom
develop
Open

v2.0.2#134
jhollway wants to merge 13 commits intomainfrom
develop

Conversation

@jhollway
Copy link
Copy Markdown
Collaborator

Description

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"

Copilot AI review requested due to automatic review settings April 21, 2026 07:37
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 appears to prepare the manynet R package for the v2.0.2 release by updating package metadata and refining stocnet documentation/creation behavior, while extending a few net_* measure methods to additional network classes.

Changes:

  • Bump package version/date to 2.0.2 in DESCRIPTION.
  • Update make_stocnet() docs/examples and refactor construction/indexing logic for ties/changes.
  • Add/adjust S3 methods for network measures (net_nodes, net_node_attributes, net_tie_attributes) and tweak tutorial chunk purl behavior.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
man/make_stocnet.Rd Updates parameter docs and adds make_stocnet() examples.
inst/tutorials/tutorial1/data.Rmd Sets some tutorial chunks to purl=FALSE and updates example dataset names/filenames.
R/measure_properties.R Renames/introduces S3 methods for net_nodes() and adds network methods for attribute accessors.
R/class_validate.R Renames internal validation helper functions for clarity (reserved_cols, required_cols, expect_class).
R/class_stocnet.R Refactors make_stocnet() to coerce components and index ties/changes, plus updates roxygen docs/examples.
NAMESPACE Registers new/changed S3 methods (notably net_nodes,tbl_igraph and network attribute methods).
DESCRIPTION Bumps Version to 2.0.2 and updates Date.

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

Comment thread NAMESPACE Outdated
S3method(net_nodes,network)
S3method(net_nodes,stocnet)
S3method(net_nodes,tbl)
S3method(net_nodes,tbl_igraph)
Comment thread R/class_stocnet.R Outdated
Comment on lines +148 to +150
nodes = dplyr::tibble(nodes),
ties = dplyr::tibble(ties),
changes = dplyr::tibble(changes)
Comment thread R/class_stocnet.R Outdated
Comment on lines +161 to +171
.data$ties <- .data$ties |>
dplyr::mutate(from = as.numeric(match(from, nodes$label)),
to = as.numeric(match(to, nodes$label)))
}
.data
}

index_changes <- function(.data){
if(is.character(.data$changes$node) && is.character(.data$nodes$label)){
.data$changes <- .data$changes |>
dplyr::mutate(node = as.numeric(match(node, nodes$label)))
Comment thread R/class_stocnet.R Outdated
Comment on lines +161 to +171
.data$ties <- .data$ties |>
dplyr::mutate(from = as.numeric(match(from, nodes$label)),
to = as.numeric(match(to, nodes$label)))
}
.data
}

index_changes <- function(.data){
if(is.character(.data$changes$node) && is.character(.data$nodes$label)){
.data$changes <- .data$changes |>
dplyr::mutate(node = as.numeric(match(node, nodes$label)))
Comment thread R/measure_properties.R
Comment on lines 51 to 59
@@ -58,6 +58,11 @@ net_nodes.tbl <- function(.data){
call = deparse(sys.call()))
}
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

Codecov Report

❌ Patch coverage is 76.47059% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.44%. Comparing base (a73c8e7) to head (9f8f78a).
⚠️ Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
R/measure_properties.R 14.28% 12 Missing ⚠️
R/class_stocnet.R 75.00% 5 Missing ⚠️
R/mark_format.R 71.42% 2 Missing ⚠️
R/mark_classes.R 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #134      +/-   ##
==========================================
- Coverage   50.45%   50.44%   -0.01%     
==========================================
  Files          34       34              
  Lines        3435     3477      +42     
==========================================
+ Hits         1733     1754      +21     
- Misses       1702     1723      +21     

☔ 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.

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