Skip to content

Commit

Permalink
update after cran feedbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinFay committed Jul 2, 2019
1 parent da17c1f commit 2a5aef5
Show file tree
Hide file tree
Showing 33 changed files with 715 additions and 1,329 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
^LICENSE\.md$
^CODE_OF_CONDUCT\.md$
^app\.R$
^cran-comments\.md$
12 changes: 6 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ Authors@R:
family = "Guyader",
role = c("cre", "aut"),
email = "[email protected]",
comment = structure("0000-0003-0671-9270", .Names = "ORCID")),
comment = c(ORCID = "0000-0003-0671-9270")),
person(given = "Colin",
family = "Fay",
role = "aut",
email = "[email protected]",
comment = structure("0000-0001-7343-1846", .Names = "ORCID")),
comment = c(ORCID = "0000-0001-7343-1846")),
person(given = "Sébastien",
family = "Rochette",
role = "aut",
email = "[email protected]",
comment = structure("0000-0002-1565-9313", .Names = "ORCID")),
comment = c(ORCID = "0000-0002-1565-9313")),
person(given = "Cervan",
family = "Girard",
role = "aut",
email = "[email protected]",
comment = structure("0000-0002-4816-4624", .Names = "ORCID")),
comment = c(ORCID = "0000-0002-4816-4624")),
person(given = "ThinkR",
role = "cph"))
Description: An opinionated framework for building a
Expand All @@ -39,6 +39,7 @@ Imports:
crayon,
desc,
dockerfiler,
DT,
glue,
htmltools,
pkgload,
Expand All @@ -58,7 +59,6 @@ Imports:
yesno
Suggests:
covr,
DT,
knitr,
pkgdown,
purrr,
Expand All @@ -69,5 +69,5 @@ VignetteBuilder:
knitr
Encoding: UTF-8
LazyData: true
RoxygenNote: 6.1.1
Roxygen: list(markdown = TRUE)
RoxygenNote: 6.1.1
676 changes: 2 additions & 674 deletions LICENSE

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License

Copyright (c) 2018 ThinkR
Copyright (c) 2019 ThinkR

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
146 changes: 74 additions & 72 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,72 +1,74 @@
# Generated by roxygen2: do not edit by hand

export(activate_js)
export(add_css_file)
export(add_dockerfile)
export(add_dockerfile_heroku)
export(add_dockerfile_shinyproxy)
export(add_js_file)
export(add_js_handler)
export(add_module)
export(add_rstudioconnect_file)
export(add_shinyappsio_file)
export(add_shinyserver_file)
export(add_ui_server_files)
export(app_dev)
export(app_prod)
export(browser_button)
export(browser_dev)
export(cat_dev)
export(create_golem)
export(detach_all_attached)
export(document_and_reload)
export(expect_html_equal)
export(expect_shinytag)
export(expect_shinytaglist)
export(favicon)
export(fill_desc)
export(get_dependencies)
export(get_golem_options)
export(invoke_js)
export(make_dev)
export(message_dev)
export(print_dev)
export(remove_favicon)
export(set_golem_options)
export(use_favicon)
export(use_recommended_deps)
export(use_recommended_tests)
export(use_utils_server)
export(use_utils_ui)
export(warning_dev)
export(with_golem_options)
importFrom(attempt,attempt)
importFrom(attempt,stop_if_not)
importFrom(attempt,without_warning)
importFrom(cli,cat_bullet)
importFrom(cli,cat_line)
importFrom(cli,cat_rule)
importFrom(desc,description)
importFrom(glue,glue)
importFrom(htmltools,includeScript)
importFrom(htmltools,save_html)
importFrom(htmltools,tags)
importFrom(pkgload,load_all)
importFrom(rlang,enquo)
importFrom(roxygen2,roxygenise)
importFrom(rstudioapi,isAvailable)
importFrom(rstudioapi,openProject)
importFrom(shiny,getShinyOption)
importFrom(stats,setNames)
importFrom(stringr,str_remove_all)
importFrom(testthat,expect)
importFrom(testthat,expect_equal)
importFrom(testthat,quasi_label)
importFrom(usethis,use_package)
importFrom(usethis,use_testthat)
importFrom(utils,capture.output)
importFrom(utils,file.edit)
importFrom(utils,getFromNamespace)
importFrom(utils,installed.packages)
importFrom(utils,sessionInfo)
importFrom(yesno,yesno)
# Generated by roxygen2: do not edit by hand

