Skip to content

v0.6.0#34

Merged
jhollway merged 31 commits intomainfrom
develop
Feb 27, 2026
Merged

v0.6.0#34
jhollway merged 31 commits intomainfrom
develop

Conversation

@jhollway
Copy link
Copy Markdown
Contributor

@jhollway jhollway commented Feb 27, 2026

Description

Package

  • Updated logo

Graphing

Theming

  • Removed scale_*() functions as redundant with better theme support and match_color()

Layouts

  • Replaced {Rgraphviz} (Bioconductor) with igraph::layout_with_sugiyama, removing the Bioconductor dependency
  • Improved Sugiyama layout with dummy node insertion and barycenter crossing minimisation
  • Fixed Correct rotation for strict node lattice #18 for lattice layout snapping by rotating the layout to optimise edge verticality and horizontality

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 and others added 22 commits February 24, 2026 20:49
Co-authored-by: jhollway <5595229+jhollway@users.noreply.github.com>
Co-authored-by: jhollway <5595229+jhollway@users.noreply.github.com>
Co-authored-by: jhollway <5595229+jhollway@users.noreply.github.com>
Co-authored-by: jhollway <5595229+jhollway@users.noreply.github.com>
Co-authored-by: jhollway <5595229+jhollway@users.noreply.github.com>
Co-authored-by: jhollway <5595229+jhollway@users.noreply.github.com>
…mization

Co-authored-by: jhollway <5595229+jhollway@users.noreply.github.com>
Co-authored-by: jhollway <5595229+jhollway@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 27, 2026 13:22
@jhollway
Copy link
Copy Markdown
Contributor Author

@copilot , can you update the NEWS.rd file with all these changes, update the PR description, and make sure all files that have been touched in this PR have been appropriately documented?

@jhollway jhollway self-assigned this Feb 27, 2026
Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 27, 2026

@jhollway I've opened a new pull request, #35, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI mentioned this pull request Feb 27, 2026
7 tasks
Co-authored-by: jhollway <5595229+jhollway@users.noreply.github.com>
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 updates the autograph package to version 0.6.0, introducing significant architectural changes focused on removing external dependencies and improving node visualization consistency. The primary changes involve:

Changes:

  • Removed Rgraphviz dependency (Bioconductor) by implementing a custom Sugiyama layout algorithm for hierarchical graph layouts
  • Changed node visualization from using colour aesthetic to fill aesthetic, with corresponding shape changes from character names to numeric fillable shape codes
  • Added new isolates parameter to graphr() for flexible handling of isolate nodes (legend, caption, or keep options)

Reviewed changes

Copilot reviewed 16 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
DESCRIPTION Version bump to 0.6.0, removed BiocManager and Rgraphviz from dependencies, updated date to 2026-02-27
R/layout_partition.R Removed Rgraphviz calls, implemented custom .sugiyama_layout() with barycenter heuristic for edge crossing minimization
R/graphr.R Added isolates parameter with legend/caption/keep options, integrated graph_legends helper
R/graph_nodes.R Changed from colour to fill aesthetic, updated default shapes to numeric codes (21, 22, 24, etc.)
R/graph_legends.R New file centralizing legend configuration logic
R/graph_edges.R Simplified edge legend titles (removed "Edge" prefix)
R/graph_labels.R Improved coordinate extraction for better clarity
R/grapht.R Applied colour-to-fill changes, added nocov markers
R/graphs.R Removed redundant thisRequires("patchwork") check
R/zzz.R Added nocov markers for startup code
R/autograph_utilities.R Added nocov markers for utility functions
tests/testthat/test-theme_scales.R Removed entire test file
tests/testthat/test-layout_partition.R Added tests for new Sugiyama layout, removed skip_on_ci calls, updated to use fict_marvel
tests/testthat/test-graphr.R Added comprehensive tests for fill aesthetic changes and shape mapping, updated dataset references
man/plot_graphr.Rd Added documentation for isolates parameter, simplified description text
man/layout_partition.Rd Removed Rgraphviz installation instructions
Comments suppressed due to low confidence (1)

