Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
vertesy committed Oct 24, 2024
1 parent a9a808a commit c1b3af9
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Development/Create_the_ggExpress_Package.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ devtools::load_all("~/GitHub/Packages/PackageTools/")

# Setup ------------------------
repository.dir <- "~/GitHub/Packages/ggExpress/"
(package.name <- basename(repository.dir))
config.path <- file.path(repository.dir, "Development/config.R")

"TAKE A LOOK AT"
Expand Down Expand Up @@ -57,26 +58,37 @@ PackageTools::extract_package_dependencies(repository.dir)

# Try to find and add missing @importFrom statements------------------------------------------------
devtools::load_all("~/GitHub/Packages/PackageTools/")
(ls.scripts.full.path <- list.files(file.path(repository.dir, "R"), full.names = T, pattern = '.R$'))
if (F) {
(excluded.packages <- unlist(strsplit(DESCRIPTION$'depends', split = ", ")))
(ls.scripts.full.path <- list.files(file.path(repository.dir, "R"), full.names = T, pattern = .R$))
for (scriptX in ls.scripts.full.path) {
PackageTools::add_importFrom_statements(scriptX, exclude_packages = excluded.packages)
}
}


# Generate the list of functions ------------------------------------------------
(ls.scripts.full.path <- list.files(file.path(repository.dir, "R"), full.names = T, pattern = '.R$'))
for (scriptX in ls.scripts.full.path) {
PackageTools::list_of_funs_to_markdown(scriptX)
}
file.edit(paste0(repository.dir, "R/list.of.functions.in.", package.name, ".det.md"))
file.edit(paste0(repository.dir, "README.md"))
file.remove(paste0(repository.dir, "/R/list.of.functions.in.", package.name, ".det.md"))

r$PackageTools()
PackageTools::copy_github_badge("active") # Add badge to readme via clipboard
file.edit(paste0(repository.dir, "README.md"))


# Replaces T with TRUE and F with FALSE ------------------------------------------------
(ls.scripts.full.path <- list.files(file.path(repository.dir, "R"), full.names = T, pattern = '.R$'))
for (scriptX in ls.scripts.full.path) {
PackageTools::replace_tf_with_true_false(scriptX)
PackageTools::replace_short_calls(scriptX)
}





0 comments on commit c1b3af9

Please sign in to comment.