Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@ export(add_positconnect_file)
export(add_r6)
export(add_resource_path)
export(add_rscignore_file)
export(add_rstudioconnect_file)
export(add_sass_file)
export(add_shinyappsio_file)
export(add_shinyserver_file)
export(add_ui_server_files)
export(add_utils)
export(amend_golem_config)
export(app_dev)
Expand All @@ -51,7 +49,6 @@ export(get_golem_name)
export(get_golem_options)
export(get_golem_version)
export(get_golem_wd)
export(get_sysreqs)
export(golem_welcome_page)
export(install_dev_deps)
export(invoke_js)
Expand Down Expand Up @@ -87,7 +84,6 @@ export(use_internal_html_template)
export(use_internal_js_file)
export(use_module_test)
export(use_readme_rmd)
export(use_recommended_deps)
export(use_recommended_tests)
export(use_utils_server)
export(use_utils_test_server)
Expand Down
16 changes: 16 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@

- `{golem}` functions used to rely on arguments that where either `wd`, `path`, `pkg` or `golem_wd`. This has now been standardized and all functions rely on `golem_wd` now (@ilyaZar, #845)

- `get_sysreqs()` has been removed; use `dockerfiler::get_sysreqs()` instead.

- `use_recommended_deps()` has been removed.

- `add_ui_server_files()` has been removed.

- `add_rstudioconnect_file()` has been removed; use `add_positconnect_file()` instead.

- Creating a `golem` doesn't call `set_here()` nor `usethis::create_project()` anymore. It used to be because we wanted to be able to use `here::here()`, but the function should be able to find its way based using `DESCRIPTION`. It gives a lighter implementation of golem projects creation as it doesn't mess up with where `here()` is anymore.

- The `add_*_files` and `use_*_files` now fail when:
Expand All @@ -26,6 +34,14 @@

- `run_dev()` only prints one message (#1191 / @howardbaik)

## Soft deprecated

- `browser_button()` is now soft deprecated (#1155)

- `add_dockerfile()`, `add_dockerfile_shinyproxy()`, and
`add_dockerfile_heroku()` are now explicitly soft deprecated; use the
corresponding `add_dockerfile_with_renv_*()` functions.

## Bug fix

- Removing the comments on golem creation didn't work fully, this has been fixed.
Expand Down
16 changes: 16 additions & 0 deletions R/add_dockerfiles.R
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ talk_once <- function(
#' an updated tar.gz is created.
#' @param extra_sysreqs character vector. Extra debian system requirements.
#'
#' @note `add_dockerfile()`, `add_dockerfile_shinyproxy()`, and
#' `add_dockerfile_heroku()` are now soft deprecated; use the corresponding
#' `add_dockerfile_with_renv_*()` functions instead.
#'
#' @export
#' @rdname dockerfiles
#'
Expand Down Expand Up @@ -122,6 +126,10 @@ add_dockerfile <- function(
),
"pkg"
)
.Deprecated(
old = "add_dockerfile",
msg = "add_dockerfile() is currently soft deprecated and will be removed in future versions of {golem}.\nPlease use add_dockerfile_with_renv() instead."
)
add_dockerfile_(
path = path,
output = output,
Expand Down Expand Up @@ -257,6 +265,10 @@ add_dockerfile_shinyproxy <- function(
),
"pkg"
)
.Deprecated(
old = "add_dockerfile_shinyproxy",
msg = "add_dockerfile_shinyproxy() is currently soft deprecated and will be removed in future versions of {golem}.\nPlease use add_dockerfile_with_renv_shinyproxy() instead."
)
add_dockerfile_shinyproxy_(
path = path,
output = output,
Expand Down Expand Up @@ -382,6 +394,10 @@ add_dockerfile_heroku <- function(
),
"pkg"
)
.Deprecated(
old = "add_dockerfile_heroku",
msg = "add_dockerfile_heroku() is currently soft deprecated and will be removed in future versions of {golem}.\nPlease use add_dockerfile_with_renv_heroku() instead."
)
add_dockerfile_heroku_(
path = path,
output = output,
Expand Down
120 changes: 0 additions & 120 deletions R/add_files.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
#' @importFrom attempt stop_if
#' @importFrom utils file.edit
#'
#' @note `add_ui_server_files` will be deprecated in future version of `{golem}`
#'
#' @seealso \code{\link{js_template}}, \code{\link{js_handler_template}}, and \code{\link{css_template}}
#'
#' @return The path to the file, invisibly.
Expand Down Expand Up @@ -911,121 +909,3 @@ add_partial_html_template <- function(
open = open
)
}

#' @export
#' @rdname add_files
add_ui_server_files <- function(
golem_wd = get_golem_wd(),
dir = "inst/app",
dir_create,
pkg
) {
signal_arg_is_deprecated(
pkg,
fun = as.character(
sys.call()[[1]]
),
"pkg"
)
if (
!missing(
dir_create
)
) {
cli_abort_dir_create()
}
.Deprecated(
msg = "This function will be deprecated in a future version of {golem}.\nPlease comment on https://github.com/ThinkR-open/golem/issues/445 if you want it to stay."
)

old <- setwd(
fs_path_abs(
golem_wd
)
)
on.exit(
setwd(
old
)
)

dir <- fs_path_abs(
dir
)
check_directory_exists(
dir
)

# UI
where <- fs_path(
dir,
"ui.R"
)

if (
!fs_file_exists(
where
)
) {
fs_file_create(
where
)

write_there <- write_there_builder(
where
)

pkg <- get_golem_name()

write_there(
sprintf(
"%s:::app_ui()",
pkg
)
)

cat_created(
where,
"ui file"
)
} else {
cli_alert_info(
"UI file already exists."
)
}

# server
where <- file.path(
dir,
"server.R"
)

if (
!fs_file_exists(
where
)
) {
fs_file_create(
where
)

write_there <- write_there_builder(
where
)

write_there(
sprintf(
"%s:::app_server",
pkg
)
)
cat_created(
where,
"server file"
)
} else {
cli_alert_info(
"Server file already exists."
)
}
}
26 changes: 1 addition & 25 deletions R/add_rstudio_files.R
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ add_rstudio_files <- function(
#'
#'
#' @inheritParams add_module
#' @aliases add_rconnect_file add_rstudioconnect_file add_positconnect_file
#' @aliases add_rconnect_file add_positconnect_file
#' @export
#'
#' @rdname rstudio_deploy
Expand Down Expand Up @@ -190,30 +190,6 @@ add_positconnect_file <- function(
)
}

#' @rdname rstudio_deploy
#' @note `add_rstudioconnect_file` is now deprecated; replace by [add_positconnect_file()].
#' @export
add_rstudioconnect_file <- function(
golem_wd = get_golem_wd(),
open = TRUE,
pkg
) {
signal_arg_is_deprecated(
pkg,
fun = as.character(
sys.call()[[1]]
),
"pkg"
)
.Deprecated(
"add_positconnect_file"
)
add_positconnect_file(
golem_wd = get_golem_wd(),
open = TRUE
)
}

#' @rdname rstudio_deploy
#' @export
add_shinyappsio_file <- function(
Expand Down
7 changes: 7 additions & 0 deletions R/browser_button.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@
#'
#' See \url{https://rtask.thinkr.fr/a-little-trick-for-debugging-shiny/} for more context.
#'
#' @note `browser_button()` is now soft deprecated and will be removed in a
#' future version of `{golem}`.
#'
#' @return Used for side effects.
#' Prints the code to the console.
#' @export
#'

browser_button <- function() {
.Deprecated(
old = "browser_button",
msg = "browser_button() is currently soft deprecated and will be removed in future versions of {golem}."
)
cli_cat_rule(
"To be copied in your UI"
)
Expand Down
16 changes: 8 additions & 8 deletions R/desc.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
#' @param repo_url URL (if needed)
#' @param pkg_version The version of the package. Default is 0.0.0.9000
#' @param pkg Path to look for the DESCRIPTION. Default is `get_golem_wd()`.
#' @param author_first_name to be deprecated: use character for first name via
#' `authors = person(given = "authors_first_name")` instead
#' @param author_last_name to be deprecated: use character for last name via
#' `authors = person(given = "authors_last_name")` instead
#' @param author_email to be deprecated: use character for first name via
#' `authors = person(email = "author_email")` instead
#' @param author_orcid to be deprecated
#' @param author_first_name Deprecated: use `authors = person(given = ...)`
#' instead
#' @param author_last_name Deprecated: use `authors = person(family = ...)`
#' instead
#' @param author_email Deprecated: use `authors = person(email = ...)` instead
#' @param author_orcid Deprecated: use `authors = person(comment = c(ORCID = ...))`
#' instead
#' @param set_options logical; the default `TRUE` sets all recommended
#' options but this can be suppressed with `FALSE`. For details on the
#' exact behaviour see the help [set_golem_options()].
Expand Down Expand Up @@ -79,7 +79,7 @@ fill_desc <- function(

if (!any_author_params_is_not_null) {
warning(
"The `author_first_name`, `author_last_name`, `author_email` and `author_orcid` parameters will be deprecated from fill_desc() in the next version of {golem}. \nPlease use the `authors` parameter instead.\nSee ?person for more details on how to use it."
"The `author_first_name`, `author_last_name`, `author_email` and `author_orcid` parameters of `fill_desc()` are deprecated and will be removed in a future version of {golem}. \nPlease use the `authors` parameter instead.\nSee ?person for more details on how to use it."
)
# Case 1.1 : old author params are null and authors is empty
if (
Expand Down
25 changes: 0 additions & 25 deletions R/get_sysreqs.R

This file was deleted.

Loading
Loading