ropensci / awardFindR

Scan multiple online grant databases for relevant awards
https://docs.ropensci.org/awardFindR
Other
16 stars 7 forks source link

Rm readr from DESCRIPTION? #31

Closed maelle closed 2 years ago

maelle commented 2 years ago

As it seems it's not used?

mccallc commented 2 years ago

it's a non-obvious dependency, but httr requires it. removing from DESCRIPTION has the following result. Is there a better place to specify it as a requirement?



══ Failed tests ════════════════════════════════════════════════════════════════
── Error (test-full.R:11:3): Search that should return all empty ───────────────
Error: Please install readr package
Backtrace:
     ▆
  1. └─awardFindR::search_awards("foobar", to_date = "2021-01-01") at test-full.R:11:2
  2.   ├─base::eval(...)
  3.   │ └─base::eval(...)
  4.   ├─base::rbind.data.frame(...)
  5.   └─awardFindR:::.standardize_rockefeller(...)
  6.     └─base::lapply(keywords, get_rockefeller, from_date, to_date, verbose)
  7.       └─awardFindR (local) FUN(X[[i]], ...)
  8.         ├─base::as.data.frame(request(url, "get", verbose))
  9.         └─awardFindR:::request(url, "get", verbose)
 10.           ├─base::suppressMessages(httr::content(response))
 11.           │ └─base::withCallingHandlers(...)
 12.           └─httr::content(response)
 13.             └─httr:::parse_auto(raw, type, encoding, ...)
 14.               └─httr (local) parser(x = content, type = type, encoding = encoding, ...)
 15.                 └─httr:::need_package("readr")
 16. ```
maelle commented 2 years ago

Oh I see. However at the moment you get a R CMD check NOTE because of it.

I'd suggest

  1. Adding a roxygen2 import
#' @importFrom readr read_csv
  1. Running document().
mccallc commented 2 years ago

fixed!