-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
* get_current_season alias * simplify/update progressively * update news * fix URL relocations * news, cran-comments, revdep checks * update DESC * run revdep from main pc instead of laptop * news polishing
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Package: nflreadr | ||
Title: Download 'nflverse' Data | ||
Version: 1.3.0.06 | ||
Version: 1.3.1 | ||
Authors@R: c( | ||
person("Tan", "Ho", , "[email protected]", role = c("aut", "cre", "cph"), | ||
comment = c(ORCID = "0000-0001-8388-5155")), | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#' Progressively | ||
#' | ||
#' This function helps add progress-reporting to any function - given function `f()` and progressor `p()`, | ||
#' it will return a new function that calls `f()` and then (on exiting) will call `p()` after every iteration. | ||
#' This is inspired by purrr's `safely`, `quietly`, and `possibly` function decorators. | ||
#' | ||
#' @param f a function to add progressor functionality to. | ||
#' @param p a function such as one created by `progressr::progressor()` - also accepts purrr-style lambda functions. | ||
#' | ||
#' @examples | ||
#' | ||
#' \donttest{ | ||
#' try({ # prevents cran errors | ||
#' | ||
#' urls <- rep("https://github.com/nflverse/nflverse-data/releases/download/test/combines.csv",3) | ||
#' | ||
#' lapply(urls, progressively(read.csv, ~cli::cli_progress_step('Loading...'))) | ||
#' | ||
#' read_rosters <- function(urls){ | ||
#' p <- progressr::progressor(along = urls) | ||
#' lapply(urls, progressively(read.csv, p)) | ||
#' } | ||
#' | ||
#' progressr::with_progress(read_rosters()) | ||
#' | ||
#' }) | ||
#' } | ||
#' | ||
#' @return a function that does the same as `f` but it calls `p()` after iteration. | ||
#' | ||
#' @seealso <https://nflreadr.nflverse.com/articles/exporting_nflreadr.html> for vignette on exporting nflreadr in packages | ||
#' | ||
#' @export | ||
progressively <- function(f, p = NULL){ | ||
if(is.null(p)) p <- function(...) NULL | ||
p <- rlang::as_function(p) | ||
f <- rlang::as_function(f) | ||
|
||
function(...){ | ||
on.exit(p()) | ||
f(...) | ||
} | ||
|
||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,32 @@ | ||
# Platform | ||
|
||
|field |value | | ||
|:--------|:---------------------------------------------------------------------| | ||
|version |R version 4.2.0 (2022-04-22 ucrt) | | ||
|os |Windows 10 x64 (build 19044) | | ||
|system |x86_64, mingw32 | | ||
|ui |RStudio | | ||
|language |(EN) | | ||
|collate |English_Canada.utf8 | | ||
|ctype |English_Canada.utf8 | | ||
|tz |America/New_York | | ||
|date |2022-08-06 | | ||
|rstudio |2022.06.0-daily+477 Spotted Wakerobin (desktop) | | ||
|pandoc |2.18 @ C:/Program Files/RStudio/bin/quarto/bin/tools/ (via rmarkdown) | | ||
|field |value | | ||
|:--------|:---------------------------------| | ||
|version |R version 4.2.0 (2022-04-22 ucrt) | | ||
|os |Windows 10 x64 (build 19044) | | ||
|system |x86_64, mingw32 | | ||
|ui |RTerm | | ||
|language |(EN) | | ||
|collate |English_Canada.utf8 | | ||
|ctype |English_Canada.utf8 | | ||
|tz |America/New_York | | ||
|date |2022-09-24 | | ||
|pandoc |NA | | ||
|
||
# Dependencies | ||
|
||
|package |old |new |Δ | | ||
|:-------------|:------|:------|:--| | ||
|nflreadr |1.2.0 |1.3.0 |* | | ||
|cachem |1.0.6 |1.0.6 | | | ||
|cli |3.3.0 |3.3.0 | | | ||
|curl |4.3.2 |4.3.2 | | | ||
|data.table |1.14.2 |1.14.2 | | | ||
|fastmap |1.1.0 |1.1.0 | | | ||
|glue |1.6.2 |1.6.2 | | | ||
|memoise |2.0.1 |2.0.1 | | | ||
|qs |0.25.3 |NA |* | | ||
|RApiSerialize |0.1.0 |NA |* | | ||
|rappdirs |0.3.3 |0.3.3 | | | ||
|Rcpp |1.0.9 |NA |* | | ||
|RcppParallel |5.1.5 |NA |* | | ||
|rlang |1.0.4 |1.0.4 | | | ||
|stringfish |0.15.7 |NA |* | | ||
|package |old |new |Δ | | ||
|:----------|:------|:------|:--| | ||
|nflreadr |1.3.0 |1.3.1 |* | | ||
|cachem |1.0.6 |1.0.6 | | | ||
|cli |3.4.0 |3.4.0 | | | ||
|curl |4.3.2 |4.3.2 | | | ||
|data.table |1.14.2 |1.14.2 | | | ||
|fastmap |1.1.0 |1.1.0 | | | ||
|glue |1.6.2 |1.6.2 | | | ||
|memoise |2.0.1 |2.0.1 | | | ||
|rappdirs |0.3.3 |0.3.3 | | | ||
|rlang |1.0.5 |1.0.5 | | | ||
|
||
# Revdeps | ||
|