Skip to content

v0.2.2#10

Merged
jhollway merged 6 commits intomainfrom
develop
Apr 24, 2026
Merged

v0.2.2#10
jhollway merged 6 commits intomainfrom
develop

Conversation

@jhollway
Copy link
Copy Markdown
Contributor

Description

Package

  • Updated logos

Tutorials

  • Updated centrality tutorial
  • Updated community tutorial
  • Updated position tutorial
  • Updated topology tutorial

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 24, 2026 09:51
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.95%. Comparing base (94220e5) to head (d1a2aa0).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #10   +/-   ##
=======================================
  Coverage   81.95%   81.95%           
=======================================
  Files          24       24           
  Lines        2394     2394           
=======================================
  Hits         1962     1962           
  Misses        432      432           

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

@jhollway jhollway merged commit 4541ed3 into main Apr 24, 2026
7 checks passed
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.2 release by bumping package metadata and aligning the learnr tutorials with the current netrics API naming (e.g., *_by_*, *_x_*, *_in_*).

Changes:

  • Bumped package version/date and added a v0.2.2 entry to NEWS.md.
  • Updated multiple tutorials to use netrics function names (net_by_*, node_by_*, node_x_*, etc.).
  • Updated the rendered tutorial HTML for the position tutorial to reflect the Rmd changes.

Reviewed changes

Copilot reviewed 6 out of 12 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
inst/tutorials/tutorial6/topology.Rmd Updates topology tutorial code/examples to netrics function names (including hierarchy motif and cohesion measures).
inst/tutorials/tutorial5/position.Rmd Updates position/equivalence tutorial to netrics naming (bridges/constraint, structural equivalence census).
inst/tutorials/tutorial5/position.html Re-rendered HTML output reflecting tutorial updates (learnr/rmarkdown dependency versions and content).
inst/tutorials/tutorial4/community.Rmd Updates cohesion/community tutorial to netrics naming (density, reciprocity/transitivity, modularity, components).
inst/tutorials/tutorial3/centrality.Rmd Updates centrality tutorial to netrics naming for node centralities and network centralization measures.
NEWS.md Adds release notes for v0.2.2.
DESCRIPTION Bumps version/date to 0.2.2 / 2026-04-24.
Comments suppressed due to low confidence (1)

inst/tutorials/tutorial5/position.Rmd:70

  • This sentence claims ison_algebra is included in {netrics}, but the very next hints/solution load it from {manynet} (data(..., package = "manynet") and manynet::ison_algebra). Since netrics doesn’t appear to ship this dataset, please revert the text to {manynet} (or change the code to load from {netrics} if you intend to add/re-export the dataset).
For this session, we're going to use the "ison_algebra" dataset included in the `{netrics}` package.
Do you remember how to call the data?
Can you find out some more information about it via its help file?

```{r data, exercise = TRUE, purl = FALSE}

# Let's call and load the 'ison_algebra' dataset
data("ison_algebra", package = "manynet")
# Or you can retrieve like this:
ison_algebra <- manynet::ison_algebra

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

Comment on lines 345 to 347
ison_brandes %>%
mutate_nodes(color = node_is_max(node_closeness())) %>%
mutate_nodes(color = node_is_max(node_by_closeness())) %>%
graphr(node_color = "color")

```{r dens-solution}
net_density(tasks)
net_by_density(tasks)
```{r nodecoren, exercise=TRUE, purl = FALSE, exercise.setup="gnet"}
lawfirm %>%
mutate(ncn = node_kcoreness()) %>%
mutate(ncn = node_by_kcoreness()) %>%
@@ -504,12 +504,12 @@ question("There a statistically significant association between the core assignm
An alternative route is to identify 'core' nodes
depending on their `r gloss("k-coreness","kcoreness")`.
In `{manynet}`, we can return nodes _k_-coreness
Comment on lines 341 to 343
ison_brandes %>%
mutate_nodes(color = node_is_max(node_betweenness())) %>%
mutate_nodes(color = node_is_max(node_by_betweenness())) %>%
graphr(node_color = "color")

ison_brandes %>%
mutate_nodes(color = node_is_max(node_eigenvector())) %>%
mutate_nodes(color = node_is_max(node_by_eigenvector())) %>%
Comment on lines +221 to 223
Fortunately, we can use functions from `{netrics}` to help calculate the
`r gloss("betweenness")`, `r gloss("closeness")`, and `r gloss("eigenvector")` centralities for each node in the network.
Let's collect the vectors of these centralities for the `ison_brandes` dataset:
Comment on lines +651 to +652
node_in_component(blogs)
node_in_component(to_undirected(blogs))
Comment on lines +215 to 216
`{netrics}` makes this easy enough with the `node_by_constraint()` function.

Comment on lines 337 to 339
ison_brandes %>%
mutate_nodes(color = node_is_max(node_degree())) %>%
mutate_nodes(color = node_is_max(node_by_degree())) %>%
graphr(node_color = "color")
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