Conversation
There was a problem hiding this comment.
Pull request overview
Updates the autograph package for the v1.2.2 release by improving how numeric node_color attributes are rendered (continuous gradients vs categorical palettes) across graphr() and grapht(), and by stabilizing arc-strength testing across BLAS implementations.
Changes:
- Treat numeric node attributes with >2 unique values as continuous and render them with a shared gradient scale (including a colourbar titled by the attribute).
- Adjust guide/legend handling so continuous fill scales keep a colourbar rather than being coerced into discrete legend keys.
- Update/extend tests to cover numeric gradients and make arc-strength tests BLAS-independent; bump version and release notes/docs.
Reviewed changes
Copilot reviewed 10 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/testthat/test-grapht.R | Adds a regression test ensuring grapht() uses a continuous fill scale for numeric node_color. |
| tests/testthat/test-graphr.R | Adds tests for continuous gradient behavior, colourbar title, shared ranges across graphs(), and BLAS-stable arc-strength behavior. |
| R/grapht.R | Detects continuous node color across waves and applies a gradient scale + colourbar for numeric mappings. |
| R/graphr.R | Documents categorical vs continuous (measure) behavior for node_color. |
| R/graph_nodes.R | Applies scale_fill_gradientn() with shared limits when node color is continuous numeric. |
| R/graph_legends.R | Preserves colourbar guides for continuous fill scales; avoids forcing discrete legend keys. |
| R/graph_aes.R | Adds .is_continuous() and routes numeric measures to continuous mapping; adds shared numeric range support. |
| NEWS.md | Adds release notes for 1.2.2. |
| man/plot_grapht.Rd | Updates rendered docs to describe categorical vs gradient node coloring. |
| man/plot_graphr.Rd | Updates rendered docs to describe categorical vs gradient node coloring. |
| DESCRIPTION | Bumps package version to 1.2.2. |
| cran-comments.md | Updates test environment list for the submission. |
Files not reviewed (2)
- man/plot_graphr.Rd: Generated file
- man/plot_grapht.Rd: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #62 +/- ##
==========================================
+ Coverage 90.42% 90.47% +0.04%
==========================================
Files 37 37
Lines 4542 4576 +34
==========================================
+ Hits 4107 4140 +33
- Misses 435 436 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Graphing
node_color=colours numeric node variablesTests