Skip to content

Commit

Permalink
autoimport
Browse files Browse the repository at this point in the history
  • Loading branch information
DanChaltiel committed Nov 10, 2024
1 parent f52e419 commit 70890c2
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
22 changes: 12 additions & 10 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,28 @@ importFrom(devtools,as.package)
importFrom(digest,digest)
importFrom(dplyr,"%>%")
importFrom(dplyr,arrange)
importFrom(dplyr,cur_group)
importFrom(dplyr,as_tibble)
importFrom(dplyr,bind_rows)
importFrom(dplyr,desc)
importFrom(dplyr,distinct)
importFrom(dplyr,filter)
importFrom(dplyr,group_by)
importFrom(dplyr,if_else)
importFrom(dplyr,lag)
importFrom(dplyr,last)
importFrom(dplyr,lead)
importFrom(dplyr,left_join)
importFrom(dplyr,mutate)
importFrom(dplyr,n_distinct)
importFrom(dplyr,pull)
importFrom(dplyr,rename)
importFrom(dplyr,rowwise)
importFrom(dplyr,select)
importFrom(dplyr,starts_with)
importFrom(dplyr,summarise)
importFrom(dplyr,ungroup)
importFrom(glue,glue)
importFrom(lifecycle,deprecated)
importFrom(purrr,imap)
importFrom(purrr,keep)
importFrom(purrr,list_rbind)
importFrom(purrr,map)
importFrom(purrr,map2)
Expand All @@ -42,12 +47,12 @@ importFrom(purrr,map_dbl)
importFrom(purrr,map_depth)
importFrom(purrr,map_int)
importFrom(purrr,map_lgl)
importFrom(purrr,modify_if)
importFrom(purrr,pmap)
importFrom(purrr,walk)
importFrom(rlang,caller_arg)
importFrom(rlang,check_installed)
importFrom(rlang,current_env)
importFrom(rlang,hash)
importFrom(rlang,hash_file)
importFrom(rlang,is_installed)
importFrom(rlang,ns_env)
importFrom(rlang,set_names)
Expand All @@ -57,21 +62,18 @@ importFrom(stringr,str_ends)
importFrom(stringr,str_extract)
importFrom(stringr,str_pad)
importFrom(stringr,str_remove)
importFrom(stringr,str_replace)
importFrom(stringr,str_split_1)
importFrom(stringr,str_squish)
importFrom(stringr,str_starts)
importFrom(stringr,str_subset)
importFrom(tibble,as_tibble_col)
importFrom(tibble,deframe)
importFrom(tibble,lst)
importFrom(tibble,tibble)
importFrom(tidyr,complete)
importFrom(tidyr,unchop)
importFrom(utils,capture.output)
importFrom(utils,getParseData)
importFrom(utils,getSrcref)
importFrom(utils,installed.packages)
importFrom(utils,menu)
importFrom(utils,modifyList)
importFrom(utils,stack)
importFrom(withr,defer)
importFrom(withr,with_package)
6 changes: 3 additions & 3 deletions R/ai_ask.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
#' Returns the input dataframe, with column `pkg` being a single-value character
#'
#' @importFrom cli cli_h1 cli_inform
#' @importFrom dplyr distinct filter left_join mutate select
#' @importFrom purrr list_rbind map map2_chr
#' @importFrom tibble deframe
#' @importFrom dplyr distinct filter left_join mutate pull rowwise ungroup
#' @importFrom purrr map2_chr
#' @noRd
autoimport_ask = function(data_imports, ask, ns, importlist_path){
pref_importlist = get_importlist(importlist_path)
Expand Down Expand Up @@ -91,6 +90,7 @@ user_input_1package = function(fun, pkg, ns, select_first){


#' @importFrom cli cli_inform
#' @importFrom dplyr filter
#' @importFrom glue glue
#' @importFrom utils menu
ask_update_importlist = function(user_asked, path="inst/IMPORTLIST"){
Expand Down
10 changes: 5 additions & 5 deletions R/ai_parse.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
#' Uses a rds cache system at file and ref level
#'
#' @importFrom cli cli_h1 cli_inform
#' @importFrom purrr map map_dbl map_depth
#' @importFrom rlang hash hash_file set_names
#' @importFrom stringr str_replace
#' @importFrom tibble lst
#' @importFrom dplyr as_tibble
#' @importFrom purrr imap list_rbind map map_dbl map_depth
#' @importFrom rlang hash hash_file
#' @noRd
#' @keywords internal
autoimport_parse = function(ref_list, cache_path, use_cache, pkg_name, ns,
Expand Down Expand Up @@ -78,10 +77,11 @@ autoimport_parse = function(ref_list, cache_path, use_cache, pkg_name, ns,


#' used in [list_importFrom()], calls [parse_ref()]
#' @importFrom cli cli_abort
#' @importFrom cli cli_abort cli_inform
#' @importFrom dplyr arrange filter mutate pull
#' @importFrom glue glue
#' @importFrom purrr imap list_rbind map_chr
#' @importFrom stringr str_starts
#' @importFrom tibble tibble
#' @noRd
#' @keywords internal
Expand Down
2 changes: 0 additions & 2 deletions R/ai_read.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#'
#' @importFrom cli cli_h1 cli_inform
#' @importFrom purrr imap
#' @importFrom tibble lst
#' @importFrom utils getSrcref
#' @noRd
#' @keywords internal
Expand Down Expand Up @@ -56,4 +55,3 @@ warn_duplicated = function(ref_list, verbose) {
}
invisible(TRUE)
}

2 changes: 1 addition & 1 deletion R/ai_write.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#' Returns nothing of use.
#'
#' @importFrom cli cli_h1 cli_inform
#' @importFrom purrr imap map pmap
#' @importFrom purrr imap map
#' @importFrom stringr str_ends
#' @importFrom tibble tibble
#' @noRd
Expand Down

0 comments on commit 70890c2

Please sign in to comment.