From ef7f31e56f2a1fe3186b13ca7599c6db01ec6440 Mon Sep 17 00:00:00 2001 From: cb4ds Date: Tue, 5 Mar 2019 15:59:01 +0000 Subject: [PATCH] ready for resubmission 0.4.1 --- R/generate_template.R | 2 +- README.md | 4 ++-- cran-comments.md | 5 +++-- man/create_new_application.Rd | 2 +- tests/testthat/test_create_new_application.R | 2 +- vignettes/new-application.Rmd | 6 ------ 6 files changed, 8 insertions(+), 13 deletions(-) diff --git a/R/generate_template.R b/R/generate_template.R index 328be4b..096c130 100755 --- a/R/generate_template.R +++ b/R/generate_template.R @@ -82,7 +82,7 @@ #' create_new_application(name = 'mytestapp', location = tempdir()) #' #' @export -create_new_application <- function(name, location = ".", sampleapp = FALSE) { +create_new_application <- function(name, location, sampleapp = FALSE) { usersep <- .Platform$file.sep newloc <- paste(location, name, sep = usersep) diff --git a/README.md b/README.md index bf7c5e8..3136788 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ These are included to get you started. You can either start with an empty applic ```r library(periscope) -create_new_application('emptyapp') +create_new_application('emptyapp', location = tempdir()) runApp('emptyapp') ``` @@ -48,7 +48,7 @@ runApp('emptyapp') ```r library(periscope) -create_new_application("sampleapp", sampleapp = TRUE) +create_new_application("sampleapp", location = tempdir(), sampleapp = TRUE) runApp('sampleapp') ``` diff --git a/cran-comments.md b/cran-comments.md index 99d76ec..51dc74d 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -2,11 +2,12 @@ This is the initial release for this package to CRAN, and due to this there is a package build NOTE on rhub and win-builder builds about this being a new package release. -Update the package per initial crann comments: +Update the package per initial CRAN submission comments: * single-quoted proper names in Title & Description * added executables to the man (Rd) documentation -* updated tests vignettes and examples to use tempdir() when creating new applications and running tests +* updated package to NOT have a default filesystem location when creating a new templated application +* updated tests vignettes & examples to use tempdir() --- diff --git a/man/create_new_application.Rd b/man/create_new_application.Rd index 175d9bf..e6a6f72 100755 --- a/man/create_new_application.Rd +++ b/man/create_new_application.Rd @@ -4,7 +4,7 @@ \alias{create_new_application} \title{Create a new templated framework application} \usage{ -create_new_application(name, location = ".", sampleapp = FALSE) +create_new_application(name, location, sampleapp = FALSE) } \arguments{ \item{name}{name for the new application and directory} diff --git a/tests/testthat/test_create_new_application.R b/tests/testthat/test_create_new_application.R index 9985b43..8064410 100755 --- a/tests/testthat/test_create_new_application.R +++ b/tests/testthat/test_create_new_application.R @@ -53,7 +53,7 @@ test_that("create_new_application sample", { }) test_that("create_new_application invalid location", { - expect_warning(create_new_application(name = "SOinvalid", location = tempfile(), sampleapp = FALSE), + expect_warning(create_new_application(name = "Invalid", location = tempfile(), sampleapp = FALSE), "Framework creation could not proceed, location=.* does not exist!") }) diff --git a/vignettes/new-application.Rmd b/vignettes/new-application.Rmd index bd31071..d9c0b0c 100755 --- a/vignettes/new-application.Rmd +++ b/vignettes/new-application.Rmd @@ -175,9 +175,6 @@ create_new_application(name = 'mytestapp', location = app_dir, sampleapp = TRUE) This generates a default sample application in a subdirectory named *mytestapp* at the specified location. The location must exist when calling this function. -The location parameter defaults to '.', which means if you leave off this parameter -the application will be created in the current R directory. - *Note*: If the *mytestapp* directory in this location already exists it will not be overwritten - the function will give a warning and exit without modifying the user's system. @@ -208,9 +205,6 @@ create_new_application(name = 'mytestapp', location = app_dir) This generates a default blank application in a subdirectory named *mytestapp* at the specified location. The location must exist when calling this function. -The location parameter defaults to '.', which means if you leave off this parameter -the application will be created in the current R directory. - *Note*: If the *mytestapp* directory in this location already exists it will not be overwritten - the function will give a warning and exit without modifying the user's system.