Skip to content

v0.2.1#9

Merged
jhollway merged 5 commits intomainfrom
develop
Apr 12, 2026
Merged

v0.2.1#9
jhollway merged 5 commits intomainfrom
develop

Conversation

@jhollway
Copy link
Copy Markdown
Contributor

@jhollway jhollway commented Apr 4, 2026

Description

Package

  • Added network analysis tutorials from {manynet}

Members

  • Added more explanation for node_in_partition()

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 4, 2026 07:50
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 v0.2.1 release by expanding packaged learnr tutorials and refreshing documentation content/links, with a small re-organization of community-membership documentation.

Changes:

  • Added new learnr tutorials for centrality, community/cohesion, position/equivalence, and topology/resilience under inst/tutorials/.
  • Updated many .Rd docs to point to newer manynet documentation topics for coercion and direction-modification references.
  • Adjusted/expanded community-detection documentation sections (e.g., Partition/Infomap text, moving the (commented) Ensemble block).

Reviewed changes

Copilot reviewed 67 out of 71 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
R/member_community.R Moves/extends community-membership documentation sections (incl. commented ensemble block).
man/motif_periods.Rd Updates manynet::as_tidygraph() link target topic.
man/motif_path.Rd Updates manynet::as_tidygraph() link target topic.
man/motif_node.Rd Updates manynet::as_tidygraph() link target topic.
man/motif_net.Rd Updates manynet::as_tidygraph() link target topic.
man/motif_hierarchy.Rd Updates manynet::as_tidygraph() link target topic.
man/motif_hazard.Rd Updates manynet::as_tidygraph() link target topic.
man/motif_exposure.Rd Updates manynet::as_tidygraph() link target topic.
man/motif_brokerage_node.Rd Updates manynet::as_tidygraph() link target topic.
man/motif_brokerage_net.Rd Updates manynet::as_tidygraph() link target topic.
man/method_kselect.Rd Updates manynet::as_tidygraph() link target topic.
man/method_cluster.Rd Updates manynet::as_tidygraph() link target topic.
man/member_equivalence.Rd Updates manynet::as_tidygraph() link target topic.
man/member_diffusion.Rd Updates manynet::as_tidygraph() link target topic.
man/member_core.Rd Updates manynet::as_tidygraph() link target topic.
man/member_components.Rd Updates manynet::as_tidygraph() link target topic.
man/member_community.Rd Updates manynet::as_tidygraph() link target topic.
man/member_community_non.Rd Adds/adjusts Partition section text + updates link targets/wrapping.
man/member_community_hier.Rd Updates manynet::as_tidygraph() link target topic.
man/member_cliques.Rd Updates manynet::as_tidygraph() link target topic.
man/member_brokerage.Rd Updates manynet::as_tidygraph() link target topic.
man/measure_periods.Rd Updates manynet::as_tidygraph() link target topic.
man/measure_hierarchy.Rd Updates manynet::as_tidygraph() link target topic.
man/measure_fragmentation.Rd Updates manynet::as_tidygraph() link target topic.
man/measure_features.Rd Updates manynet::as_tidygraph() link target topic.
man/measure_diverse_node.Rd Updates manynet::as_tidygraph() link target topic.
man/measure_diverse_net.Rd Updates manynet::as_tidygraph() link target topic.
man/measure_diffusion_node.Rd Updates manynet::as_tidygraph() link target topic.
man/measure_core.Rd Updates manynet::as_tidygraph() link target topic.
man/measure_cohesion.Rd Updates manynet::as_tidygraph() link target topic.
man/measure_closure.Rd Updates manynet::as_tidygraph() link target topic.
man/measure_closure_node.Rd Updates manynet::as_tidygraph() link target topic.
man/measure_centralities_eigen.Rd Updates manynet::as_tidygraph() + direction-modification link target topic.
man/measure_centralities_degree.Rd Updates manynet::as_tidygraph() + direction-modification link target topic.
man/measure_centralities_close.Rd Updates manynet::as_tidygraph() + direction-modification link target topic.
man/measure_centralities_between.Rd Updates manynet::as_tidygraph() + direction-modification link target topic.
man/measure_centralisation_eigen.Rd Updates manynet::as_tidygraph() + direction-modification link target topic.
man/measure_centralisation_degree.Rd Updates manynet::as_tidygraph() + direction-modification link target topic.
man/measure_centralisation_close.Rd Updates manynet::as_tidygraph() + direction-modification link target topic.
man/measure_centralisation_between.Rd Updates manynet::as_tidygraph() + direction-modification link target topic.
man/measure_central_eigen.Rd Updates manynet::as_tidygraph() + direction-modification link target topic.
man/measure_central_degree.Rd Updates manynet::as_tidygraph() + direction-modification link target topic.
man/measure_central_close.Rd Updates manynet::as_tidygraph() + direction-modification link target topic.
man/measure_central_between.Rd Updates manynet::as_tidygraph() + direction-modification link target topic.
man/measure_brokerage.Rd Updates manynet::as_tidygraph() link target topic.
man/measure_broker_tie.Rd Updates manynet::as_tidygraph() link target topic.
man/measure_broker_node.Rd Updates manynet::as_tidygraph() link target topic.
man/measure_breadth.Rd Updates manynet::as_tidygraph() link target topic.
man/measure_assort_node.Rd Updates manynet::as_tidygraph() link target topic.
man/measure_assort_net.Rd Updates manynet::as_tidygraph() link target topic.
man/mark_triangles.Rd Updates manynet::as_tidygraph() link target topic.
man/mark_ties.Rd Updates manynet::as_tidygraph() link target topic.
man/mark_select_tie.Rd Updates manynet::as_tidygraph() link target topic.
man/mark_select_node.Rd Updates manynet::as_tidygraph() link target topic.
man/mark_nodes.Rd Updates manynet::as_tidygraph() link target topic.
man/mark_dyads.Rd Updates manynet::as_tidygraph() link target topic.
man/mark_diff.Rd Updates manynet::as_tidygraph() link target topic.
man/mark_degree.Rd Updates manynet::as_tidygraph() link target topic.
man/mark_core.Rd Updates manynet::as_tidygraph() link target topic.
inst/tutorials/tutorial6/topology.Rmd Adds Topology/Resilience learnr tutorial content.
inst/tutorials/tutorial5/position.Rmd Adds Position/Equivalence learnr tutorial content.
inst/tutorials/tutorial5/position_data/data_chunks_index.txt Adds learnr prerender index (currently points to missing artifact).
inst/tutorials/tutorial4/community.Rmd Adds Cohesion/Community learnr tutorial content.
inst/tutorials/tutorial3/centrality.Rmd Adds Centrality learnr tutorial content.

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