tests/testthat/test-graphr.R:72

  • Several test expectations are commented out (lines 39, 52, 67-69, 72) without explanation. Commented-out test code should either be removed if no longer relevant, or uncommented and fixed if they should still be testing important behavior. This makes it unclear whether these represent known issues or tests that are simply outdated.
  #expect_equal(test_marvel[["layers"]][[4]][["aes_params"]][["shape"]], "circle")
})

test_that("unweighted, unsigned, directed networks graph correctly", {
  skip_on_cran()
  # Unweighted, unsigned, directed network
  test_algebra <- graphr(ison_algebra)
  # Node position
  expect_equal(round(test_algebra[["data"]][["x"]][[1]]), 0)
  expect_equal(round(test_algebra[["data"]][["y"]][[1]]), 0)
  # Edge parameters
  expect_equal(test_algebra[["layers"]][[1]][["aes_params"]][["edge_alpha"]], 0.4)
  expect_equal(test_algebra[["layers"]][[1]][["aes_params"]][["edge_linetype"]], "solid")
  #expect_equal(test_algebra[["layers"]][[1]][["mapping"]][["edge_colour"]], "black")
  # Node parameters
  expect_equal(round(test_algebra[["layers"]][[2]][["aes_params"]][["size"]]), 8)
  expect_equal(test_algebra[["layers"]][[2]][["aes_params"]][["shape"]], 21)  # fillable circle
})

test_that("weighted, unsigned, directed networks graph correctly", {
  skip_on_cran()
  skip_on_ci()
  # Weighted, unsigned, directed network
  test_networkers <- graphr(ison_networkers)
  # Node position
  expect_equal(round(test_networkers[["data"]][["x"]][[1]]), 9)
  expect_equal(round(test_networkers[["data"]][["y"]][[1]]), -1)
  # Edge parameters
  #expect_equal(test_networkers[["layers"]][[2]][["aes_params"]][["edge_alpha"]], 0.4)
  #expect_equal(test_networkers[["layers"]][[2]][["aes_params"]][["edge_linetype"]], "solid")
  #expect_equal(test_networkers[["layers"]][[2]][["aes_params"]][["edge_colour"]], "black")
  # Node parameters
  expect_equal(round(test_networkers[["layers"]][[3]][["aes_params"]][["size"]]), 3)
  #expect_equal(test_networkers[["layers"]][[3]][["aes_params"]][["shape"]], "circle")

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

Comment thread R/graphr.R
node_color, node_shape, node_size, node_group,
edge_color, edge_size, snap = FALSE, ...,
edge_color, edge_size,
isolates = c("legend","caption","keep"), snap = FALSE, ...,
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

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

The new isolates parameter functionality (including "legend", "caption", and "keep" options) lacks test coverage. Tests should be added to verify that isolates are correctly handled in each mode, including cases where isolates exist and where they don't exist.

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

codecov Bot commented Feb 27, 2026

Codecov Report

❌ Patch coverage is 70.72072% with 65 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.86%. Comparing base (fc54b23) to head (8192f84).
⚠️ Report is 46 commits behind head on main.

Files with missing lines Patch % Lines
R/graph_nodes.R 46.51% 23 Missing ⚠️
R/graph_layout.R 0.00% 22 Missing ⚠️
R/layout_partition.R 84.21% 15 Missing ⚠️
R/graph_labels.R 77.77% 2 Missing ⚠️
R/graphr.R 92.59% 2 Missing ⚠️
R/graph_edges.R 66.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main      #34       +/-   ##
===========================================
+ Coverage   41.65%   56.86%   +15.20%     
===========================================
  Files          25       23        -2     
  Lines        2019     1843      -176     
===========================================
+ Hits          841     1048      +207     
+ Misses       1178      795      -383     

☔ 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 14de555 into main Feb 27, 2026
3 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

3 participants