Skip to content
Snippets Groups Projects
Commit d4e3bf1e authored by Dorch's avatar Dorch
Browse files

refactor: change use_reports to create_reports

Refs #3
parent 649695ac
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
export("%>%") export("%>%")
export(add_gitignore) export(add_gitignore)
export(create_fairify) export(create_fairify)
export(create_reports)
export(getDataPath) export(getDataPath)
export(iconv_filename) export(iconv_filename)
export(loadConfig) export(loadConfig)
...@@ -10,5 +11,4 @@ export(pkg_sys) ...@@ -10,5 +11,4 @@ export(pkg_sys)
export(render_report) export(render_report)
export(render_reports) export(render_reports)
export(updateMermaid) export(updateMermaid)
export(use_reports)
importFrom(magrittr,"%>%") importFrom(magrittr,"%>%")
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#' @export #' @export
#' #'
#' @examples #' @examples
use_reports <- function(path = ".", overwrite = FALSE) { create_reports <- function(path = ".", overwrite = FALSE) {
# Copy templates # Copy templates
if (dir.exists(file.path(path, "templates"))) { if (dir.exists(file.path(path, "templates"))) {
if (overwrite) { if (overwrite) {
......
% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/use_reports.R % Please edit documentation in R/create_reports.R
\name{use_reports} \name{create_reports}
\alias{use_reports} \alias{create_reports}
\title{Set reports folder structure} \title{Set reports folder structure}
\usage{ \usage{
use_reports(path = ".", overwrite = FALSE) create_reports(path = ".", overwrite = FALSE)
} }
\arguments{ \arguments{
\item{path}{Destination folder for reports and templates} \item{path}{Destination folder for reports and templates}
......
test_that("create_reports works", {
path <- tempdir()
create_reports(path)
expect_error(create_reports(path))
expect_warning(create_reports(path, overwrite = TRUE))
})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment