diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 0a9593bd02..9c9d6d6c86 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -1,4 +1,4 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/master/examples +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help # # NOTE: This workflow is overkill for most R packages and @@ -12,10 +12,6 @@ on: name: R-CMD-check -# Increment this version when we want to clear cache -env: - cache-version: v6 - jobs: R-CMD-check: runs-on: ${{ matrix.config.os }} @@ -26,78 +22,53 @@ jobs: fail-fast: false matrix: config: - - {os: windows-latest, r: '4.1', vdiffr: true, xref: true} - - {os: macOS-latest, r: '4.1', vdiffr: true, xref: true} - - {os: ubuntu-18.04, r: 'devel', vdiffr: false, xref: true} - - {os: ubuntu-18.04, r: '4.1', vdiffr: true, xref: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"} - - {os: ubuntu-18.04, r: '4.0', vdiffr: false, xref: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"} - - {os: ubuntu-18.04, r: '3.6', vdiffr: false, xref: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"} - - {os: ubuntu-18.04, r: '3.5', vdiffr: false, xref: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"} - - {os: ubuntu-18.04, r: '3.4', vdiffr: false, xref: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"} - - {os: ubuntu-18.04, r: '3.3', vdiffr: false, xref: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"} + - {os: macOS-latest, r: 'release'} + + - {os: windows-latest, r: 'release'} + # Use 3.6 to trigger usage of RTools35 + - {os: windows-latest, r: '3.6'} + + # Use latest ubuntu to make it easier to install sf dependencies + - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} + - {os: ubuntu-latest, r: 'release'} + - {os: ubuntu-latest, r: 'oldrel-1'} + - {os: ubuntu-latest, r: 'oldrel-2'} + - {os: ubuntu-latest, r: 'oldrel-3'} + - {os: ubuntu-latest, r: 'oldrel-4'} env: - R_REMOTES_NO_ERRORS_FROM_WARNINGS: true - RSPM: ${{ matrix.config.rspm }} - # don't treat missing suggested packages as error + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes _R_CHECK_FORCE_SUGGESTS_: false # Some packages might unavailable on the older versions, so let's ignore xref warnings - _R_CHECK_RD_XREFS_: ${{ matrix.config.xref }} + _R_CHECK_RD_XREFS_: false # Runs vdiffr test only on the latest version of R - VDIFFR_RUN_TESTS: ${{ matrix.config.vdiffr }} + VDIFFR_RUN_TESTS: ${{ matrix.config.r == 'release' }} VDIFFR_LOG_PATH: "../vdiffr.Rout.fail" steps: - uses: actions/checkout@v2 - - uses: r-lib/actions/setup-r@master + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 with: r-version: ${{ matrix.config.r }} http-user-agent: ${{ matrix.config.http-user-agent }} + use-public-rspm: true - - uses: r-lib/actions/setup-pandoc@master - - - name: Query dependencies - run: | - install.packages('remotes') - saveRDS(remotes::dev_package_deps(dependencies = TRUE), "depends.Rds", version = 2) - shell: Rscript {0} - - - name: Cache R packages - if: runner.os != 'Windows' - uses: actions/cache@v1 + - uses: r-lib/actions/setup-r-dependencies@v2 with: - path: ${{ env.R_LIBS_USER }} - key: ${{ env.cache-version }}-${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('depends.Rds') }} - restore-keys: ${{ env.cache-version }}-${{ runner.os }}-r-${{ matrix.config.r }}- - - - name: Install system dependencies on Linux - if: runner.os == 'Linux' - run: | - while read -r cmd - do - eval sudo $cmd - done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "18.04"))') - - name: Install system dependencies on macOS - if: runner.os == 'macOS' - run: | - # XQuartz is needed by vdiffr - brew install xquartz - # Use only binary packages - echo 'options(pkgType = "binary")' >> ~/.Rprofile - - name: Install dependencies - run: | - remotes::install_deps(dependencies = TRUE) - remotes::install_cran("rcmdcheck") - shell: Rscript {0} - - - name: Check - run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "warning", check_dir = "check") - shell: Rscript {0} + extra-packages: > + any::rcmdcheck, + maps=?ignore-before-r=3.5.0, + Hmisc=?ignore-before-r=3.6.0, + mapproj=?ignore-before-r=3.5.0, + multcomp=?ignore-before-r=3.5.0, + quantreg=?ignore-before-r=3.5.0, + interp=?ignore-before-r=3.5.0 + needs: check - - name: Upload check results - if: failure() - uses: actions/upload-artifact@master + - uses: r-lib/actions/check-r-package@v2 with: - name: ${{ runner.os }}-r${{ matrix.config.r }}-results - path: check + upload-snapshots: true diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 6d10b7c806..0b2602168b 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -1,34 +1,46 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/master/examples +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: push: - types: [published] branches: [main, master] - tags: ['*'] + pull_request: + branches: [main, master] + release: + types: [published] + workflow_dispatch: name: pkgdown jobs: pkgdown: runs-on: ubuntu-latest + # Only restrict concurrency for non-PR jobs + concurrency: + group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v2 - - uses: r-lib/actions/setup-pandoc@v1 + - uses: r-lib/actions/setup-pandoc@v2 - - uses: r-lib/actions/setup-r@v1 + - uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true - - uses: r-lib/actions/setup-r-dependencies@v1 + - uses: r-lib/actions/setup-r-dependencies@v2 with: - extra-packages: pkgdown + extra-packages: any::pkgdown, local::. needs: website - - name: Deploy package - run: | - git config --local user.name "$GITHUB_ACTOR" - git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com" - Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)' + - name: Build site + run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) + shell: Rscript {0} + + - name: Deploy to GitHub pages 🚀 + if: github.event_name != 'pull_request' + uses: JamesIves/github-pages-deploy-action@4.1.4 + with: + clean: false + branch: gh-pages + folder: docs diff --git a/.github/workflows/pr-commands.yaml b/.github/workflows/pr-commands.yaml index 1cdafbf7e4..97271eb29f 100644 --- a/.github/workflows/pr-commands.yaml +++ b/.github/workflows/pr-commands.yaml @@ -1,4 +1,4 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/master/examples +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: issue_comment: @@ -8,7 +8,7 @@ name: Commands jobs: document: - if: startsWith(github.event.comment.body, '/document') + if: ${{ github.event.issue.pull_request && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') && startsWith(github.event.comment.body, '/document') }} name: document runs-on: ubuntu-latest env: @@ -16,20 +16,22 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: r-lib/actions/pr-fetch@v1 + - uses: r-lib/actions/pr-fetch@v2 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - - uses: r-lib/actions/setup-r@v1 + - uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true - - uses: r-lib/actions/setup-r-dependencies@v1 + - uses: r-lib/actions/setup-r-dependencies@v2 with: - extra-packages: roxygen2 + extra-packages: any::roxygen2 + needs: pr-document - name: Document - run: Rscript -e 'roxygen2::roxygenise()' + run: roxygen2::roxygenise() + shell: Rscript {0} - name: commit run: | @@ -38,12 +40,12 @@ jobs: git add man/\* NAMESPACE git commit -m 'Document' - - uses: r-lib/actions/pr-push@v1 + - uses: r-lib/actions/pr-push@v2 with: repo-token: ${{ secrets.GITHUB_TOKEN }} style: - if: startsWith(github.event.comment.body, '/style') + if: ${{ github.event.issue.pull_request && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') && startsWith(github.event.comment.body, '/style') }} name: style runs-on: ubuntu-latest env: @@ -51,17 +53,19 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: r-lib/actions/pr-fetch@v1 + - uses: r-lib/actions/pr-fetch@v2 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - - uses: r-lib/actions/setup-r@v1 + - uses: r-lib/actions/setup-r@v2 - name: Install dependencies - run: Rscript -e 'install.packages("styler")' + run: install.packages("styler") + shell: Rscript {0} - name: Style - run: Rscript -e 'styler::style_pkg()' + run: styler::style_pkg() + shell: Rscript {0} - name: commit run: | @@ -70,6 +74,6 @@ jobs: git add \*.R git commit -m 'Style' - - uses: r-lib/actions/pr-push@v1 + - uses: r-lib/actions/pr-push@v2 with: repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 3c0da1c97c..4b65418291 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -1,4 +1,4 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/master/examples +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: push: @@ -17,14 +17,15 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: r-lib/actions/setup-r@v1 + - uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true - - uses: r-lib/actions/setup-r-dependencies@v1 + - uses: r-lib/actions/setup-r-dependencies@v2 with: - extra-packages: covr + extra-packages: any::covr + needs: coverage - name: Test coverage - run: covr::codecov() + run: covr::codecov(quiet = FALSE) shell: Rscript {0} diff --git a/DESCRIPTION b/DESCRIPTION index 89af5c1bd2..4488507841 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,18 +1,14 @@ Package: ggplot2 -Version: 3.3.5.9000 Title: Create Elegant Data Visualisations Using the Grammar of Graphics -Description: A system for 'declaratively' creating graphics, - based on "The Grammar of Graphics". You provide the data, tell 'ggplot2' - how to map variables to aesthetics, what graphical primitives to use, - and it takes care of the details. +Version: 3.3.5.9000 Authors@R: c( - person("Hadley", "Wickham", , "hadley@rstudio.com", "aut", + person("Hadley", "Wickham", , "hadley@rstudio.com", role = "aut", comment = c(ORCID = "0000-0003-4757-117X")), - person("Winston", "Chang", , role = "aut", + person("Winston", "Chang", role = "aut", comment = c(ORCID = "0000-0002-1576-2126")), - person("Lionel", "Henry", , role = "aut"), - person("Thomas Lin", "Pedersen", , "thomas.pedersen@rstudio.com", - role = c("aut", "cre"), comment = c(ORCID = "0000-0002-5147-4711")), + person("Lionel", "Henry", role = "aut"), + person("Thomas Lin", "Pedersen", , "thomas.pedersen@rstudio.com", role = c("aut", "cre"), + comment = c(ORCID = "0000-0002-5147-4711")), person("Kohske", "Takahashi", role = "aut"), person("Claus", "Wilke", role = "aut", comment = c(ORCID = "0000-0002-7470-9261")), @@ -23,7 +19,14 @@ Authors@R: c( person("Dewey", "Dunnington", role = "aut", comment = c(ORCID = "0000-0002-9415-4582")), person("RStudio", role = c("cph", "fnd")) - ) + ) +Description: A system for 'declaratively' creating graphics, based on "The + Grammar of Graphics". You provide the data, tell 'ggplot2' how to map + variables to aesthetics, what graphical primitives to use, and it + takes care of the details. +License: MIT + file LICENSE +URL: https://ggplot2.tidyverse.org, https://github.com/tidyverse/ggplot2 +BugReports: https://github.com/tidyverse/ggplot2/issues Depends: R (>= 3.3) Imports: @@ -42,7 +45,6 @@ Imports: withr (>= 2.0.0) Suggests: covr, - ragg, dplyr, ggplot2movies, hexbin, @@ -58,6 +60,7 @@ Suggests: nlme, profvis, quantreg, + ragg, RColorBrewer, rgeos, rmarkdown, @@ -67,11 +70,16 @@ Suggests: testthat (>= 3.0.0), vdiffr (>= 1.0.0), xml2 -Enhances: sp -License: MIT + file LICENSE -URL: https://ggplot2.tidyverse.org, https://github.com/tidyverse/ggplot2 -BugReports: https://github.com/tidyverse/ggplot2/issues +Enhances: + sp +VignetteBuilder: + knitr +Config/Needs/website: ggtext, tidyr, forcats, tidyverse/tidytemplate +Config/testthat/edition: 3 +Encoding: UTF-8 LazyData: true +Roxygen: list(markdown = TRUE) +RoxygenNote: 7.1.1 Collate: 'ggproto.r' 'ggplot-global.R' @@ -265,13 +273,3 @@ Collate: 'utilities-tidy-eval.R' 'zxx.r' 'zzz.r' -VignetteBuilder: knitr -RoxygenNote: 7.1.1 -Roxygen: list(markdown = TRUE) -Encoding: UTF-8 -Config/Needs/website: - ggtext, - tidyr, - forcats, - tidyverse/tidytemplate -Config/testthat/edition: 3 diff --git a/_pkgdown.yml b/_pkgdown.yml index 7290c01f6f..868360f66d 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -2,21 +2,16 @@ url: https://ggplot2.tidyverse.org template: package: tidytemplate - params: - docsearch: - api_key: e1261f3df95d2d4704c626ff11a4b536 - index_name: tidyverse_ggplot2 + bootstrap: 5 + + includes: + in_header: | + development: mode: auto authors: - Winston Chang: - href: https://github.com/wch - Lionel Henry: - href: https://github.com/lionel- - Thomas Lin Pedersen: - href: https://data-imaginist.com Claus Wilke: href: https://clauswilke.com Kara Woo: @@ -27,7 +22,6 @@ authors: href: https://fishandwhistle.net home: - strip_header: true links: - text: Learn more href: https://r4ds.had.co.nz/data-visualisation.html @@ -268,7 +262,6 @@ articles: - articles/faq-reordering - articles/faq-bars - news: releases: - text: "Version 3.3.0" @@ -290,10 +283,8 @@ news: navbar: structure: - right: [reference, news, articles, extensions, github] - left: [] + left: [reference, news, articles, extensions] components: - home: ~ extensions: text: Extensions href: https://exts.ggplot2.tidyverse.org/gallery/