From d30c3b5104814dc42ee03805e7ff59a718730f4c Mon Sep 17 00:00:00 2001 From: James Balamuta Date: Fri, 3 Jan 2020 23:43:01 -0600 Subject: [PATCH 1/9] Update description --- DESCRIPTION | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 43c3c64..f7b16bd 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,13 +1,17 @@ Package: errorist Title: Automatically Search Errors or Warnings Version: 0.0.2 -Authors@R: c(person("James", "Balamuta", email = "balamut2@illinois.edu", role = c("aut", "cre", "cph"), - comment = c(ORCID = "0000-0003-2826-8458")) +Authors@R: c( + person("James", "Balamuta", + email = "balamut2@illinois.edu", + role = c("aut", "cre", "cph"), + comment = c(ORCID = "0000-0003-2826-8458") + ) ) Description: Provides environment hooks that obtain errors and warnings which occur during the execution of code to automatically search for solutions. -URL: https://github.com/coatless/errorist -BugReports: https://github.com/coatless/errorist/issues +URL: https://github.com/r-assist/errorist +BugReports: https://github.com/r-assist/errorist/issues Depends: R (>= 3.0.0) Imports: searcher (>= 0.0.2) Suggests: testthat, @@ -17,6 +21,6 @@ Suggests: testthat, License: GPL (>= 2) Encoding: UTF-8 LazyData: true -RoxygenNote: 6.1.1 +RoxygenNote: 7.0.2 Roxygen: list(markdown = TRUE) VignetteBuilder: knitr From c93bb2213f13b3de106c69b6790c5baed889a3f2 Mon Sep 17 00:00:00 2001 From: James Balamuta Date: Fri, 3 Jan 2020 23:43:14 -0600 Subject: [PATCH 2/9] Redocument package --- man/errorist-package.Rd | 6 +++--- man/errorist_init.Rd | 8 ++++---- man/shims.Rd | 10 ++++++---- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/man/errorist-package.Rd b/man/errorist-package.Rd index 63cb050..0846248 100644 --- a/man/errorist-package.Rd +++ b/man/errorist-package.Rd @@ -15,12 +15,12 @@ By default, \code{errorist} searches Google for both warnings and errors. \seealso{ Useful links: \itemize{ - \item \url{https://github.com/coatless/errorist} - \item Report bugs at \url{https://github.com/coatless/errorist/issues} + \item \url{https://github.com/r-assist/errorist} + \item Report bugs at \url{https://github.com/r-assist/errorist/issues} } } \author{ -\strong{Maintainer}: James Balamuta \email{balamut2@illinois.edu} (0000-0003-2826-8458) [copyright holder] +\strong{Maintainer}: James Balamuta \email{balamut2@illinois.edu} (\href{https://orcid.org/0000-0003-2826-8458}{ORCID}) [copyright holder] } diff --git a/man/errorist_init.Rd b/man/errorist_init.Rd index 8ae41d7..0ff9504 100644 --- a/man/errorist_init.Rd +++ b/man/errorist_init.Rd @@ -5,10 +5,10 @@ \alias{disable_errorist} \title{Enable or Disable Errorist's Automatic Search} \usage{ -enable_errorist(error_search_func = getOption("errorist.warning", - searcher::search_google), - warning_search_func = getOption("errorist.warning", - searcher::search_google)) +enable_errorist( + error_search_func = getOption("errorist.warning", searcher::search_google), + warning_search_func = getOption("errorist.warning", searcher::search_google) +) disable_errorist() } diff --git a/man/shims.Rd b/man/shims.Rd index 66f33c0..503f0ac 100644 --- a/man/shims.Rd +++ b/man/shims.Rd @@ -7,13 +7,15 @@ \alias{disable_error_shim} \title{Enable and Disable Warning or Error Capture} \usage{ -enable_warning_shim(warning_search_func = getOption("errorist.warning", - searcher::search_google)) +enable_warning_shim( + warning_search_func = getOption("errorist.warning", searcher::search_google) +) disable_warning_shim() -enable_error_shim(error_search_func = getOption("errorist.error", - searcher::search_google)) +enable_error_shim( + error_search_func = getOption("errorist.error", searcher::search_google) +) disable_error_shim() } From 03264cd20cb1f54b42f563311727c2cf90db8c6a Mon Sep 17 00:00:00 2001 From: James Balamuta Date: Fri, 3 Jan 2020 23:43:52 -0600 Subject: [PATCH 3/9] Update README --- README.Rmd | 8 ++++---- README.md | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.Rmd b/README.Rmd index 4c8c5dc..352f1e8 100644 --- a/README.Rmd +++ b/README.Rmd @@ -14,12 +14,12 @@ knitr::opts_chunk$set( # errorist -[![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active) -[![Travis-CI Build Status](https://travis-ci.org/coatless/errorist.svg?branch=master)](https://travis-ci.org/coatless/errorist) + +[![Travis Build Status](https://travis-ci.com/r-assist/errorist.svg?branch=master)](https://travis-ci.com/r-assist/errorist) [![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/errorist)](https://cran.r-project.org/package=errorist) [![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/errorist)](http://www.r-pkg.org/pkg/errorist) -[![Coverage Status](https://img.shields.io/codecov/c/github/coatless/errorist/master.svg)](https://codecov.io/github/coatless/errorist?branch=master) - +[![Coverage Status](https://img.shields.io/codecov/c/github/r-assist/errorist/master.svg)](https://codecov.io/github/r-assist/errorist?branch=master) + > > _errorist_: one who holds to and propagates error diff --git a/README.md b/README.md index 4202580..9552e58 100644 --- a/README.md +++ b/README.md @@ -3,16 +3,16 @@ # errorist -[![Project Status: Active - The project has reached a stable, usable -state and is being actively -developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active) -[![Travis-CI Build -Status](https://travis-ci.org/coatless/errorist.svg?branch=master)](https://travis-ci.org/coatless/errorist) + + +[![Travis Build +Status](https://travis-ci.com/r-assist/errorist.svg?branch=master)](https://travis-ci.com/r-assist/errorist) [![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/errorist)](https://cran.r-project.org/package=errorist) [![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/errorist)](http://www.r-pkg.org/pkg/errorist) [![Coverage -Status](https://img.shields.io/codecov/c/github/coatless/errorist/master.svg)](https://codecov.io/github/coatless/errorist?branch=master) +Status](https://img.shields.io/codecov/c/github/r-assist/errorist/master.svg)](https://codecov.io/github/r-assist/errorist?branch=master) + > *errorist*: one who holds to and propagates error > From db97383474eab3c9439d7000a6a16fa4cda14c6a Mon Sep 17 00:00:00 2001 From: James Balamuta Date: Fri, 3 Jan 2020 23:44:36 -0600 Subject: [PATCH 4/9] Roll a NEWS entry --- NEWS.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 1a5e577..fc54998 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,12 @@ +# errorist 0.1.0 + +## Features + +- TBA + # errorist 0.0.2 -## Bugfixes +## Fixes - Imported the `search_google` function from `searcher` to satisfy `R CMD check`. From 0a9863d556bda59914970dabbb488fdfc997c66f Mon Sep 17 00:00:00 2001 From: James Balamuta Date: Fri, 3 Jan 2020 23:44:48 -0600 Subject: [PATCH 5/9] bump pkg version --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index f7b16bd..bc0249f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: errorist Title: Automatically Search Errors or Warnings -Version: 0.0.2 +Version: 0.1.0 Authors@R: c( person("James", "Balamuta", email = "balamut2@illinois.edu", From a98002417b9e7b12a72f3609f5163f19d14fd262 Mon Sep 17 00:00:00 2001 From: James Balamuta Date: Fri, 3 Jan 2020 23:45:38 -0600 Subject: [PATCH 6/9] Change how package-level documentation is generated --- R/errorist-package.R | 9 +++++++-- man/errorist-package.Rd | 4 +--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/R/errorist-package.R b/R/errorist-package.R index 7207f90..b30bbda 100644 --- a/R/errorist-package.R +++ b/R/errorist-package.R @@ -1,3 +1,8 @@ -#' @details -#' By default, `errorist` searches Google for both warnings and errors. +#' @keywords internal "_PACKAGE" + +# The following block is used by usethis to automatically manage +# roxygen namespace tags. Modify with care! +## usethis namespace: start +## usethis namespace: end +NULL diff --git a/man/errorist-package.Rd b/man/errorist-package.Rd index 0846248..d7dd7cb 100644 --- a/man/errorist-package.Rd +++ b/man/errorist-package.Rd @@ -9,9 +9,6 @@ Provides environment hooks that obtain errors and warnings which occur during the execution of code to automatically search for solutions. } -\details{ -By default, \code{errorist} searches Google for both warnings and errors. -} \seealso{ Useful links: \itemize{ @@ -24,3 +21,4 @@ Useful links: \strong{Maintainer}: James Balamuta \email{balamut2@illinois.edu} (\href{https://orcid.org/0000-0003-2826-8458}{ORCID}) [copyright holder] } +\keyword{internal} From b8d57549b3e648b5493a3667a96e871ba31e8d51 Mon Sep 17 00:00:00 2001 From: James Balamuta Date: Fri, 3 Jan 2020 23:46:28 -0600 Subject: [PATCH 7/9] Remove TravisCI --- .travis.yml | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index cfebf12..0000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r - -language: R -sudo: false -cache: packages -after_success: - - Rscript -e 'covr::codecov()' - -env: - global: - - MAKEFLAGS="-j 2" From 193e0657acf0f6808be86abdadde521c9b9e5b69 Mon Sep 17 00:00:00 2001 From: James Balamuta Date: Fri, 3 Jan 2020 23:46:39 -0600 Subject: [PATCH 8/9] Add in R CMD check --- .github/workflows/R-CMD-check.yaml | 66 ++++++++++++++++++++++++++++++ .github/workflows/pr-commands.yaml | 47 +++++++++++++++++++++ 2 files changed, 113 insertions(+) create mode 100644 .github/workflows/R-CMD-check.yaml create mode 100644 .github/workflows/pr-commands.yaml diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml new file mode 100644 index 0000000..a22a2dc --- /dev/null +++ b/.github/workflows/R-CMD-check.yaml @@ -0,0 +1,66 @@ +on: [push, pull_request] + +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: windows-latest, r: 'release'} + - { os: windows-latest, r: 'devel'} + - { os: macOS-latest, r: 'release'} + - { os: macOS-latest, r: 'devel'} + - { os: ubuntu-16.04, r: '3.5', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"} + - { os: ubuntu-16.04, r: 'release', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"} + + env: + R_REMOTES_NO_ERRORS_FROM_WARNINGS: true + CRAN: ${{ matrix.config.cran }} + + steps: + - uses: actions/checkout@v1 + + - uses: r-lib/actions/setup-r@master + with: + r-version: ${{ matrix.config.r }} + + - uses: r-lib/actions/setup-pandoc@master + + - name: Cache R packages + if: runner.os != 'Windows' + uses: actions/cache@v1 + with: + path: ${{ env.R_LIBS_USER }} + key: ${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('DESCRIPTION') }} + + - name: Install system dependencies + if: runner.os == 'Linux' + env: + RHUB_PLATFORM: linux-x86_64-ubuntu-gcc + run: | + Rscript -e "install.packages('remotes')" -e "remotes::install_github('r-hub/sysreqs')" + sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))") + sudo -s eval "$sysreqs" + - name: Install dependencies + run: Rscript -e "install.packages('remotes')" -e "remotes::install_deps(dependencies = TRUE)" -e "remotes::install_cran('rcmdcheck')" + + - name: Check + run: Rscript -e "rcmdcheck::rcmdcheck(args = '--no-manual', error_on = 'warning', check_dir = 'check')" + + - name: Upload check results + if: failure() + uses: actions/upload-artifact@master + with: + name: ${{ runner.os }}-r${{ matrix.config.r }}-results + path: check + + - name: Test coverage + if: matrix.config.os == 'macOS-latest' && matrix.config.r == 'release' + run: | + Rscript -e 'covr::codecov(token = "${{secrets.CODECOV_TOKEN}}")' diff --git a/.github/workflows/pr-commands.yaml b/.github/workflows/pr-commands.yaml new file mode 100644 index 0000000..2b2eebc --- /dev/null +++ b/.github/workflows/pr-commands.yaml @@ -0,0 +1,47 @@ +on: + issue_comment: + types: [created] +name: Commands +jobs: + document: + if: startsWith(github.event.comment.body, '/document') + name: document + runs-on: macOS-latest + steps: + - uses: actions/checkout@v1 + - uses: r-lib/actions/pr-fetch@master + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - uses: r-lib/actions/setup-r@master + - name: Install dependencies + run: Rscript -e 'install.packages(c("remotes", "roxygen2"))' -e 'remotes::install_deps(dependencies = TRUE)' + - name: Document + run: Rscript -e 'roxygen2::roxygenise()' + - name: commit + run: | + git add man/\* NAMESPACE + git commit -m 'Document' + - uses: r-lib/actions/pr-push@master + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + style: + if: startsWith(github.event.comment.body, '/style') + name: document + runs-on: macOS-latest + steps: + - uses: actions/checkout@master + - uses: r-lib/actions/pr-fetch@master + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - uses: r-lib/actions/setup-r@master + - name: Install dependencies + run: Rscript -e 'install.packages("styler")' + - name: style + run: Rscript -e 'styler::style_pkg()' + - name: commit + run: | + git add \*.R + git commit -m 'style' + - uses: r-lib/actions/pr-push@master + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} From 7b34324e318d965746ff056c0dac8ae0d7ed865e Mon Sep 17 00:00:00 2001 From: James Balamuta Date: Fri, 3 Jan 2020 23:47:38 -0600 Subject: [PATCH 9/9] README badge --- README.Rmd | 2 +- README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.Rmd b/README.Rmd index 352f1e8..4f22f16 100644 --- a/README.Rmd +++ b/README.Rmd @@ -15,7 +15,7 @@ knitr::opts_chunk$set( # errorist -[![Travis Build Status](https://travis-ci.com/r-assist/errorist.svg?branch=master)](https://travis-ci.com/r-assist/errorist) +[![R build status](https://github.com/r-assist/errorist/workflows/R-CMD-check/badge.svg)](https://github.com/r-assist/errorist/actions) [![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/errorist)](https://cran.r-project.org/package=errorist) [![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/errorist)](http://www.r-pkg.org/pkg/errorist) [![Coverage Status](https://img.shields.io/codecov/c/github/r-assist/errorist/master.svg)](https://codecov.io/github/r-assist/errorist?branch=master) diff --git a/README.md b/README.md index 9552e58..48b6961 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,8 @@ -[![Travis Build -Status](https://travis-ci.com/r-assist/errorist.svg?branch=master)](https://travis-ci.com/r-assist/errorist) +[![R build +status](https://github.com/r-assist/errorist/workflows/R-CMD-check/badge.svg)](https://github.com/r-assist/errorist/actions) [![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/errorist)](https://cran.r-project.org/package=errorist) [![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/errorist)](http://www.r-pkg.org/pkg/errorist)