Skip to content

Commit

Permalink
fixes for check
Browse files Browse the repository at this point in the history
  • Loading branch information
DanChaltiel committed Nov 11, 2024
1 parent 72db7cc commit 365ff30
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 14 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ DEV\.R
^CRAN-RELEASE$
^codemeta\.json$
^CRAN-SUBMISSION$
^internal\.md$
2 changes: 2 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ Imports:
Suggests:
callr,
covr,
devtools,
knitr,
pkgload,
rstudioapi,
testthat (>= 3.0.0),
tidyverse
Expand Down
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

export(autoimport)
export(import_review)
export(review_files)
export(update_importlist)
importFrom(cli,cli_abort)
importFrom(cli,cli_h1)
Expand Down Expand Up @@ -73,4 +72,5 @@ importFrom(utils,getSrcref)
importFrom(utils,installed.packages)
importFrom(utils,menu)
importFrom(utils,modifyList)
importFrom(utils,sessionInfo)
importFrom(utils,stack)
8 changes: 7 additions & 1 deletion R/autoimport-package.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
utils::globalVariables(c(".", "x", "y", "fun", "pkg", "value", "values", "ind",
"tmp", "label", "action", "token", "text", "what", "from",
"fun_imported", "pkg_n_imports", "pkg_in_desc",
"pref_pkg", "package", "pkg_bak"))
"pref_pkg", "package", "pkg_bak", "cache_dir", "defined_in_importlist",
"details", "fun_already_imported", "fun_is_base", "fun_is_inner",
"fun_is_private", "operator", "sessionInfo", "source_fun"))

# x="cache_dir defined_in_importlist details fun_already_imported"
# str_split_1(x, "\\s+") %>% cat(sep='", "')


#' @keywords internal
#' @name autoimport-package
Expand Down
1 change: 1 addition & 0 deletions R/autoimport.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#' @importFrom cli cli_abort cli_h1 cli_inform
#' @importFrom purrr map walk
#' @importFrom rlang check_installed current_env set_names
#' @importFrom utils sessionInfo
autoimport = function(root=".",
files=get_R_dir(root),
namespace_file="NAMESPACE",
Expand Down
7 changes: 3 additions & 4 deletions R/decision.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,12 @@ import_review = function(source_path="R/",
}


#' @rdname import_review
#' @param path,output_path mostly used for tests
#' @description NULL
#' @export

#' @importFrom digest digest
#' @importFrom purrr map2_lgl
#' @importFrom tibble tibble
#' @noRd
#' @keywords internal
review_files = function(source_path="R/", output_path=get_target_dir()){
old_files = dir(source_path, full.names=TRUE)
assert_file_exists(old_files)
Expand Down
1 change: 1 addition & 0 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ get_cache_path = function(root="."){

#' @noRd
#' @keywords internal
#' @importFrom cli cli_abort
clean_cache = function(root="."){
cache_file = get_cache_path(root)
rslt = unlink(cache_dir, recursive=TRUE)
Expand Down
3 changes: 0 additions & 3 deletions man/autoimport.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions man/import_review.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 365ff30

Please sign in to comment.