Comment thread R/member_community.R
# if(missing(.data)) {expect_nodes(); .data <- .G()}
# clust <- igraph::cluster_walktrap(manynet::as_igraph(.data))
# out <- clust$membership
# make_node_member(out, .data)
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

The commented-out node_in_ensemble block contains a redundant make_node_member(out, .data) call that discards its return value and is immediately repeated with assignment. This looks like leftover/debug code; consider removing the unused call (or the entire commented-out block) to avoid confusion about intended behavior.

Suggested change
# make_node_member(out, .data)

Copilot uses AI. Check for mistakes.
@@ -0,0 +1 @@
data.RData
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

data_chunks_index.txt lists data.RData, but that file is not present in inst/tutorials/tutorial5/position_data/. This will break learnr::tutorial prerender/runtime expectations; either add the missing data.RData artifact (if intended) or remove/regenerate the *_data folder and index.

Suggested change
data.RData

Copilot uses AI. Check for mistakes.
Comment on lines +44 to +48
praise = c("C'est génial!",
"Beau travail!",
"Bravo!",
"Super!"),
encouragement = c("Bon effort"))
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

learnr::random_phrases_add(language = "en", ...) currently registers French phrases (e.g., "C'est génial!") under the English language key. This will cause English UI feedback to be in French; either change these phrases to English or set language = "fr"/adjust language keys as intended.

Suggested change
praise = c("C'est génial!",
"Beau travail!",
"Bravo!",
"Super!"),
encouragement = c("Bon effort"))
praise = c("That's great!",
"Great job!",
"Bravo!",
"Awesome!"),
encouragement = c("Good effort"))

Copilot uses AI. Check for mistakes.
Comment on lines +51 to +67
## Overview

<img src="https://64.media.tumblr.com/tumblr_lvpgquhGbq1r54h4xo1_400.gif"/>

In this tutorial, we'll explore:

