Skip to content

v1.2.1 - #61

Merged
jhollway merged 1 commit into
mainfrom
develop
Aug 26, 2026
Merged

v1.2.1#61
jhollway merged 1 commit into
mainfrom
develop

Conversation

@jhollway

Copy link
Copy Markdown
Member

Layouts

  • Fixed "valence" layout returning a poor layout for some random starts
    • The nodes now start on a circle, so one run resembles the next
    • The repulsion force between two close nodes is now bounded
    • Each step is now capped and cools over the iterations

Tests

  • Fixed the tutorial test failing on a deprecation warning that the tutorial code does not raise itself
  • Fixed the "valence" layout test depending on the random seed

Copilot AI lite review requested due to automatic review settings August 26, 2026 15:58
@jhollway
jhollway merged commit 24eb49b into main Aug 26, 2026
1 check passed

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

This PR prepares the autograph v1.2.1 release by improving the stability of the "valence" layout algorithm and making the test suite more robust across environments (notably around randomness and upstream deprecation warnings).

Changes:

  • Update layout_valence() to start nodes on a circle, bound short-distance repulsion, and cap/cool per-iteration movement.
  • Stabilize tests by setting a seed for the valence layout test and refining tutorial warning handling to ignore upstream deprecation warnings.
  • Bump package version and document/resubmission notes for CRAN.

Reviewed changes

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

Show a summary per file
File Description
R/layout_valence.R Changes layout initialization/forces/step update for more stable valence layouts.
tests/testthat/test-layout_valence.R Sets a seed to prevent random failures in valence layout test.
tests/testthat/helper-tutorials.R Adjusts tutorial evaluation to only fail on deprecation warnings raised by tutorial code itself.
NEWS.md Adds v1.2.1 changelog entry describing layout/test fixes.
DESCRIPTION Bumps package version to 1.2.1.
cran-comments.md Adds CRAN resubmission notes describing the fixes and test matrix.

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

Comment thread R/layout_valence.R
Comment on lines +48 to +50
angle <- 2 * pi * seq_len(n) / n
coords <- cbind(cos(angle), sin(angle)) +
matrix(stats::runif(n * 2, min = -0.01, max = 0.01), ncol = 2)
Comment on lines +97 to +109
code <- paste(deparse(exprs[[i]]), collapse = " ")
# The name a deprecation warning reports, in either the base R form
# ("'to_ties' is deprecated") or the {lifecycle} form
# ("`to_ties()` was deprecated in manynet 2.3.0").
hits <- regmatches(msg, gregexpr(
"[`'\"][^`'\"]+[`'\"][^[:alpha:]]*(is|was|has been)[[:space:]]+(deprecated|defunct|moved)",
msg))[[1]]
named <- gsub("^[`'\"]([^`'\"]+)[`'\"].*$", "\\1", hits)
named <- gsub("\\(\\)$", "", named)
if (length(named) > 0 &&
!any(vapply(named, grepl, logical(1), x = code, fixed = TRUE))) {
w <- NULL
}
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