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 }} 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" diff --git a/DESCRIPTION b/DESCRIPTION index 43c3c64..bc0249f 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")) +Version: 0.1.0 +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 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`. 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/README.Rmd b/README.Rmd index 4c8c5dc..4f22f16 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) + +[![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/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..48b6961 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) + + +[![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/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 > diff --git a/man/errorist-package.Rd b/man/errorist-package.Rd index 63cb050..d7dd7cb 100644 --- a/man/errorist-package.Rd +++ b/man/errorist-package.Rd @@ -9,18 +9,16 @@ 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{ - \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] } +\keyword{internal} 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() }