Skip to content

Commit 2211439

Browse files
committed
make check happy
1 parent 6e7f0cd commit 2211439

File tree

7 files changed

+43
-8
lines changed

7 files changed

+43
-8
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: epidatr
22
Type: Package
33
Title: Client for Delphi's 'Epidata' API
4-
Version: 1.0.2
4+
Version: 1.1.0
55
Date: 2023-12-07
66
Authors@R:
77
c(

DEVELOPMENT.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,20 @@ python -m http.server -d docs
4545
Please follow the guidelines in the [PR template document](.github/pull_request_template.md).
4646

4747
## Release process
48+
First, there's a handy function that makes a github issue; for example, at the time of writing we were doing:
49+
```R
50+
usethis::use_release_issue(version = "1.0.2")
51+
```
52+
If you want to extend it, add to the `release_bullets` function in [utils.R](https://github.com/cmu-delphi/epidatr/blob/dev/R/utils.R).
53+
First, make sure that all the checks pass
54+
55+
```R
56+
devtools::check(".", manual = TRUE, env_vars =c(NOT_CRAN = "false"))
57+
```
4858

49-
TBD
59+
Aim for 10/10, no notes.
60+
61+
When this has gone smoothly enough, release to CRAN via
62+
```R
63+
devtools::release(check = TRUE)
64+
```

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ importFrom(openssl,md5)
8181
importFrom(purrr,map_chr)
8282
importFrom(purrr,map_lgl)
8383
importFrom(readr,read_csv)
84+
importFrom(stats,na.omit)
8485
importFrom(tibble,as_tibble)
8586
importFrom(tibble,tibble)
8687
importFrom(utils,help.search)

R/cache.R

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,13 +168,13 @@ set_cache <- function(cache_dir = NULL,
168168
)
169169
}
170170

171+
# this is effectively a startup message, and for some reason, cli_inform doesn't support start suppression, so we're on our own
172+
# https://github.com/r-lib/cli/issues/589 when this closes we can go back.
173+
msg <-"{cli::symbol$warn} epidatr cache is being used (set env var EPIDATR_USE_CACHE=FALSE if not intended).
174+
{cli::symbol$info} The cache directory is {cache_dir}.
175+
{cli::symbol$info} The cache will be cleared after {days} day{ifelse(days>1,'s','')} and will be pruned if it exceeds {max_size} MB.
176+
{cli::symbol$info} The log of cache transactions is stored at {file.path(cache_dir, logfile)}."
171177
rlang::inform(cli::format_inline(msg), class = "packageStartupMessage")
172-
cli::cli_inform(c(
173-
"!" = "epidatr cache is being used (set env var EPIDATR_USE_CACHE=FALSE if not intended).",
174-
"i" = "The cache directory is {cache_dir}.",
175-
"i" = "The cache will be cleared after {days} day{ifelse(days>1,'s','')} and will be pruned if it exceeds {max_size} MB.",
176-
"i" = "The log of cache transactions is stored at {file.path(cache_dir, logfile)}."
177-
))
178178
}
179179

180180
#' Manually reset the cache, deleting all currently saved data and starting afresh

R/model.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ print.EpidataFieldInfo <- function(x, ...) {
165165
cli::cli_dl(x[attr(x, "names")])
166166
}
167167

168+
#' @importFrom stats na.omit
168169
parse_value <- function(info, value, disable_date_parsing = FALSE) {
169170
stopifnot(inherits(info, "EpidataFieldInfo"))
170171

R/utils.R

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,9 @@ get_wildcard_equivalent_dates <- function(time_value, time_type = c("day", "week
6161
}
6262
return(time_value)
6363
}
64+
65+
#' inserts each string as a bullet at the end of the "Prepare for release" section
66+
#' @keywords internal
67+
release_bullets <- function() {
68+
c("merge to main")
69+
}

man/release_bullets.Rd

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

0 commit comments

Comments
 (0)