Skip to content

Commit

Permalink
Use {vdiffr}; Update GHA; Update "print on CI / examples" method; F…
Browse files Browse the repository at this point in the history
…ix lints (#453)
  • Loading branch information
schloerke authored Oct 11, 2022
1 parent e4217fe commit d13006e
Show file tree
Hide file tree
Showing 285 changed files with 102,262 additions and 1,113 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ figure
ggmapTemp.png
README.html
notes/
tests/testthat/_snaps
tests/testthat/Rplots.pdf
^.*\.Rproj$
^\.Rproj\.user$
Expand Down
91 changes: 0 additions & 91 deletions .github/workflows-ignore/R-CMD-check.yaml

This file was deleted.

65 changes: 0 additions & 65 deletions .github/workflows-ignore/deploy.yaml

This file was deleted.

55 changes: 16 additions & 39 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,46 +1,23 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
# Workflow derived from https://github.com/rstudio/shiny-workflows
#
# NOTE: This Shiny team GHA workflow is overkill for most R packages.
# For most R packages it is better to use https://github.com/r-lib/actions
on:
push:
branches: [main, master]
branches: [master, rc-**]
pull_request:
branches: [main, master]
branches: [master]
schedule:
- cron: '0 5 * * 1' # every monday

name: R-CMD-check
name: Package checks

jobs:
website:
uses: rstudio/shiny-workflows/.github/workflows/website.yaml@v1
routine:
uses: rstudio/shiny-workflows/.github/workflows/routine.yaml@v1
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-pandoc@v1

- uses: r-lib/actions/setup-r@v1
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v1
with:
extra-packages: rcmdcheck

- uses: r-lib/actions/check-r-package@v1
uses: rstudio/shiny-workflows/.github/workflows/R-CMD-check.yaml@v1
with:
minimum-r-version: "4.1.0"
35 changes: 0 additions & 35 deletions .github/workflows/pkgdown.yaml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/test-coverage.yaml

This file was deleted.

8 changes: 5 additions & 3 deletions .lintr
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
linters: with_defaults(
camel_case_linter = NULL,
linters: linters_with_defaults(
cyclocomp_linter = NULL,
commented_code_linter = NULL,
line_length_linter = NULL
line_length_linter = NULL,
object_name_linter = NULL,
seq_linter = NULL
)
exclusions:
list(
Expand Down
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ Suggests:
crosstalk,
knitr,
spelling,
emmeans
emmeans,
vdiffr
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.1
SystemRequirements: openssl
Expand Down
10 changes: 5 additions & 5 deletions R/deprecated.R
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ ggally_cor_v1_5 <- function(
corAlignPercent = NULL, corMethod = NULL, corUse = NULL,
displayGrid = TRUE,
...
){
) {

if (! is.null(corAlignPercent)) {
stop("'corAlignPercent' is deprecated. Please use argument 'alignPercent'")
Expand Down Expand Up @@ -177,14 +177,14 @@ ggally_cor_v1_5 <- function(
}
}
} else {
if (length(names(mapping)) > 0){
for (i in length(names(mapping)):1){
if (length(names(mapping)) > 0) {
for (i in length(names(mapping)):1) {
# find the last value of the aes, such as cyl of as.factor(cyl)
tmp_map_val <- deparse(mapping[names(mapping)[i]][[1]])
if (tmp_map_val[length(tmp_map_val)] %in% colnames(data))
mapping[[names(mapping)[i]]] <- NULL

if (length(names(mapping)) < 1){
if (length(names(mapping)) < 1) {
mapping <- NULL
break;
}
Expand Down Expand Up @@ -212,7 +212,7 @@ ggally_cor_v1_5 <- function(
lev <- levels(as.factor(colorData))
ord <- rep(-1, nrow(cord))
for (i in 1:nrow(cord)) {
for (j in seq_along(lev)){
for (j in seq_along(lev)) {
if (identical(as.character(cord$color[i]), as.character(lev[j]))) {
ord[i] <- j
}
Expand Down
2 changes: 1 addition & 1 deletion R/find-combo.R
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ find_plot_type <- function(col1Name, col2Name, type1, type2, isAllNa, allowDiag)
}
}

if (type1 == "na" | type2 == "na") {
if (type1 == "na" || type2 == "na") {
return("na")
}

Expand Down
1 change: 0 additions & 1 deletion R/geom_stripped_rows.R
Original file line number Diff line number Diff line change
Expand Up @@ -175,4 +175,3 @@ GeomStrippedCols <- ggplot2::ggproto("GeomStrippedCols", ggplot2::Geom,
)
}
)

Loading

0 comments on commit d13006e

Please sign in to comment.