Conversation
Contributor
There was a problem hiding this comment.
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 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 | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Layouts
Tests