Skip to content

Commit adbca1b

Browse files
Update test and vignette infra
1 parent 16609b5 commit adbca1b

File tree

4 files changed

+11
-16
lines changed

4 files changed

+11
-16
lines changed

README.Rmd

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
output: github_document
3-
# add bibliography here
3+
# NOTE: place references if any as a JSON in `vignettes/resources`
4+
# NOTE: references file can have any name, and there can be separate references per vignette
5+
bibliography: vignettes/resources/references.json
46
link-citations: true
57
---
68

@@ -33,9 +35,7 @@ Replace all instances of `"vimc.rpkg.template"` with your package name. Make sur
3335

3436
2. Edit the files in `R/`, `tests/`, and `vignettes/` to suit your package;
3537

36-
3. Add spell check by running `usethis::use_spell_check(lang = "en-GB")`;
37-
38-
4. Remove these instructions from `README.Rmd`, and re-render the `.md` file using `devtools::render_readme()`.
38+
3. Remove these instructions from `README.Rmd`. Then, either let the automated GitHub Actions workflow update `README.md` once the change is pushed to GitHub, or disable the workflow by removing the file `.github/workflows/render-readme.yaml`, and manually re-render the `.md` file using `devtools::render_readme()`.
3939

4040
## Installation
4141

@@ -71,6 +71,8 @@ If preparatory or plotting steps are needed, prefer to hide them to keep focus o
7171

7272
Add information and links to related projects, such as research papers or packages, here.
7373

74+
An example citation would be @echeverria-londono2021.
75+
7476
## References
7577

76-
Space for references: REMOVE this text.
78+
**Space for references: REMOVE this sub-section if there are no references. References, if any, should appear below this text. Remove this text in packages.**

tests/spelling.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
if (requireNamespace("spelling", quietly = TRUE)) {
1+
if (requireNamespace('spelling', quietly = TRUE))
22
spelling::spell_check_test(
33
vignettes = TRUE,
44
error = FALSE,
55
skip_on_cran = TRUE
66
)
7-
}

tests/testthat/helper-state.R

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,6 @@
55
# function, or more conveniently with the `withr` package.
66
# We add a test on R >= 4.0.0 because some functions such as
77
# `globalCallingHandlers()` did not exist before.
8-
get_pars_toreset <- function() {
9-
pars <- par(no.readonly = TRUE)
10-
# The following params are set and modified automatically by plot(), as
11-
# documented in ?plot.window() and we:
12-
# 1. have no control over them
13-
# 2. do not care about resetting them
14-
pars <- pars[!names(pars) %in% c("usr", "xaxp", "yaxp")]
15-
}
16-
178
if (getRversion() >= "4.0.0") {
189
testthat::set_state_inspector(function() {
1910
list(

vignettes/vimc-rpkg-template.Rmd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
title: "vimc-rpkg-template"
33
output: rmarkdown::html_vignette
4+
# NOTE: make references if any available as a JSON at a location, see e.g. below
5+
# NOTE: uncomment the line below, and update the references path as needed
6+
# bibliography: resources/references.json
47
vignette: >
58
%\VignetteIndexEntry{vimc-rpkg-template}
69
%\VignetteEngine{knitr::rmarkdown}

0 commit comments

Comments
 (0)