-
Notifications
You must be signed in to change notification settings - Fork 53
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
clean up internal namespace and directly re-export nflreadr functions #508
base: master
Are you sure you want to change the base?
Changes from all commits
5da2401
2180816
2c189bf
9f89a82
31b09e9
a2a11b6
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 |
---|---|---|
|
@@ -103,25 +103,40 @@ | |
# The following block is used by usethis to automatically manage | ||
# roxygen namespace tags. Modify with care! | ||
## usethis namespace: start | ||
#' @import dplyr | ||
#' @import fastrmodels | ||
#' @importFrom cli rule | ||
#' @importFrom curl curl_fetch_memory | ||
#' @importFrom nflreadr load_pbp load_player_stats load_schedules load_rosters nflverse_sitrep | ||
#' @importFrom magrittr %>% | ||
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. import from dplyr |
||
#' @importFrom data.table setDT %between% %chin% | ||
#' @importFrom furrr future_map_chr future_map_dfr future_map | ||
#' @importFrom future plan | ||
#' @importFrom glue glue glue_sql | ||
#' @importFrom janitor clean_names | ||
#' @importFrom lifecycle deprecated | ||
#' @importFrom mgcv predict.bam | ||
#' @importFrom progressr progressor | ||
#' @importFrom rlang .data inform dots_list := .env | ||
#' @importFrom rlang .data inform dots_list := .env %||% | ||
#' @importFrom stats predict na.omit | ||
#' @importFrom stringr str_sub str_replace_all str_length str_extract str_detect str_trim str_remove_all str_split str_extract_all | ||
#' @importFrom tibble as_tibble tibble | ||
#' @importFrom tidyr unnest_wider unnest | ||
#' @importFrom tidyselect any_of ends_with | ||
#' @importFrom utils packageVersion | ||
#' @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 | ||
|
||
## NO LONGER IMPORTED, WILL USE EXPLICIT NAMESPACING INSTEAD | ||
# @import dplyr | ||
# @importFrom cli rule | ||
# @importFrom curl curl_fetch_memory | ||
# @importFrom furrr future_map_chr future_map_dfr future_map | ||
# @importFrom future plan | ||
# @importFrom glue glue glue_sql | ||
# @importFrom janitor clean_names | ||
# @importFrom lifecycle deprecated | ||
# @importFrom mgcv predict.bam | ||
# @importFrom progressr progressor | ||
# @importFrom stringr str_sub str_replace_all str_length str_extract str_detect str_trim str_remove_all str_split str_extract_all | ||
# @importFrom tibble as_tibble tibble | ||
# @importFrom tidyr unnest_wider unnest | ||
# @importFrom tidyselect any_of ends_with | ||
# @importFrom xgboost getinfo |
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.
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