Skip to content

Commit 788890b

Browse files
authored
Update package structure (#4)
* Update description * Redocument package * Update README * Roll a NEWS entry * bump pkg version * Change how package-level documentation is generated * Remove TravisCI * Add in R CMD check * README badge
1 parent 0115558 commit 788890b

File tree

11 files changed

+161
-44
lines changed

11 files changed

+161
-44
lines changed

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

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
on: [push, pull_request]
2+
3+
name: R-CMD-check
4+
5+
jobs:
6+
R-CMD-check:
7+
runs-on: ${{ matrix.config.os }}
8+
9+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
10+
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
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+
22+
env:
23+
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
24+
CRAN: ${{ matrix.config.cran }}
25+
26+
steps:
27+
- uses: actions/checkout@v1
28+
29+
- uses: r-lib/actions/setup-r@master
30+
with:
31+
r-version: ${{ matrix.config.r }}
32+
33+
- uses: r-lib/actions/setup-pandoc@master
34+
35+
- name: Cache R packages
36+
if: runner.os != 'Windows'
37+
uses: actions/cache@v1
38+
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')"
52+
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
59+
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}}")'

.github/workflows/pr-commands.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
on:
2+
issue_comment:
3+
types: [created]
4+
name: Commands
5+
jobs:
6+
document:
7+
if: startsWith(github.event.comment.body, '/document')
8+
name: document
9+
runs-on: macOS-latest
10+
steps:
11+
- uses: actions/checkout@v1
12+
- uses: r-lib/actions/pr-fetch@master
13+
with:
14+
repo-token: ${{ secrets.GITHUB_TOKEN }}
15+
- uses: r-lib/actions/setup-r@master
16+
- name: Install dependencies
17+
run: Rscript -e 'install.packages(c("remotes", "roxygen2"))' -e 'remotes::install_deps(dependencies = TRUE)'
18+
- name: Document
19+
run: Rscript -e 'roxygen2::roxygenise()'
20+
- name: commit
21+
run: |
22+
git add man/\* NAMESPACE
23+
git commit -m 'Document'
24+
- uses: r-lib/actions/pr-push@master
25+
with:
26+
repo-token: ${{ secrets.GITHUB_TOKEN }}
27+
style:
28+
if: startsWith(github.event.comment.body, '/style')
29+
name: document
30+
runs-on: macOS-latest
31+
steps:
32+
- uses: actions/checkout@master
33+
- uses: r-lib/actions/pr-fetch@master
34+
with:
35+
repo-token: ${{ secrets.GITHUB_TOKEN }}
36+
- uses: r-lib/actions/setup-r@master
37+
- name: Install dependencies
38+
run: Rscript -e 'install.packages("styler")'
39+
- name: style
40+
run: Rscript -e 'styler::style_pkg()'
41+
- name: commit
42+
run: |
43+
git add \*.R
44+
git commit -m 'style'
45+
- uses: r-lib/actions/pr-push@master
46+
with:
47+
repo-token: ${{ secrets.GITHUB_TOKEN }}

.travis.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

DESCRIPTION

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
Package: errorist
22
Title: Automatically Search Errors or Warnings
3-
Version: 0.0.2
4-
Authors@R: c(person("James", "Balamuta", email = "[email protected]", role = c("aut", "cre", "cph"),
5-
comment = c(ORCID = "0000-0003-2826-8458"))
3+
Version: 0.1.0
4+
Authors@R: c(
5+
person("James", "Balamuta",
6+
email = "[email protected]",
7+
role = c("aut", "cre", "cph"),
8+
comment = c(ORCID = "0000-0003-2826-8458")
9+
)
610
)
711
Description: Provides environment hooks that obtain errors and warnings which
812
occur during the execution of code to automatically search for solutions.
9-
URL: https://github.com/coatless/errorist
10-
BugReports: https://github.com/coatless/errorist/issues
13+
URL: https://github.com/r-assist/errorist
14+
BugReports: https://github.com/r-assist/errorist/issues
1115
Depends: R (>= 3.0.0)
1216
Imports: searcher (>= 0.0.2)
1317
Suggests: testthat,
@@ -17,6 +21,6 @@ Suggests: testthat,
1721
License: GPL (>= 2)
1822
Encoding: UTF-8
1923
LazyData: true
20-
RoxygenNote: 6.1.1
24+
RoxygenNote: 7.0.2
2125
Roxygen: list(markdown = TRUE)
2226
VignetteBuilder: knitr

NEWS.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
# errorist 0.1.0
2+
3+
## Features
4+
5+
- TBA
6+
17
# errorist 0.0.2
28

3-
## Bugfixes
9+
## Fixes
410

511
- Imported the `search_google` function from `searcher` to satisfy `R CMD check`.
612

R/errorist-package.R

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1-
#' @details
2-
#' By default, `errorist` searches Google for both warnings and errors.
1+
#' @keywords internal
32
"_PACKAGE"
3+
4+
# The following block is used by usethis to automatically manage
5+
# roxygen namespace tags. Modify with care!
6+
## usethis namespace: start
7+
## usethis namespace: end
8+
NULL

README.Rmd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ knitr::opts_chunk$set(
1414

1515
# errorist
1616

17-
[![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)
18-
[![Travis-CI Build Status](https://travis-ci.org/coatless/errorist.svg?branch=master)](https://travis-ci.org/coatless/errorist)
17+
<!-- 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)
1919
[![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/errorist)](https://cran.r-project.org/package=errorist)
2020
[![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/coatless/errorist/master.svg)](https://codecov.io/github/coatless/errorist?branch=master)
22-
21+
[![Coverage Status](https://img.shields.io/codecov/c/github/r-assist/errorist/master.svg)](https://codecov.io/github/r-assist/errorist?branch=master)
22+
<!-- badges: end -->
2323

2424
>
2525
> _errorist_: one who holds to and propagates error

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33

44
# errorist
55

6-
[![Project Status: Active - The project has reached a stable, usable
7-
state and is being actively
8-
developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)
9-
[![Travis-CI Build
10-
Status](https://travis-ci.org/coatless/errorist.svg?branch=master)](https://travis-ci.org/coatless/errorist)
6+
<!-- badges: start -->
7+
8+
[![R build
9+
status](https://github.com/r-assist/errorist/workflows/R-CMD-check/badge.svg)](https://github.com/r-assist/errorist/actions)
1110
[![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/errorist)](https://cran.r-project.org/package=errorist)
1211
[![CRAN RStudio mirror
1312
downloads](http://cranlogs.r-pkg.org/badges/errorist)](http://www.r-pkg.org/pkg/errorist)
1413
[![Coverage
15-
Status](https://img.shields.io/codecov/c/github/coatless/errorist/master.svg)](https://codecov.io/github/coatless/errorist?branch=master)
14+
Status](https://img.shields.io/codecov/c/github/r-assist/errorist/master.svg)](https://codecov.io/github/r-assist/errorist?branch=master)
15+
<!-- badges: end -->
1616

1717
> *errorist*: one who holds to and propagates error
1818
>

man/errorist-package.Rd

Lines changed: 4 additions & 6 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: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)