Conversation
Replaces deparse with paste0(deparse(...), collapse = "") in mapping_string to ensure multi-line expressions are concatenated into a single string. This improves robustness when handling complex aes_col inputs.
Modified tests/testthat/test-ggparcoord.R to accommodate changes in ggplot2 v4.0.0 output. Ensures compatibility with updated plot rendering and output structure.
Updated the example for broomify to only run if the 'broom' package is available, preventing errors when 'broom' is not installed.
Added a condition to skip vdiffr-related tests when running in depends-only check environments, improving test reliability in CI pipelines.
Added skip_if_not_installed for required packages in test-ggcoef.R, test-ggsurv.R, and test-ggtable.R to ensure tests are skipped if dependencies are missing. This improves test robustness in environments where some packages may not be installed.
Commented out the tryCatch error handling in the ggmatrix test, allowing errors to propagate directly during test execution. This change simplifies debugging by not suppressing errors or assigning objects to the global environment.
Added .claude patterns to both .Rbuildignore and .gitignore to prevent Claude-related files and directories from being included in builds or tracked by git.
Introduces a local string standardization function to ensure snapshot names match vdiffr's expectations. Adds checks for name standardization in interactive mode and improves handling of snapshot file naming and skipping logic for specific test environments.
Added _dev/ to .gitignore and .Rbuildignore to exclude the _dev directory from version control and R build processes. Deleted barret-outline.md, which contained a presentation outline, as it is no longer needed.
Deleted SVG files for various lifecycle badges (archived, defunct, maturing, questioning, soft-deprecated) from man/figures. These images are no longer needed in the documentation.
Updated example code in R scripts and documentation to only run if the 'broom' package is available. This prevents errors for users who do not have 'broom' installed and improves robustness of examples.
Added skip_if_not_installed for 'MASS' in test-gg-plots.R and for 'broom' in test-ggnostic.R to prevent test failures when these packages are not available.
Replaced the lifecycle badge in both R and Rd documentation to use the recommended format. This improves clarity and consistency in how the experimental status is displayed.
Updated the fix_data function to use map_data instead of fortify when ggplot2 version is 4.0.0 or higher, ensuring compatibility with newer versions of ggplot2.
Changed internal Rd documentation links to explicitly reference ggstats package functions (stat_cross and ggcoef_model) for improved clarity and accuracy.
Adjusted example code and internal logic to use ggplot2::map_data for ggplot2 versions >= 4.0.0, falling back to fortify for earlier versions. Also added missing 'maps' package requirement in examples to ensure reproducibility.
Add .github/shiny-workflows/check.R: an Rscript used by the rstudio/shiny-workflows R-CMD-check GitHub Action to remove the exact line "tests/testthat/_snaps" from .Rbuildignore. This ensures snapshot files are included during R CMD check but not bundled in the package build (e.g., for CRAN submissions). The script verifies .Rbuildignore exists, removes the matching line if present, writes the file only when changed, and prints a status message. Related: r-lib/testthat#2320
Guard ggally_autopoint examples with if(require(ggforce)) to avoid running them when ggforce is not installed. Updated examples in R/gg-plots.R and man/ggally_autopoint.Rd; the function itself continues to call rlang::check_installed("ggforce").
Ensure vdiffr snapshot tests only run on macOS and make .Rbuildignore/snaps handling consistent. Changes: - .Rbuildignore: narrow ignored entries to tests/testthat/_snaps/*/*.svg instead of excluding the whole _snaps directory. - .github/shiny-workflows/check.R: add early exit for non-macOS CI runs (so check script won't modify .Rbuildignore on other OSes) and adjust the pattern/message used when removing the tests/testthat/_snaps/ entry. - R/utils.R: add system_os() and on_mac() helpers for OS detection. - tests/testthat/helper-doppelganger.R: add a skip_snapshot helper and use on_mac() to skip vdiffr tests on non-macOS (and on depends-only checks), announcing snapshot files and emitting messages to avoid empty tests. These changes keep snapshot files available for R CMD check on macOS while avoiding snapshot-related failures on other platforms and make the .Rbuildignore matching explicit.
Add a version check in tests/testthat/helper-doppelganger.R to skip vdiffr snapshot tests when running on R versions older than 4.5. If R.version.string does not match 4.5.x the test calls skip_snapshot with a message and returns early, preventing image-snapshot tests from running on unsupported R versions and avoiding spurious failures. The check is placed before existing OS-based skips.
Wrap example calls to ggally_density in R/gg-plots.R and man/ggally_density.Rd with if (require(MASS)) { ... } so the examples/documentation don't run or fail when the MASS package is not installed. No changes to ggally_density implementation — only example and Rd updates.
* Initial plan * Fix duplicate aesthetics warning in ggsurv and add NEWS entry Co-authored-by: schloerke <93231+schloerke@users.noreply.github.com> * Remove placeholder from NEWS.md entry Co-authored-by: schloerke <93231+schloerke@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: schloerke <93231+schloerke@users.noreply.github.com> Co-authored-by: Barret Schloerke <schloerke@gmail.com>
Member
Author
|
Finally |
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.
Summary
This PR addresses multiple CI failures and prepares the package for compatibility with ggplot2 v4 and R package check requirements:
mapping_string()to handle multi-line aesthetic expressionsggsurv()for upcoming ggplot2 versionfix_data()for ggplot2 >= 4.0.0 map data handlingKey Changes
Bug Fixes
mapping_string()multi-line expression handling (R/gg-plots.R)paste0(..., collapse = "")to concatenatedeparse()output before regex substitutionggsurv()duplicate aesthetics warning (#572)ltyaesthetic from confidence interval boundsfix_data()map compatibilityggplot2::map_data()instead offortify()for ggplot2 >= 4.0.0Documentation & Examples
{MASS},{broom},{network},{sna},{ggforce}inif (require(...))blocks{MASS}to Suggests in DESCRIPTION{ggstats}functions correctlyTesting Infrastructure
_R_CHECK_DEPENDS_ONLY_=truechecks.Rbuildignorefor snapshot pathsTest Plan
_R_CHECK_DEPENDS_ONLY_=true🤖 Generated with Claude Code