Skip to content

v2.3.2 - #175

Merged
jhollway merged 14 commits into
mainfrom
develop
Sep 3, 2026
Merged

v2.3.2#175
jhollway merged 14 commits into
mainfrom
develop

Conversation

@jhollway

@jhollway jhollway commented Aug 31, 2026

Copy link
Copy Markdown
Member

Package

Classes

Coercion

Manipulating

  • Added delete_nodes.stocnet() to reindex every component, including changes

Modifying

  • Added to_mode1.stocnet() and to_mode2.stocnet() to carry changes
  • Added keep = "both" to to_unsigned(), which keeps every tie but not its sign
  • Fixed to_unsigned.data.frame() erroring on a signed edgelist
    • now drops the ties of the other sign, as the other methods do
    • now reads signs held as negative weights as well as in a 'sign' column
  • Fixed to_unsigned.network() ignoring its keep argument
  • Fixed to_layer() pointing arcs at the wrong nodes (closes to_layer() corrupts arc endpoints when it drops nodes #170)

Marking

Measuring

  • Fixed mode_nodes() to count the nodes in each of three or more modes
  • Fixed net_modes.igraph() to count the levels an igraph 'lvl' attribute records

Data

  • Corrected ison_southern_women to be changing by event dates

jhollway and others added 7 commits August 30, 2026 15:21
`describe_nodes()` gave every node the first mode's name, because
`ifelse()` returns as many values as its first argument holds.
`mode_nodes()` also counted the whole network as one mode, unless the
network was two-mode, and `net_modes()` read no more than two modes from
an igraph 'lvl' attribute. Each mode now carries its own count and name.

Closes #174

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 31, 2026 12:48
@jhollway jhollway self-assigned this Aug 31, 2026
@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.38095% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.42%. Comparing base (8b9c223) to head (6c8b7e0).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
R/manip_changes.R 0.00% 4 Missing ⚠️
R/measure_properties.R 95.45% 1 Missing ⚠️
R/modif_motifs.R 50.00% 1 Missing ⚠️
R/modif_project.R 92.85% 1 Missing ⚠️
R/modif_weight.R 96.15% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #175      +/-   ##
==========================================
+ Coverage   83.06%   83.42%   +0.36%     
==========================================
  Files          42       42              
  Lines        6718     6783      +65     
==========================================
+ Hits         5580     5659      +79     
+ Misses       1138     1124      -14     

☔ View full report in Codecov by Harness.
📢 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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates manynet to 2.3.2 with a focus on correctly describing/counting nodes across networks with 3+ modes (including igraph objects using a lvl attribute), plus accompanying tests and documentation/news updates.

Changes:

  • Extend mode counting to support 3+ modes for stocnet and igraph (lvl) objects.
  • Fix describe_nodes() to correctly name/count modes beyond two.
  • Add functional tests and update docs/NEWS/versioning/contributing guidance.

Reviewed changes

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

Show a summary per file
File Description
tests/testthat/test-functional_prints.R Adds coverage for describe_nodes() / multimode counting on 3-mode stocnet and igraph (lvl) cases.
R/measure_properties.R Updates net_modes.igraph(), mode_nodes.*(), and introduces .count_modes() helper for multimode counts.
R/class_describe.R Fixes describe_nodes() mode naming/pluralisation behavior for 3+ modes.
NEWS.md Adds 2.3.2 release notes for the multimode describe/count changes.
man/measure_dims.Rd Updates documentation to describe per-mode counts for multimodal networks.
DESCRIPTION Bumps package version to 2.3.2.
.github/CONTRIBUTING.md Adds NEWS bullet naming guidance (generic vs method-specific).
Files not reviewed (1)
  • man/measure_dims.Rd: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread R/measure_properties.R
Comment thread R/class_describe.R
Comment thread NEWS.md
Comment thread DESCRIPTION
jhollway and others added 7 commits September 1, 2026 09:14
…ot its sign

- Fixed `to_unsigned.data.frame()` erroring on a signed edgelist
  - now drops the ties of the other sign, as the other methods do
  - now reads signs held as negative weights as well as in a 'sign' column
- Fixed `to_unsigned.network()` ignoring its `keep` argument

'both' excludes no tie, so it records no exclusion. None of the transformation
items names the taking of a magnitude, so it goes unrecorded until one does.

Whether an exported positive-ties guard should join it is open as #176.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`delete_nodes()` had no 'stocnet' method, so it went through igraph, where
the changes travel as a graph attribute and are not renumbered with the nodes.
It now delegates to `keep_nodes()`, which renumbers every component together.

A projection discards a whole mode, so a change about a node of that mode
describes a node the result does not have. `to_mode1()` and `to_mode2()` now
drop those and renumber the rest by rank among the nodes they keep.

Both errored on `validate_stocnet()` before, on any network with changes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…r a time

A moment is a moment however it is written. How a moment relates to the one
before it is a separate question, which `info$update` answers, so naming a
column 'time' does not by itself make a network a panel.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The date belongs to the event and not to the attendance: every tie to an event
carries the same date, and no woman carries one of her own. Each of the 14
events now enters the network on the date it is held, which the changes
component records, so `is_changing()` marks the network. An `active` node
attribute gives the starting state, as `fict_starwars` has.

The unscoped network is unchanged: 32 nodes, 89 ties, the same matrix.
`to_time()` returns the events held so far.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Three tests reached for `igraph::vcount()`, `igraph::delete_vertex_attr()`, and
the class a projection happens to return. They now use `net_nodes()`, coerce
with `as_igraph()` where the comparison is an igraph one, and assert that a
projection returns the class it was given.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@jhollway
jhollway merged commit d04e7bb into main Sep 3, 2026
9 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

2 participants