Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #178 +/- ##
==========================================
+ Coverage 83.43% 83.98% +0.55%
==========================================
Files 42 42
Lines 6796 6918 +122
==========================================
+ Hits 5670 5810 +140
+ Misses 1126 1108 -18 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟡 Changes recommended
generate_islands()’s p inference for two-mode inputs still subtracts a one-mode-style bridge-tie count, which can significantly mis-estimate p for islands >= 4.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR prepares the manynet 2.3.4 release by extending stochastic generators to support two-mode networks, introducing a to_positive() helper for signed networks, and tightening signed-network detection for edgelists.
Changes:
- Added two-mode implementations for
generate_fire(),generate_islands(), andgenerate_citations(), with updated documentation and tests. - Added
to_positive()as an exported guard that keeps only positive ties for signed networks, plus tests and documentation. - Fixed
is_signed.data.frame()to detect signedness via asigncolumn or negativeweightvalues (instead of relying on column position).
File summaries
| File | Description |
|---|---|
| tests/testthat/test-manip_format.R | Adds tests for to_positive(), to_unsigned() exclusion recording, and is_signed.data.frame() behavior. |
| tests/testthat/test-make_generate.R | Adds tests asserting two-mode support and expected properties for generate_fire/islands/citations(). |
| tests/testthat/test-functional_to.R | Adds to_positive to functional invariants. |
| R/modif_weight.R | Implements to_positive() and adjusts where exclusion info is recorded for to_unsigned(). |
| R/mark_format.R | Updates is_signed.data.frame() to use sign/weight columns explicitly. |
| R/make_generate.R | Implements two-mode helpers and enables two-mode paths for the last three generate_*() functions. |
| NEWS.md | Adds 2.3.4 release notes aligned with the PR description. |
| NAMESPACE | Exports to_positive. |
| man/modif_weight.Rd | Documents to_positive and updates the modif_weight manual page. |
| man/make_stochastic.Rd | Documents new two-mode semantics and examples for the stochastic generators. |
| DESCRIPTION | Bumps package version to 2.3.4. |
Review details
Files not reviewed (2)
- man/make_stochastic.Rd: Generated file
- man/modif_weight.Rd: Generated file
- Files reviewed: 9/11 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…ges, and missings
Making
generate_islands()errorschoose(islands, 2)and not asislandspfrom a two-mode network with a one-mode dyad countgenerate_*()functions (closes Add generate_fire(c(2,2)) and generate_citations(c(2,2))? #150)generate_fire()burns along two-paths, closing four-cycles instead of trianglesgenerate_islands()builds a bipartite blockmodel with a planted diagonalgenerate_citations()keeps its recency mechanism, but the target crosses the mode divide,and both modes grow so that the concentration turns over
Manipulating
bind_changes.igraph()replacing the changelog instead of appendingbind_globals()filter_globals()arrange_globals()delete_globals()mutate_globals()to alter table columnsto_time()to scope globals as it already scoped ties, changes, and missingsModifying
to_positive()to shortcut keeping just the positive ties of a signed network (closes Shouldmanynetexport a positive-ties guard for downstream packages? #176)Marking
is_signed()to check for a 'sign' column or a negative 'weight' column