Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
vertesy committed Nov 27, 2023
1 parent ba5f07e commit 1544115
Showing 1 changed file with 28 additions and 26 deletions.
54 changes: 28 additions & 26 deletions Development/Create_the_MarkdownReports_Package.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,42 +11,44 @@ devtools::load_all("~/GitHub/Packages/PackageTools/")


# Setup ------------------------
RepositoryDir <- "~/GitHub/Packages/MarkdownReports/"
repository.dir <- "~/GitHub/Packages/MarkdownReports/"
config.path <- file.path(repository.dir, "Development/config.R")

"TAKE A LOOK AT"
file.edit("~/GitHub/Packages/MarkdownReports/Development/config.R")
source("~/GitHub/Packages/MarkdownReports/Development/config.R")
file.edit(config.path)
source(config.path)


PackageTools::document_and_create_package(RepositoryDir, config_file = 'config.R')
# Install your package ------------------------------------------------
PackageTools::document_and_create_package(repository.dir, config_file = 'config.R')
'git add commit push to remote'

PackageTools::copy_github_badge("active")

# Install your package ------------------------------------------------
"disable rprofile by"
rprofile()
devtools::install_local(repository.dir, upgrade = F)

devtools::install_local(RepositoryDir, upgrade = F)
# devtools::

# Test if you can install from github ------------------------------------------------
remote.path <- file.path(DESCRIPTION$'github.user', DESCRIPTION$'package.name')
pak::pkg_install(remote.path)
# unload(PackageTools)
# require("PackageTools")
# # remove.packages("PackageTools")
# unload(DESCRIPTION$'package.name')
# require(DESCRIPTION$'package.name')
# # remove.packages(DESCRIPTION$'package.name')


# CMD CHECK ------------------------------------------------
checkres <- devtools::check(RepositoryDir, cran = FALSE)
checkres <- devtools::check(repository.dir, cran = FALSE)



# Automated Codebase linting to tidyverse style ------------------------------------------------
styler::style_pkg(RepositoryDir)
styler::style_pkg(repository.dir)


# Extract package dependencies ------------------------------------------------
PackageTools::extract_package_dependencies(RepositoryDir)
PackageTools::extract_package_dependencies(repository.dir)


# Visualize function dependencies within the package------------------------------------------------
Expand All @@ -59,30 +61,30 @@ PackageTools::extract_package_dependencies(RepositoryDir)
}


# Try to find and add missing @importFrom statements------------------------------------------------
if (F) {
FNP <- list.files(file.path(RepositoryDir, "R"), full.names = T)


PackageTools::add_importFrom_statements(FNP, exclude_packages = excluded.packages)
# OLD: exclude_packages = c('Stringendo', 'MarkdownHelpers', 'ggplot2', 'ggpubr')
}

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


# Generate the list of functions ------------------------------------------------
for (scriptX in ls.scripts.full.path) {
PackageTools::list_of_funs_to_markdown(scriptX)
}

PackageTools::copy_github_badge("active") # Add badge to readme via clipboard

# Generate the list of functions ------------------------------------------------
PackageTools::parse_roxygen(FNP)

# Replaces T with TRUE and F with FALSE ------------------------------------------------
for (scriptX in ls.scripts.full.path) {
PackageTools::replace_tf_with_true_false(scriptX)
}


0 comments on commit 1544115

Please sign in to comment.