Skip to content

Commit 6c27c91

Browse files
authored
Address CRAN check issues from Ripley (#12)
* Update to the latest github actions workflow * Update MD file * Re-generate documentation * Switch to packageStartupMessage() away from message() to satisfy CRAN issue. * Add news entry * Bump version * PR 12 * Update URLs to use HTTPS using: urlchecker::url_update() * Add new NEWS.md entry * Add a / for google. * https://google.com/ -> https://www.google.com/
1 parent 66b1a96 commit 6c27c91

File tree

11 files changed

+85
-92
lines changed

11 files changed

+85
-92
lines changed

.github/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.html

.github/workflows/R-CMD-check.yaml

Lines changed: 25 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
on: [push, pull_request]
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
28

39
name: R-CMD-check
410

@@ -12,55 +18,32 @@ jobs:
1218
fail-fast: false
1319
matrix:
1420
config:
15-
- { os: windows-latest, r: 'release'}
16-
- { os: windows-latest, r: 'devel'}
17-
- { os: macOS-latest, r: 'release'}
18-
- { os: macOS-latest, r: 'devel'}
19-
- { os: ubuntu-16.04, r: '3.5', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
20-
- { os: ubuntu-16.04, r: 'release', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
21+
- {os: macos-latest, r: 'release'}
22+
- {os: windows-latest, r: 'release'}
23+
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
24+
- {os: ubuntu-latest, r: 'release'}
25+
- {os: ubuntu-latest, r: 'oldrel-1'}
2126

2227
env:
23-
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
24-
CRAN: ${{ matrix.config.cran }}
28+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
29+
R_KEEP_PKG_SOURCE: yes
2530

2631
steps:
27-
- uses: actions/checkout@v1
32+
- uses: actions/checkout@v3
2833

29-
- uses: r-lib/actions/setup-r@master
34+
- uses: r-lib/actions/setup-pandoc@v2
35+
36+
- uses: r-lib/actions/setup-r@v2
3037
with:
3138
r-version: ${{ matrix.config.r }}
39+
http-user-agent: ${{ matrix.config.http-user-agent }}
40+
use-public-rspm: true
3241

33-
- uses: r-lib/actions/setup-pandoc@master
34-
35-
- name: Cache R packages
36-
if: runner.os != 'Windows'
37-
uses: actions/cache@v1
42+
- uses: r-lib/actions/setup-r-dependencies@v2
3843
with:
39-
path: ${{ env.R_LIBS_USER }}
40-
key: ${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('DESCRIPTION') }}
41-
42-
- name: Install system dependencies
43-
if: runner.os == 'Linux'
44-
env:
45-
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
46-
run: |
47-
Rscript -e "install.packages('remotes')" -e "remotes::install_github('r-hub/sysreqs')"
48-
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
49-
sudo -s eval "$sysreqs"
50-
- name: Install dependencies
51-
run: Rscript -e "install.packages('remotes')" -e "remotes::install_deps(dependencies = TRUE)" -e "remotes::install_cran('rcmdcheck')"
44+
extra-packages: any::rcmdcheck
45+
needs: check
5246

53-
- name: Check
54-
run: Rscript -e "rcmdcheck::rcmdcheck(args = '--no-manual', error_on = 'warning', check_dir = 'check')"
55-
56-
- name: Upload check results
57-
if: failure()
58-
uses: actions/upload-artifact@master
47+
- uses: r-lib/actions/check-r-package@v2
5948
with:
60-
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
61-
path: check
62-
63-
- name: Test coverage
64-
if: matrix.config.os == 'macOS-latest' && matrix.config.r == 'release'
65-
run: |
66-
Rscript -e 'covr::codecov(token = "${{secrets.CODECOV_TOKEN}}")'
49+
upload-snapshots: true

DESCRIPTION

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: errorist
22
Title: Automatically Search Errors or Warnings
3-
Version: 0.1.0
3+
Version: 0.1.1
44
Authors@R: c(
55
person("James", "Balamuta",
66
email = "[email protected]",
@@ -20,7 +20,6 @@ Suggests: testthat,
2020
rmarkdown
2121
License: GPL (>= 2)
2222
Encoding: UTF-8
23-
LazyData: true
24-
RoxygenNote: 7.0.2
23+
RoxygenNote: 7.2.3
2524
Roxygen: list(markdown = TRUE)
2625
VignetteBuilder: knitr

NEWS.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
# errorist 0.1.1
2+
3+
## Fixes
4+
5+
- Switched insertion shiv `message()` to `packageStartupMessage()`.
6+
([#12](https://github.com/r-assist/errorist/pull/12))
7+
8+
- Removed `LazyData: true` from `DESCRIPTION`.
9+
([#12](https://github.com/r-assist/errorist/pull/12))
10+
11+
12+
- Switched URLs to using `https` instead of `http` and removed broken links.
13+
([#12](https://github.com/r-assist/errorist/pull/12))
14+
15+
## Deployment
16+
17+
- Updated to the latest version of `r-lib` GitHub actions.
18+
([#12](https://github.com/r-assist/errorist/pull/12))
19+
120
# errorist 0.1.0
221

322
## Feature
@@ -58,7 +77,7 @@ the following folks:
5877
on [XKCD Comic 1185: Ineffective Sorts](https://xkcd.com/1185/).
5978
- [Barry Rowlingson](http://barry.rowlingson.com) for the package name and
6079
remarks about functionality.
61-
- [Brodie Gaslam](http://www.brodieg.com/) for pointing out
80+
- [Brodie Gaslam](https://www.brodieg.com/) for pointing out
6281
[`addTaskCallback()`](https://stat.ethz.ch/R-manual/R-devel/library/base/html/taskCallback.html)
6382
as a way to create a warning handler and for a brief discussion on "call"
6483
objects.

R/handlers.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@
4545
#' @rdname errorist_init
4646
enable_errorist = function(error_search_func = getOption("errorist.warning", searcher::search_google),
4747
warning_search_func = getOption("errorist.warning", searcher::search_google)) {
48-
message("Warnings and errors will automatically trigger a web search.")
48+
packageStartupMessage("Warnings and errors will automatically trigger a web search.")
4949
enable_error_shim(error_search_func)
5050
enable_warning_shim(warning_search_func)
5151
}
5252

5353
#' @export
5454
#' @rdname errorist_init
5555
disable_errorist = function() {
56-
message("Warnings and errors are no longer automatically searched.")
56+
packageStartupMessage("Warnings and errors are no longer automatically searched.")
5757
disable_error_shim()
5858
disable_warning_shim()
5959
}
@@ -144,7 +144,7 @@ warning_handler = function(search_func =
144144
#' @param error_search_func,warning_search_func
145145
#' The search function from [`searcher`] that should be called when
146146
#' an error or warning occurs. By default, searches are routed through
147-
#' [Google](https://google.com).
147+
#' [Google](https://www.google.com/).
148148
#'
149149
#' @details
150150
#' By default, both [enable_warning_shim()] and [enable_error_shim()] functions

README.Rmd

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@ knitr::opts_chunk$set(
1515
# errorist
1616

1717
<!-- badges: start -->
18-
[![R build status](https://github.com/r-assist/errorist/workflows/R-CMD-check/badge.svg)](https://github.com/r-assist/errorist/actions)
19-
[![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/errorist)](https://cran.r-project.org/package=errorist)
20-
[![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/errorist)](http://www.r-pkg.org/pkg/errorist)
21-
[![Coverage Status](https://img.shields.io/codecov/c/github/r-assist/errorist/master.svg)](https://codecov.io/github/r-assist/errorist?branch=master)
18+
[![R-CMD-check](https://github.com/r-assist/errorist/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/r-assist/errorist/actions/workflows/R-CMD-check.yaml)
19+
[![CRAN\_Status\_Badge](https://www.r-pkg.org/badges/version/errorist)](https://cran.r-project.org/package=errorist)
20+
[![CRAN RStudio mirror downloads](https://cranlogs.r-pkg.org/badges/errorist)](https://www.r-pkg.org/pkg/errorist)
2221
<!-- badges: end -->
2322

2423
>
@@ -113,7 +112,7 @@ for errors that occurred at runtime.
113112
on [XKCD Comic 1185: Ineffective Sorts](https://xkcd.com/1185/).
114113
- [Barry Rowlingson](http://barry.rowlingson.com) for the package name and
115114
remarks about functionality.
116-
- [Brodie Gaslam](http://www.brodieg.com/) for pointing out
115+
- [Brodie Gaslam](https://www.brodieg.com/) for pointing out
117116
[`addTaskCallback()`](https://stat.ethz.ch/R-manual/R-devel/library/base/html/taskCallback.html)
118117
as a way to create a warning handler and for a brief discussion on "call"
119118
objects.

README.md

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,14 @@
55

66
<!-- badges: start -->
77

8-
[![R build
9-
status](https://github.com/r-assist/errorist/workflows/R-CMD-check/badge.svg)](https://github.com/r-assist/errorist/actions)
10-
[![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/errorist)](https://cran.r-project.org/package=errorist)
8+
[![R-CMD-check](https://github.com/r-assist/errorist/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/r-assist/errorist/actions/workflows/R-CMD-check.yaml)
9+
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/errorist)](https://cran.r-project.org/package=errorist)
1110
[![CRAN RStudio mirror
12-
downloads](http://cranlogs.r-pkg.org/badges/errorist)](http://www.r-pkg.org/pkg/errorist)
13-
[![Coverage
14-
Status](https://img.shields.io/codecov/c/github/r-assist/errorist/master.svg)](https://codecov.io/github/r-assist/errorist?branch=master)
11+
downloads](https://cranlogs.r-pkg.org/badges/errorist)](https://www.r-pkg.org/pkg/errorist)
1512
<!-- badges: end -->
1613

1714
> *errorist*: one who holds to and propagates error
18-
>
15+
>
1916
> [Merriam
2017
> Webster](https://www.merriam-webster.com/dictionary/errorist)
2118
@@ -61,12 +58,12 @@ messages is Google.
6158
You can specify a different search engine handler by setting default
6259
values:
6360

64-
- `errorist.warning`: Warning search engine portal. The default is
65-
`searcher::search_google`.
66-
- `errorist.error`: Error search engine portal. The default is
67-
`searcher::search_google`.
68-
- `errorist.autoload`: Automatically search errors. The default is
69-
`TRUE`.
61+
- `errorist.warning`: Warning search engine portal. The default is
62+
`searcher::search_google`.
63+
- `errorist.error`: Error search engine portal. The default is
64+
`searcher::search_google`.
65+
- `errorist.autoload`: Automatically search errors. The default is
66+
`TRUE`.
7067

7168
If frequent use of the package occurs, consider adding the different
7269
search handlers as an option in your `.Rprofile`:
@@ -107,19 +104,19 @@ support for errors that occurred at runtime.
107104

108105
# Special Thanks
109106

110-
- [Dirk Eddelbuettel](http://dirk.eddelbuettel.com) for starting the
111-
discussion on [XKCD Comic 1185: Ineffective
112-
Sorts](https://xkcd.com/1185/).
113-
- [Barry Rowlingson](http://barry.rowlingson.com) for the package name
114-
and remarks about functionality.
115-
- [Brodie Gaslam](http://www.brodieg.com/) for pointing out
116-
[`addTaskCallback()`](https://stat.ethz.ch/R-manual/R-devel/library/base/html/taskCallback.html)
117-
as a way to create a warning handler and for a brief discussion on
118-
“call” objects.
119-
- [Joshua Ulrich](https://github.com/joshuaulrich/) for advise on
120-
incorporating the semi-documented
121-
[`last.warning`](https://stat.ethz.ch/R-manual/R-devel/library/base/html/warning.html)
122-
object that *R* populates with warning messages.
107+
- [Dirk Eddelbuettel](http://dirk.eddelbuettel.com) for starting the
108+
discussion on [XKCD Comic 1185: Ineffective
109+
Sorts](https://xkcd.com/1185/).
110+
- [Barry Rowlingson](http://barry.rowlingson.com) for the package name
111+
and remarks about functionality.
112+
- [Brodie Gaslam](https://www.brodieg.com/) for pointing out
113+
[`addTaskCallback()`](https://stat.ethz.ch/R-manual/R-devel/library/base/html/taskCallback.html)
114+
as a way to create a warning handler and for a brief discussion on
115+
“call” objects.
116+
- [Joshua Ulrich](https://github.com/joshuaulrich/) for advise on
117+
incorporating the semi-documented
118+
[`last.warning`](https://stat.ethz.ch/R-manual/R-devel/library/base/html/warning.html)
119+
object that *R* populates with warning messages.
123120

124121
# License
125122

man/errorist-package.Rd

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/errorist_init.Rd

Lines changed: 2 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/shims.Rd

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)