export(activate_js)
export(add_css_file)
export(add_dockerfile)
export(add_dockerfile_heroku)
export(add_dockerfile_shinyproxy)
export(add_js_file)
export(add_js_handler)
export(add_module)
export(add_rstudioconnect_file)
export(add_shinyappsio_file)
export(add_shinyserver_file)
export(add_ui_server_files)
export(app_dev)
export(app_prod)
export(browser_button)
export(browser_dev)
export(cat_dev)
export(create_golem)
export(detach_all_attached)
export(document_and_reload)
export(expect_html_equal)
export(expect_shinytag)
export(expect_shinytaglist)
export(favicon)
export(fill_desc)
export(get_dependencies)
export(get_golem_options)
export(invoke_js)
export(make_dev)
export(message_dev)
export(print_dev)
export(remove_favicon)
export(set_golem_options)
export(use_favicon)
export(use_recommended_deps)
export(use_recommended_tests)
export(use_utils_server)
export(use_utils_ui)
export(warning_dev)
export(with_golem_options)
importFrom(attempt,attempt)
importFrom(attempt,stop_if_not)
importFrom(attempt,without_warning)
importFrom(cli,cat_bullet)
importFrom(cli,cat_line)
importFrom(cli,cat_rule)
importFrom(desc,description)
importFrom(glue,glue)
importFrom(htmltools,includeScript)
importFrom(htmltools,save_html)
importFrom(htmltools,tags)
importFrom(pkgload,load_all)
importFrom(pkgload,pkg_name)
importFrom(rlang,enquo)
importFrom(roxygen2,roxygenise)
importFrom(rstudioapi,isAvailable)
importFrom(rstudioapi,openProject)
importFrom(shiny,getShinyOption)
importFrom(stats,setNames)
importFrom(stringr,str_remove_all)
importFrom(testthat,expect)
importFrom(testthat,expect_equal)
importFrom(testthat,quasi_label)
importFrom(usethis,use_build_ignore)
importFrom(usethis,use_package)
importFrom(usethis,use_testthat)
importFrom(utils,capture.output)
importFrom(utils,file.edit)
importFrom(utils,getFromNamespace)
importFrom(utils,installed.packages)
importFrom(utils,sessionInfo)
importFrom(yesno,yesno)
51 changes: 31 additions & 20 deletions R/add_deploy_helpers.R
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
#' Add an app.R at the root of your package to deploy on RStudio Connect
#'
#' @note
#' In previous versions, this function was called add_rconnect_file.
#'
#' @param pkg Where to put the app.R.
#' @param open Open the file
#' @inheritParams add_module
#' @importFrom utils capture.output
#' @importFrom cli cat_bullet
#' @aliases add_rconnect_file add_rstudioconnect_file
#' @export
#' @rdname rstudio_deploy
add_rstudioconnect_file <- function(
#' @importFrom usethis use_build_ignore use_package
#' @importFrom pkgload pkg_name
add_rstudio_files <- function(
pkg = ".",
open = TRUE,
service = c("RStudio Connect", "Shiny Server", "ShinyApps.io")
Expand All @@ -24,7 +16,7 @@ add_rstudioconnect_file <- function(
write(..., here, append = TRUE)
}
file.create( where )
usethis::use_build_ignore( basename(where) )
use_build_ignore( basename(where) )
write_there("# Launch the ShinyApp (Do not remove this comment)")
write_there("# To deploy, run: rsconnect::deployApp()")
write_there("# Or use the blue button on top of this file")
Expand All @@ -34,40 +26,59 @@ add_rstudioconnect_file <- function(
write_there(
sprintf(
"%s::run_app() # add parameters here (if any)",
getOption("golem.app.name", pkgload::pkg_name())
getOption("golem.app.name", pkg_name())
)
)
usethis::use_build_ignore(where)
usethis::use_package("pkgload")
#use_build_ignore(where)
x <- capture.output(use_package("pkgload"))
cat_green_tick(glue("File created at {where}"))
cat_line("To deploy, run:")
cat_bullet(darkgrey("rsconnect::deployApp()\n"))
cat_red_bullet(
sprintf(
"Note that you'll need to upload the whole package to %s",
service)
service
)
)


if (rstudioapi::isAvailable() & open){
rstudioapi::navigateToFile(where)
} else {
cat_red_bullet(
glue::glue("Go to {where}")
sprintf("Go to %s", where)
)
}
}

#' Add an app.R at the root of your package to deploy on RStudio Connect
#'
#' @note
#' In previous versions, this function was called add_rconnect_file.
#'
#' @param pkg Where to put the app.R.
#' @param open Open the file
#' @inheritParams add_module
#' @aliases add_rconnect_file add_rstudioconnect_file
#' @export
#' @rdname rstudio_deploy
add_rstudioconnect_file <- function(
pkg = ".",
open = TRUE
){
add_rstudio_files(pkg = pkg, open = open, service = "RStudio Connect")
}

#' @rdname rstudio_deploy
#' @export
add_shinyappsio_file <- function(pkg = ".", open = TRUE){
add_rstudioconnect_file(pkg = pkg, open = open, service = "ShinyApps.io")
add_rstudio_files(pkg = pkg, open = open, service = "ShinyApps.io")
}

#' @rdname rstudio_deploy
#' @export
add_shinyserver_file <- function(pkg = ".", open = TRUE){
add_rstudioconnect_file(pkg = pkg, open = open, service = "Shiny Server")
add_rstudio_files(pkg = pkg, open = open, service = "Shiny Server")
}

#' Create a Dockerfile for Shiny App
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,5 @@ Read [Deploying Apps with {golem}](https://thinkr-open.github.io/golem/articles/

## CoC

Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md).
Please note that this project is released with a [Contributor Code of Conduct](https://www.contributor-covenant.org/version/1/0/0/code-of-conduct.html).
By participating in this project you agree to abide by its terms.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,5 @@ Vignette for a detailed walkthrough.
## CoC

Please note that this project is released with a [Contributor Code of
Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree
to abide by its terms.
Conduct](https://www.contributor-covenant.org/version/1/0/0/code-of-conduct.html).
By participating in this project you agree to abide by its terms.
44 changes: 44 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
## Test environments
* local OS X install, R 3.6.0
* ubuntu 14.04 (on travis-ci), R 3.6.0
* win-builder (devel and release)

## R CMD check results

0 errors | 0 warnings | 1 note

* This is a resubmission.

Feedbacks from previous submission:

```
Found the following (possibly) invalid URLs:
URL:
From: inst/doc/c_deploy.html
inst/doc/d_js.html
Message: Empty URL
remove empty references.
```

-> We filled the URL so they are not empty anymore

```
Found the following (possibly) invalid file URI:
URI: CODE_OF_CONDUCT.md
From: README.md
The file is not part of the package, perhaps link to it via a fully
specified URL?
```

-> Changed the Code of conduct link to full url

```
We also see you declared > License: MIT + file LICENSE
where the license file should be the CRAN template for the MIT license,
but actually it contains a copy of the GPL-3? Is this meant as an
alternative licence?
```

-> We switched to a full MIT licence
Loading

0 comments on commit 2a5aef5

Please sign in to comment.