-
Notifications
You must be signed in to change notification settings - Fork 53
clean up internal namespace and directly re-export nflreadr functions #508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
5da2401
2180816
2c189bf
9f89a82
31b09e9
a2a11b6
b297eb9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,6 +52,7 @@ Imports: | |
glue, | ||
janitor, | ||
lifecycle, | ||
magrittr, | ||
mgcv, | ||
nflreadr (>= 1.2.0), | ||
progressr (>= 0.6.0), | ||
|
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,10 +105,22 @@ | |
## usethis namespace: start | ||
#' @import dplyr | ||
#' @import fastrmodels | ||
#' @importFrom nflreadr load_pbp load_player_stats load_schedules load_rosters nflverse_sitrep | ||
#' @importFrom data.table %between% %chin% | ||
#' @importFrom rlang .data := .env %||% | ||
# We have to import something from xgboost because it is listed as dependency to | ||
# be able to apply models. | ||
#' @importFrom xgboost getinfo | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nflfastR needs xgboost to apply the models but there is no actual function call to xgboost which results in a R CMD Check note. That's why I import a dummy. |
||
## usethis namespace: end | ||
NULL | ||
|
||
#' @export | ||
nflreadr::load_pbp | ||
#' @export | ||
nflreadr::load_player_stats | ||
#' @export | ||
nflreadr::load_schedules | ||
#' @export | ||
nflreadr::load_rosters | ||
#' @export | ||
nflreadr::nflverse_sitrep |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +0,0 @@ | ||
#' Get a Situation Report on System, nflverse Package Versions and Dependencies | ||
#' | ||
#' @description This function gives a quick overview of the versions of R and | ||
#' the operating system as well as the versions of nflverse packages, options, | ||
#' and their dependencies. It's primarily designed to help you get a quick | ||
#' idea of what's going on when you're helping someone else debug a problem. | ||
#' @details See [`nflreadr::nflverse_sitrep`] for details. | ||
#' @inheritDotParams nflreadr::nflverse_sitrep | ||
#' @inherit nflreadr::nflverse_sitrep | ||
#' @examples | ||
#' \donttest{ | ||
#' \dontshow{ | ||
#' # set CRAN mirror to avoid failing checks in weird scenarios | ||
#' old_ops <- options(repos = c("CRAN" = "https://cran.rstudio.com/")) | ||
#' } | ||
#' | ||
#' report(recursive = FALSE) | ||
#' nflverse_sitrep(pkg = "nflreadr", recursive = TRUE) | ||
#' | ||
#' \dontshow{ | ||
#' # restore old options | ||
#' options(old_ops) | ||
#' } | ||
#' } | ||
#' @export | ||
report <- function(...) nflreadr::nflverse_sitrep(...) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not happy with silently dropping the function |
||
|
||
#' @export | ||
#' @name nflverse_sitrep | ||
#' @rdname report | ||
#' @importFrom nflreadr nflverse_sitrep | ||
NULL | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -466,7 +466,6 @@ fast_scraper <- function(game_ids, | |
|
||
#' Load Team Rosters for Multiple Seasons | ||
#' @details See [`nflreadr::load_rosters`] for details. | ||
#' @inheritDotParams nflreadr::load_rosters | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This produces in a check warning |
||
#' @inherit nflreadr::load_rosters | ||
#' @seealso For information on parallel processing and progress updates please | ||
#' see [nflfastR]. | ||
|
@@ -484,7 +483,6 @@ fast_scraper_roster <- function(...) nflreadr::load_rosters(...) | |
|
||
#' Load NFL Season Schedules | ||
#' @details See [`nflreadr::load_schedules`] for details. | ||
#' @inheritDotParams nflreadr::load_schedules | ||
#' @inherit nflreadr::load_schedules | ||
#' @seealso For information on parallel processing and progress updates please | ||
#' see [nflfastR]. | ||
|
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.
This file was deleted.
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to get rid of the magrittr pipe and never imported it because the pipe is reexported in dplyr and we need to watch the number of dependencies