Repository navigation
Require ggplot2 >= 3.5.2 and test it in CI - #121
willgearty wants to merge 4 commits into
Conversation
ggh4x, which deeptime imports, already requires ggplot2 >= 3.5.2, so deeptime could not be used with ggplot2 3.5.0 or 3.5.1 anyway. Make the requirement explicit in DESCRIPTION. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01A7zDoJJQSEuNmyB6xR3njB
The ">= 3.5.2" matrix entry installed the latest ggplot2, so ggplot2 3.5.x was never tested. Rename it to "release" and add a job pinned to ggplot2 3.5.2 on ubuntu-latest with R release. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01A7zDoJJQSEuNmyB6xR3njB
|
The new
I reproduced the rest of the check locally with ggplot2 3.5.2, without vignettes and with ggtree/ggpattern unavailable. Getting this job green would also need:
That's more than a version bump, so I'm checking with the maintainer before widening this PR. Generated by Claude Code |
Current versions of ggtree and ggpattern, used in the vignettes, require ggplot2 >= 4.0.0, so the vignettes cannot be built with ggplot2 3.5.2. Build and check without vignettes in that job, and only fail on errors, since docs inherited from newer ggplot2 versions give Rd xref warnings. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01A7zDoJJQSEuNmyB6xR3njB
|
Update after 2868b97: the ggplot2 3.5.2 job now gets past the vignettes and docs (the Rd cross-reference WARNING is reported but no longer fails the job), and only the tests fail. That's expected, since test fixes are being left to separate PRs. CI shows 10 failures, and on CI a missing snapshot counts as a failure:
The pattern snapshots pass on CI, so their earlier local failures were specific to my environment. The Generated by Claude Code |
Skip the two guide tests that use ggtree when it is not available, and add/update the pre-4.0 coord_geo stacked scale snapshots. The updated snapshot only gains empty clip-path groups; its text and shapes are unchanged, and the new ones match their ggplot4 counterparts. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01A7zDoJJQSEuNmyB6xR3njB
Bumps the minimum ggplot2 version in
DESCRIPTIONfrom 3.5.0 to 3.5.2, and adds a CI job that actually tests it.deeptime imports ggh4x, and ggh4x 0.3.1 already has
Depends: ggplot2 (>= 3.5.2). It also callsggplot2::is_theme_element(), which doesn't exist before 3.5.2, so deeptime couldn't actually be used with ggplot2 3.5.0 or 3.5.1. This makes that requirement explicit.DESCRIPTION:ggplot2 (>= 3.5.0)→ggplot2 (>= 3.5.2)NEWS.md: notes the new requirement, in the same style as the previous ggplot2 bump in 2.0.0R-CMD-check.yaml:">= 3.5.2"matrix entry torelease, which is what it installed in practice (the latest ggplot2, 4.0.3 in recent runs), so ggplot2 3.5.x was never tested.3.5.2onubuntu-latestwith R release, viainclude:. It installs that exact version withremotes::install_version(), so the pre-4.0 test snapshots now run in CI.release,setup-r-dependenciesalready installs the current ggplot2.--no-build-vignettes/--ignore-vignettes) and only fails on errors. Current versions of two suggested packages used in the vignettes require ggplot2 4.x: ggtree (Bioconductor 3.22) needs >= 4.0.0 and ggpattern needs >= 4.0.2. Skipping vignettes only produces a NOTE. Docs inherited from ggplot2 4.x also link toannotation_borders(), which 3.5.2 doesn't have, giving a Rd cross-reference WARNING. All other jobs keep the previous build options and still fail on warnings.test-guides.R: addsskip_if_not_installed("ggtree")to the two tests that used ggtree without it ("guide_geo works with coord_geo_radial" and the second "ggtree scale works with only fossil taxa"). With ggplot2 3.5.2, ggtree can't load, so these errored instead of skipping.coord_geopre-4.0 snapshots (_snaps/coord_geo/): updates "stacked scales with single pos" and adds the missing "stacked scales on top/bottom" and "on left/right". The updated snapshot only gains emptyclip-pathgroups; its text, positions and shapes are unchanged. The two new ones match theirggplot4/counterparts in label text, positions and shapes.No package code changes were needed: all existing version checks are
packageVersion("ggplot2") > "3.5.2". I checked that the package installs with ggplot2 3.5.2, and that installing with ggplot2 3.5.0 now fails with "namespace 'ggplot2' 3.5.0 is already loaded, but >= 3.5.2 is required". Locally,test-coord_geo.Randtest-guides.Rpass with ggplot2 3.5.2 (with and without ggtree available) and with 4.0.3.Things to know:
coord_trans_xypre-4.0 snapshots until Fixcoord_trans_xy()axis labels with ggplot2 < 4.0.0 #117 is merged (2 outdated and 3 missing; on CI a missing snapshot counts as a failure). Thegeom_text_cladetests are skipped in this job because ggtree can't load, so they don't depend on Fixgeom_text_clade(text_geom = "label")with ggplot2 < 4.0.0 #120.ubuntu-latest (release, ggplot2 >= 3.5.2)→ubuntu-latest (release, ggplot2 release). If branch protection onmainrequires checks by name, those settings will need updating.NEWS.md, as do Fixcoord_trans_xy()gridlines #116, Fixcoord_trans_xy()axis labels with ggplot2 < 4.0.0 #117 and Fixgeom_text_clade(text_geom = "label")with ggplot2 < 4.0.0 #120, so whichever of them merges later will need a small merge ofNEWS.md.AI disclosure: Claude identified the problem and drafted the change.
🤖 Generated with Claude Code
https://claude.ai/code/session_01A7zDoJJQSEuNmyB6xR3njB