- how to create or generate different network topologies
- the core-periphery structure of a network
- features of a network related to its resilience

This tutorial covers a range of different network topologies:
trees, lattices, random, small-world, scale-free, and core-periphery
networks.
These ideal networks exaggerate centrality, clustering, and randomness features,
and are thus great for theory-building and investigating the relationship between rules and structure.

<img src="https://media.tenor.com/images/e26e64a8cce94a6ee491f0ddeecc8b88/tenor.gif"/>
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

The images in this tutorial are embedded without alt text. For accessibility (screen readers) and to meet common documentation standards, add a short descriptive alt attribute (or mark as decorative with empty alt) for these images.

Copilot uses AI. Check for mistakes.
Comment on lines +43 to +47
praise = c("C'est génial!",
"Beau travail!",
"Bravo!",
"Super!"),
encouragement = c("Bon effort"))
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

learnr::random_phrases_add(language = "en", ...) currently registers French phrases (e.g., "C'est génial!") under the English language key. This will cause English UI feedback to be in French; either change these phrases to English or set language = "fr"/adjust language keys as intended.

Suggested change
praise = c("C'est génial!",
"Beau travail!",
"Bravo!",
"Super!"),
encouragement = c("Bon effort"))
praise = c("That's great!",
"Great job!",
"Bravo!",
"Awesome!"),
encouragement = c("Good effort"))

Copilot uses AI. Check for mistakes.
Comment on lines +43 to +47
praise = c("C'est génial!",
"Beau travail!",
"Bravo!",
"Super!"),
encouragement = c("Bon effort"))
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

learnr::random_phrases_add(language = "en", ...) currently registers French phrases (e.g., "C'est génial!") under the English language key. This will cause English UI feedback to be in French; either change these phrases to English or set language = "fr"/adjust language keys as intended.

Suggested change
praise = c("C'est génial!",
"Beau travail!",
"Bravo!",
"Super!"),
encouragement = c("Bon effort"))
praise = c("That's great!",
"Great job!",
"Bravo!",
"Awesome!"),
encouragement = c("Good effort!"))

Copilot uses AI. Check for mistakes.
Comment on lines +43 to +47
praise = c("C'est génial!",
"Beau travail!",
"Bravo!",
"Super!"),
encouragement = c("Bon effort"))
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

learnr::random_phrases_add(language = "en", ...) currently registers French phrases (e.g., "C'est génial!") under the English language key. This will cause English UI feedback to be in French; either change these phrases to English or set language = "fr"/adjust language keys as intended.

Suggested change
praise = c("C'est génial!",
"Beau travail!",
"Bravo!",
"Super!"),
encouragement = c("Bon effort"))
praise = c("That's great!",
"Good job!",
"Well done!",
"Awesome!"),
encouragement = c("Good effort"))

Copilot uses AI. Check for mistakes.
degree, betweenness, closeness, eigenvector, and other types of centrality,
explore their distributions and calculate the corresponding centralisation.

<img src="https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExbG5oYmVtYmcxMWs1d3MzOGh3Zng5dTZhc241ZHR2NTE0YThiZWp4NiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/970Sr8vpwEbXG/giphy.gif" height="480px"/>
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

Several <img> tags in this tutorial omit alt text (e.g., the first hero image here). This reduces accessibility for screen-reader users; please add descriptive alt attributes (or empty alt for purely decorative images) consistently throughout the tutorial.

Suggested change
<img src="https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExbG5oYmVtYmcxMWs1d3MzOGh3Zng5dTZhc241ZHR2NTE0YThiZWp4NiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/970Sr8vpwEbXG/giphy.gif" height="480px"/>
<img src="https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExbG5oYmVtYmcxMWs1d3MzOGh3Zng5dTZhc241ZHR2NTE0YThiZWp4NiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/970Sr8vpwEbXG/giphy.gif" height="480px" alt=""/>

Copilot uses AI. Check for mistakes.
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 12, 2026

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main       #9      +/-   ##
==========================================
+ Coverage   81.07%   81.95%   +0.87%     
==========================================
  Files          24       24              
  Lines        2394     2394              
==========================================
+ Hits         1941     1962      +21     
+ Misses        453      432      -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.

@jhollway jhollway merged commit 38886aa into main Apr 12, 2026
4 of 8 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.

2 participants