Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
acbaea4
Re-build README.md
ColinFay Aug 16, 2024
8372c4e
Re-build README.md
ColinFay Aug 19, 2024
c36f946
refactor: split use_external/internal, and wrapped download/copy to f…
ColinFay Aug 26, 2024
95735eb
feat: checking the url extension now throws an error if the extension…
ColinFay Aug 26, 2024
26e931f
refactor: use build_name inside external
ColinFay Aug 26, 2024
8c5910f
refactor: split into two files
ColinFay Aug 26, 2024
82b5508
feat: the function creation files now fail if the dir doesn't not exist
ColinFay Aug 27, 2024
b3a1320
feat: use_*_files now throws an error if the file already exists
ColinFay Aug 27, 2024
c24e07e
refactor: checks are performed at the top of the function
ColinFay Aug 27, 2024
7722dfb
fix: define name before
ColinFay Aug 27, 2024
105ea66
refactor: using basename of where instead of name in file_created_dance
ColinFay Aug 27, 2024
b8f9e15
refactor: merging check_file_exists and download_external
ColinFay Aug 27, 2024
84cf0ae
refactor: merged check_file_exists and copy_internal_file
ColinFay Aug 27, 2024
4b590f2
refactor: renaming params
ColinFay Aug 27, 2024
705b6e1
fix: fixing issue with recursive utils_download_file
ColinFay Aug 27, 2024
dcd16a9
Re-build README.md
ColinFay Aug 27, 2024
5490a56
Merge branch 'dev' into cp-1022
ColinFay Aug 27, 2024
9ac5ede
refactor: merging check & download
ColinFay Aug 27, 2024
dbd3acf
refactor: merged perform_checks_and_download_if_everything_is_ok & fi…
ColinFay Aug 27, 2024
598fe99
refactor: merged perform_check and file_created dance
ColinFay Aug 27, 2024
23905aa
refactor: where_to_download moved inside the function
ColinFay Aug 27, 2024
461bb5a
refactor: where_to_download moved inside the function
ColinFay Aug 27, 2024
149ce19
fix: correct param name
ColinFay Aug 27, 2024
75af1ba
refactor: path_abs as input
ColinFay Aug 27, 2024
0a4dcab
refactor: name is now built inside perform_checks_and_download_if_eve…
ColinFay Aug 27, 2024
cbdc7f3
refactor: moving setwd() inside perform_checks_and_download_if_everyt…
ColinFay Aug 27, 2024
c16f135
fix: correct params in build_name
ColinFay Aug 27, 2024
d0d3276
refactor: path_abs(dir) as param
ColinFay Aug 27, 2024
2165bf9
feat: changed extension error message
ColinFay Aug 27, 2024
ccfd1d1
test: update snapshot
ColinFay Aug 27, 2024
88c58f6
refactor: where_to_copy_to is inside perform_checks_and_copy_if_every…
ColinFay Aug 27, 2024
f835ffc
refactor: name & setwd now in wrapper fun
ColinFay Aug 27, 2024
5b331d5
feat: deprecate the dir_create param
ColinFay Aug 27, 2024
598fc7f
refactor: rm name from file_create_dance in use_file
ColinFay Aug 27, 2024
0480655
refactor: rm the open_or_go_to arg from file_created_dance
ColinFay Aug 27, 2024
86328b3
Merge branch 'dev' into cp-1022
ColinFay Aug 27, 2024
5801c0f
doc: news update
ColinFay Aug 27, 2024
13376fe
doc: forgot to push the man
ColinFay Aug 27, 2024
f6fe0e3
Re-build README.md
ColinFay Aug 27, 2024
069d9e6
fix: use_internal_file doesnt strip the extension anymore
ColinFay Sep 3, 2024
678ebbc
refactor: add_file now uses the use_internal_ logic
ColinFay Sep 4, 2024
c7742a4
refactor: refactoring write_there
ColinFay Sep 4, 2024
753c06c
style: styler
ColinFay Sep 4, 2024
7051773
chore: this check is not necessary anymore
ColinFay Sep 6, 2024
c157318
refactor: one message for deprecation
ColinFay Sep 6, 2024
44b6ef2
test: adding tests that it fails if the dir_create arg is provided
ColinFay Sep 6, 2024
94c19a4
doc: news update & version
ColinFay Sep 6, 2024
e9727d3
doc: forgot to push the doc
ColinFay Sep 6, 2024
8bfa224
Re-build README.md
ColinFay Sep 6, 2024
7d748b8
feat: breaking change - removing set_here() from creation and deps
ColinFay Sep 6, 2024
19c524f
Re-build README.md
ColinFay Sep 6, 2024
0d1f224
chore: dev version bump
ColinFay Sep 6, 2024
841e6a3
Re-build README.md
ColinFay Sep 6, 2024
fcb2842
feat: create_golem no longer calls usethis::create_project
ColinFay Sep 6, 2024
38cf66f
chore: rm unused usethis boostraped code
ColinFay Sep 6, 2024
544a7b7
test: now using create_golem in tests
ColinFay Sep 6, 2024
7cd0148
test: testing golem creation + fixing removecomment issue
ColinFay Sep 6, 2024
ecfc33a
test: create_golem with git
ColinFay Sep 6, 2024
d40310a
chore: desc & news
ColinFay Sep 6, 2024
4762236
Re-build README.md
ColinFay Sep 6, 2024
46b1d3c
feat: make activate_js conditional
ColinFay May 2, 2025
3133ccb
doc: redoc
ColinFay May 2, 2025
0fdcb17
test: removing the repo in tests
ColinFay May 2, 2025
e881f98
test: with expect_installed
ColinFay May 2, 2025
425f87d
test: using the dev_deps vector instead
ColinFay May 2, 2025
e9a8e59
chore: unused com
ColinFay May 2, 2025
dd90852
Re-build README.md
ColinFay May 2, 2025
c654ec3
chore: version bump
ColinFay May 2, 2025
5719195
Re-build README.md
ColinFay May 2, 2025
6b44a00
chore: resolve conflict
VincentGuyader May 2, 2025
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: 1 addition & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: golem
Title: A Framework for Robust Shiny Applications
Version: 0.5.1
Version: 0.5.1.9005
Authors@R: c(
person("Colin", "Fay", , "contact@colinfay.me", role = c("cre", "aut"),
comment = c(ORCID = "0000-0001-7343-1846")),
Expand Down Expand Up @@ -28,7 +28,6 @@ Depends:
Imports:
attempt (>= 0.3.0),
config,
here,
htmltools,
rlang (>= 1.0.0),
shiny (>= 1.5.0),
Expand Down Expand Up @@ -69,7 +68,6 @@ Suggests:
VignetteBuilder:
knitr
Config/testthat/edition: 3
Config/testthat/parallel: true
Encoding: UTF-8
Language: en-US
Roxygen: list(markdown = TRUE)
Expand Down
21 changes: 21 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
> Notes: the # between parenthesis refers to the related issue on GitHub, and the @ refers to an external contributor solving this issue.


# golem 0.5.1 to 0.6.0

## Breaking change

- 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:
- The directory where the user tries to add the file doesn't exist. `{golem}` used to try to create the directory but that's not the function job — use_*_file functions should only be there to add file (Singe responsabily )
- The file that the user tries to create already exists

- Creating a golem with `create_golem(overwrite = TRUE)` will now __delete the old folder__ and replace with the golem skeleton.

## Bug fix

- Removing the comments on golem creation didn't work fully, this has been fixed.

## Internal changes

- Full refactoring of the `add_*_files` and `use_*_files` functions that now all share the same behavior

# golem 0.5.1

* Hotfixing a bug with utils_download_file (#1168)
Expand Down
219 changes: 112 additions & 107 deletions R/add_dockerfiles.R
Original file line number Diff line number Diff line change
Expand Up @@ -83,25 +83,26 @@ talk_once <- function(.f, msg = "") {
#' }
#' @return The `{dockerfiler}` object, invisibly.
add_dockerfile <- function(
path = "DESCRIPTION",
output = "Dockerfile",
pkg = get_golem_wd(),
from = paste0(
"rocker/verse:",
R.Version()$major,
".",
R.Version()$minor
),
as = NULL,
port = 80,
host = "0.0.0.0",
sysreqs = TRUE,
repos = c(CRAN = "https://cran.rstudio.com/"),
expand = FALSE,
open = TRUE,
update_tar_gz = TRUE,
build_golem_from_source = TRUE,
extra_sysreqs = NULL) {
path = "DESCRIPTION",
output = "Dockerfile",
pkg = get_golem_wd(),
from = paste0(
"rocker/verse:",
R.Version()$major,
".",
R.Version()$minor
),
as = NULL,
port = 80,
host = "0.0.0.0",
sysreqs = TRUE,
repos = c(CRAN = "https://cran.rstudio.com/"),
expand = FALSE,
open = TRUE,
update_tar_gz = TRUE,
build_golem_from_source = TRUE,
extra_sysreqs = NULL
) {
add_dockerfile_(
path = path,
output = output,
Expand All @@ -122,26 +123,26 @@ add_dockerfile <- function(

add_dockerfile_ <- talk_once(
function(
path = "DESCRIPTION",
output = "Dockerfile",
pkg = get_golem_wd(),
from = paste0(
"rocker/verse:",
R.Version()$major,
".",
R.Version()$minor
),
as = NULL,
port = 80,
host = "0.0.0.0",
sysreqs = TRUE,
repos = c(CRAN = "https://cran.rstudio.com/"),
expand = FALSE,
open = TRUE,
update_tar_gz = TRUE,
build_golem_from_source = TRUE,
extra_sysreqs = NULL
) {
path = "DESCRIPTION",
output = "Dockerfile",
pkg = get_golem_wd(),
from = paste0(
"rocker/verse:",
R.Version()$major,
".",
R.Version()$minor
),
as = NULL,
port = 80,
host = "0.0.0.0",
sysreqs = TRUE,
repos = c(CRAN = "https://cran.rstudio.com/"),
expand = FALSE,
open = TRUE,
update_tar_gz = TRUE,
build_golem_from_source = TRUE,
extra_sysreqs = NULL
) {
where <- fs_path(pkg, output)

usethis_use_build_ignore(
Expand Down Expand Up @@ -190,23 +191,24 @@ add_dockerfile_ <- talk_once(
#' @export
#' @rdname dockerfiles
add_dockerfile_shinyproxy <- function(
path = "DESCRIPTION",
output = "Dockerfile",
pkg = get_golem_wd(),
from = paste0(
"rocker/verse:",
R.Version()$major,
".",
R.Version()$minor
),
as = NULL,
sysreqs = TRUE,
repos = c(CRAN = "https://cran.rstudio.com/"),
expand = FALSE,
open = TRUE,
update_tar_gz = TRUE,
build_golem_from_source = TRUE,
extra_sysreqs = NULL) {
path = "DESCRIPTION",
output = "Dockerfile",
pkg = get_golem_wd(),
from = paste0(
"rocker/verse:",
R.Version()$major,
".",
R.Version()$minor
),
as = NULL,
sysreqs = TRUE,
repos = c(CRAN = "https://cran.rstudio.com/"),
expand = FALSE,
open = TRUE,
update_tar_gz = TRUE,
build_golem_from_source = TRUE,
extra_sysreqs = NULL
) {
add_dockerfile_shinyproxy_(
path = path,
output = output,
Expand All @@ -225,23 +227,24 @@ add_dockerfile_shinyproxy <- function(

add_dockerfile_shinyproxy_ <- talk_once(
function(
path = "DESCRIPTION",
output = "Dockerfile",
pkg = get_golem_wd(),
from = paste0(
"rocker/verse:",
R.Version()$major,
".",
R.Version()$minor
),
as = NULL,
sysreqs = TRUE,
repos = c(CRAN = "https://cran.rstudio.com/"),
expand = FALSE,
open = TRUE,
update_tar_gz = TRUE,
build_golem_from_source = TRUE,
extra_sysreqs = NULL) {
path = "DESCRIPTION",
output = "Dockerfile",
pkg = get_golem_wd(),
from = paste0(
"rocker/verse:",
R.Version()$major,
".",
R.Version()$minor
),
as = NULL,
sysreqs = TRUE,
repos = c(CRAN = "https://cran.rstudio.com/"),
expand = FALSE,
open = TRUE,
update_tar_gz = TRUE,
build_golem_from_source = TRUE,
extra_sysreqs = NULL
) {
where <- fs_path(pkg, output)

usethis_use_build_ignore(output)
Expand Down Expand Up @@ -282,23 +285,24 @@ add_dockerfile_shinyproxy_ <- talk_once(
#' @export
#' @rdname dockerfiles
add_dockerfile_heroku <- function(
path = "DESCRIPTION",
output = "Dockerfile",
pkg = get_golem_wd(),
from = paste0(
"rocker/verse:",
R.Version()$major,
".",
R.Version()$minor
),
as = NULL,
sysreqs = TRUE,
repos = c(CRAN = "https://cran.rstudio.com/"),
expand = FALSE,
open = TRUE,
update_tar_gz = TRUE,
build_golem_from_source = TRUE,
extra_sysreqs = NULL) {
path = "DESCRIPTION",
output = "Dockerfile",
pkg = get_golem_wd(),
from = paste0(
"rocker/verse:",
R.Version()$major,
".",
R.Version()$minor
),
as = NULL,
sysreqs = TRUE,
repos = c(CRAN = "https://cran.rstudio.com/"),
expand = FALSE,
open = TRUE,
update_tar_gz = TRUE,
build_golem_from_source = TRUE,
extra_sysreqs = NULL
) {
add_dockerfile_heroku_(
path = path,
output = output,
Expand All @@ -317,23 +321,24 @@ add_dockerfile_heroku <- function(

add_dockerfile_heroku_ <- talk_once(
function(
path = "DESCRIPTION",
output = "Dockerfile",
pkg = get_golem_wd(),
from = paste0(
"rocker/verse:",
R.Version()$major,
".",
R.Version()$minor
),
as = NULL,
sysreqs = TRUE,
repos = c(CRAN = "https://cran.rstudio.com/"),
expand = FALSE,
open = TRUE,
update_tar_gz = TRUE,
build_golem_from_source = TRUE,
extra_sysreqs = NULL) {
path = "DESCRIPTION",
output = "Dockerfile",
pkg = get_golem_wd(),
from = paste0(
"rocker/verse:",
R.Version()$major,
".",
R.Version()$minor
),
as = NULL,
sysreqs = TRUE,
repos = c(CRAN = "https://cran.rstudio.com/"),
expand = FALSE,
open = TRUE,
update_tar_gz = TRUE,
build_golem_from_source = TRUE,
extra_sysreqs = NULL
) {
where <- fs_path(pkg, output)

usethis_use_build_ignore(output)
Expand Down
4 changes: 1 addition & 3 deletions R/add_dockerfiles_renv.R
Original file line number Diff line number Diff line change
Expand Up @@ -416,9 +416,7 @@ add_dockerfile_with_renv_heroku <- function(
"README"
)

write_there <- function(...) {
write(..., file = readme_output, append = TRUE)
}
write_there <- write_there_builder(readme_output)

write_there("From your command line, run:\n")

Expand Down
Loading
Loading