From 0734df96e43c51e39edc493122ee29d5d5f34716 Mon Sep 17 00:00:00 2001 From: notPlancha Date: Sun, 28 Jan 2024 17:48:28 +0000 Subject: [PATCH] gh action, rhub run, tried revdep --- .Rbuildignore | 1 + .Rprofile | 22 +++++++++- .github/.gitignore | 1 + .github/workflows/R-CMD-check.yaml | 49 +++++++++++++++++++++ R/sync.R | 4 +- README.md | 6 ++- cran-comments.md | 70 ++++++++++++++++++++++++++++++ man/sync.Rd | 2 +- revdep/.gitignore | 7 +++ 9 files changed, 157 insertions(+), 5 deletions(-) create mode 100644 .github/.gitignore create mode 100644 .github/workflows/R-CMD-check.yaml create mode 100644 cran-comments.md create mode 100644 revdep/.gitignore diff --git a/.Rbuildignore b/.Rbuildignore index 0e48256..0bf0664 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -10,3 +10,4 @@ ^\.github$ ^NOTICE$ ^LICENSE$ +^revdep$ diff --git a/.Rprofile b/.Rprofile index 4ea83f5..78c6be7 100644 --- a/.Rprofile +++ b/.Rprofile @@ -2,6 +2,26 @@ require(pak) require(devtools) require(conflicted) require(desc) +# pak("r-lib/revdepcheck") +# pak("jumpingrivers/inteRgrate") +## https://www.r-bloggers.com/2020/07/how-to-write-your-own-r-package-and-publish-it-on-cran/ + d <- desc::desc() +tryit <- \() {devtools::load_all()} +build_docs <- \() {devtools::document()} +local_check <- \() {devtools::check()} +multi_check <- \() { + ch <- devtools::check_rhub() + ch +} +print_cran_comments <- \(ch) { + ch$cran_summary() +} +#revdep <- \() {revdepcheck::use_revdep()} # n percebi o q faz e n consegui correr +devel_check <- \() { + usethis::use_github_action() +} -tryit <- \() {devtools::load_all()} +goodpractice_check <- \() { + goodpractice::gp() +} diff --git a/.github/.gitignore b/.github/.gitignore new file mode 100644 index 0000000..2d19fc7 --- /dev/null +++ b/.github/.gitignore @@ -0,0 +1 @@ +*.html diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml new file mode 100644 index 0000000..a3ac618 --- /dev/null +++ b/.github/workflows/R-CMD-check.yaml @@ -0,0 +1,49 @@ +# 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: + branches: [main, master] + pull_request: + branches: [main, master] + +name: R-CMD-check + +jobs: + 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@v3 + + - 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-r-dependencies@v2 + with: + extra-packages: any::rcmdcheck + needs: check + + - uses: r-lib/actions/check-r-package@v2 + with: + upload-snapshots: true diff --git a/R/sync.R b/R/sync.R index 11b4de0..20fc5c7 100644 --- a/R/sync.R +++ b/R/sync.R @@ -108,7 +108,7 @@ pull <- function( #' @seealso [push()], [pull()] #' @examples #' \dontrun{ -#' sync() # will sync all settings, is what's run when called by addin +#' sync() # will sync all settings, is what's run when called by addin #' sync(write= FALSE) # dry run, will not write to files or push to gd #' sync(auth= FALSE) # will not authenticate with gd, will use already authenticated #' } @@ -255,7 +255,7 @@ full_choose <- function(df) { # if a column is different then let user choose between the 2 forAllChosen <- NULL ret <- list() - for (i in 1:ncol(df)) { + for (i in seq_along(df)) { name <- names(df)[i] chosen <- NULL if (df[1, i] != df[2, i]) { diff --git a/README.md b/README.md index 5c9eb5c..8f8a4f3 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ + +[![R-CMD-check](https://github.com/notPlancha/settingsSync/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/notPlancha/settingsSync/actions/workflows/R-CMD-check.yaml) + + # settingsSync R package and Rstudio Addin to sync its settings, keymaps and keyboard shortcuts, using Google Drive. @@ -16,4 +20,4 @@ You can directly call `settingsSync::sync()`, or use the Rstudio Addin (they do TODO ## Contributing -Feel free to open an issue or a PR. \ No newline at end of file +Feel free to open an issue or a PR. diff --git a/cran-comments.md b/cran-comments.md new file mode 100644 index 0000000..b26c6b7 --- /dev/null +++ b/cran-comments.md @@ -0,0 +1,70 @@ +## Test environments +- R-hub windows-x86_64-devel (r-devel) +- R-hub ubuntu-gcc-release (r-release) +- R-hub fedora-clang-devel (r-devel) + +## R CMD check results +❯ On windows-x86_64-devel (r-devel) + checking CRAN incoming feasibility ... NOTE + Maintainer: 'notPlancha ' + + New submission + + Possibly misspelled words in DESCRIPTION: + Addin (3:16, 9:22) + Keymaps (3:43) + Rstudio (3:8, 9:14) + keymaps (9:46) + +> dev note: not misspelled + +❯ On windows-x86_64-devel (r-devel) + checking for non-standard things in the check directory ... NOTE + Found the following files/directories: + ''NULL'' + +> dev note: rhub thing https://github.com/r-hub/rhub/issues/560 + +❯ On windows-x86_64-devel (r-devel) + checking for detritus in the temp directory ... NOTE + Found the following files/directories: + 'lastMiKTeXException' + +> dev note: rhub bug https://github.com/r-hub/rhub/issues/503 + +❯ On ubuntu-gcc-release (r-release) + checking CRAN incoming feasibility ... [6s/27s] NOTE + Maintainer: ‘notPlancha ’ + + New submission + + Possibly misspelled words in DESCRIPTION: + Addin (3:16, 9:22) + keymaps (9:46) + Keymaps (3:43) + Rstudio (3:8, 9:14) + +> dev note: not misspelled + + +❯ On ubuntu-gcc-release (r-release), fedora-clang-devel (r-devel) + checking HTML version of manual ... NOTE + Skipping checking HTML validation: no command 'tidy' found + +> dev note: rhub bug https://github.com/r-hub/rhub/issues/548 + +❯ On fedora-clang-devel (r-devel) + checking CRAN incoming feasibility ... [6s/34s] NOTE + Maintainer: ‘notPlancha ’ + + New submission + + Possibly misspelled words in DESCRIPTION: + Addin (3:16, 9:22) + Keymaps (3:43) + Rstudio (3:8, 9:14) + keymaps (9:46) + +> dev note: not misspelled + +0 errors ✔ | 0 warnings ✔ | 6 notes ✖ diff --git a/man/sync.Rd b/man/sync.Rd index 3af4267..78ac1ba 100644 --- a/man/sync.Rd +++ b/man/sync.Rd @@ -22,7 +22,7 @@ write the merged settings to the local files, and push them to Google Drive. } \examples{ \dontrun{ - sync() # will sync all settings, is what's run when called by addin + sync() # will sync all settings, is what's run when called by addin sync(write= FALSE) # dry run, will not write to files or push to gd sync(auth= FALSE) # will not authenticate with gd, will use already authenticated } diff --git a/revdep/.gitignore b/revdep/.gitignore new file mode 100644 index 0000000..111ab32 --- /dev/null +++ b/revdep/.gitignore @@ -0,0 +1,7 @@ +checks +library +checks.noindex +library.noindex +cloud.noindex +data.sqlite +*.html