Skip to content

Commit 893d311

Browse files
authored
Merge pull request #343 from ThinkR-open/dev
golem 0.2.0 — CRAN release candidate
2 parents ecab7aa + 5fb1715 commit 893d311

File tree

108 files changed

+3703
-1196
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+3703
-1196
lines changed

.Rbuildignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@
1818
^CRAN-RELEASE$
1919
^appveyor\.yml$
2020
^CONTRIBUTING\.md$
21+
^doc$
22+
^Meta$

.gitattributes

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Set the default behavior, in case people don't have core.autocrlf set.
2+
* text=auto
3+
4+
# Declare files that will always have CRLF line endings on checkout.
5+
*.Rd text eol=lf
6+
*.R text eol=lf
7+
*.Rmd text eol=lf
8+
*.md text eol=lf
9+
NAMESPACE text eol=lf
10+
DESCRIPTION text eol=lf
11+
12+
# Denote all files that are truly binary and should not be modified.
13+
*.png binary
14+
*.jpg binary

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ inst/rstudio/.DS_Store
66
.Rproj.user
77
.Rhistory
88
.RData
9+
doc
10+
Meta

DESCRIPTION

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: golem
22
Title: A Framework for Robust Shiny Applications
3-
Version: 0.1.0.9001
3+
Version: 0.2.0
44
Authors@R:
55
c(person(given = "Vincent",
66
family = "Guyader",
@@ -22,6 +22,10 @@ Authors@R:
2222
role = "aut",
2323
email = "cervan@thinkr.fr",
2424
comment = c(ORCID = "0000-0002-4816-4624")),
25+
person(given = "Novica",
26+
family = "Nakov",
27+
role = "ctb",
28+
email = "nnovica@gmail.com"),
2529
person(given = "ThinkR",
2630
role = "cph"))
2731
Description: An opinionated framework for building a
@@ -36,40 +40,42 @@ Depends:
3640
Imports:
3741
attempt (>= 0.3.0),
3842
cli,
43+
config,
3944
crayon,
4045
desc,
4146
dockerfiler,
42-
DT,
43-
glue,
47+
fs,
48+
here,
4449
htmltools,
50+
jsonlite,
4551
pkgload,
46-
processx,
4752
remotes,
4853
rlang,
4954
roxygen2,
50-
rsconnect,
5155
rstudioapi,
5256
shiny,
53-
stats,
54-
stringr,
5557
testthat,
56-
tools,
5758
usethis,
5859
utils,
59-
yesno
60+
yaml
6061
Suggests:
61-
spelling,
6262
covr,
63+
devtools,
64+
glue,
6365
knitr,
66+
pkgbuild,
6467
pkgdown,
6568
purrr,
6669
rcmdcheck,
6770
rmarkdown,
71+
rsconnect,
72+
spelling,
73+
stringr,
6874
withr
6975
VignetteBuilder:
7076
knitr
7177
Encoding: UTF-8
78+
Language: en-US
7279
LazyData: true
7380
Roxygen: list(markdown = TRUE)
74-
RoxygenNote: 6.1.1
75-
Language: en-US
81+
RoxygenNote: 7.0.2

Dockerfile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
FROM rocker/r-ver:3.5.1
2+
RUN echo "options(repos = c(CRAN = 'https://cran.rstudio.com/'), download.file.method = 'libcurl')" >> /usr/local/lib/R/etc/Rprofile.site
3+
RUN R -e 'install.packages("remotes")'
4+
RUN R -e 'remotes::install_github("r-lib/remotes", ref = "97bbf81")'
5+
RUN Rscript -e 'remotes::install_version("attempt", version = "0.3.0")'
6+
RUN Rscript -e 'remotes::install_version("cli", version = "1.1.0")'
7+
RUN Rscript -e 'remotes::install_version("crayon", version = "1.3.4")'
8+
RUN Rscript -e 'remotes::install_version("dockerfiler", version = "0.1.3")'
9+
RUN Rscript -e 'remotes::install_version("glue", version = "1.3.1")'
10+
RUN Rscript -e 'remotes::install_version("htmltools", version = "0.4.0")'
11+
RUN Rscript -e 'remotes::install_version("jsonlite", version = "1.6")'
12+
RUN Rscript -e 'remotes::install_version("magrittr", version = "1.5")'
13+
RUN Rscript -e 'remotes::install_version("pkgload", version = "1.0.2")'
14+
RUN Rscript -e 'remotes::install_version("remotes", version = "2.1.0")'
15+
RUN Rscript -e 'remotes::install_version("rlang", version = "0.4.0")'
16+
RUN Rscript -e 'remotes::install_version("roxygen2", version = "6.1.1")'
17+
RUN Rscript -e 'remotes::install_version("rsconnect", version = "0.8.15")'
18+
RUN Rscript -e 'remotes::install_version("rstudioapi", version = "0.10")'
19+
RUN Rscript -e 'remotes::install_version("shiny", version = "1.4.0")'
20+
RUN Rscript -e 'remotes::install_version("testthat", version = "2.2.1")'
21+
RUN Rscript -e 'remotes::install_version("usethis", version = "1.5.1")'
22+
RUN Rscript -e 'remotes::install_version("yesno", version = "0.1.0")'
23+
RUN Rscript -e 'remotes::install_version("purrr", version = "0.3.3")'
24+
RUN Rscript -e 'remotes::install_version("covr", version = "3.3.2")'
25+
RUN Rscript -e 'remotes::install_version("devtools", version = "2.2.1")'
26+
RUN Rscript -e 'remotes::install_version("DT", version = "0.9")'
27+
RUN Rscript -e 'remotes::install_version("knitr", version = "1.25")'
28+
RUN Rscript -e 'remotes::install_version("pkgdown", version = "1.4.1")'
29+
RUN Rscript -e 'remotes::install_version("rcmdcheck", version = "1.3.3")'
30+
RUN Rscript -e 'remotes::install_version("rmarkdown", version = "1.16")'
31+
RUN Rscript -e 'remotes::install_version("spelling", version = "2.1")'
32+
RUN Rscript -e 'remotes::install_version("stringr", version = "1.4.0")'
33+
RUN Rscript -e 'remotes::install_version("withr", version = "2.1.2")'
34+
RUN Rscript -e 'remotes::install_github("r-lib/desc@42b9578f374bf685610b1efb05315927ae236d5b")'
35+
RUN Rscript -e 'remotes::install_github("rstudio/packrat@c0a67564df0bff16c952117050f510f2c8eace0a")'
36+
COPY golem_*.tar.gz /app.tar.gz
37+
RUN R -e 'remotes::install_local("/app.tar.gz")'
38+
CMD R -e "options('shiny.port'=$PORT,shiny.host='0.0.0.0');golem::run_app()"

NAMESPACE

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,18 @@ export(add_fct)
99
export(add_js_file)
1010
export(add_js_handler)
1111
export(add_module)
12+
export(add_resource_path)
1213
export(add_rstudioconnect_file)
1314
export(add_shinyappsio_file)
1415
export(add_shinyserver_file)
1516
export(add_ui_server_files)
1617
export(add_utils)
18+
export(amend_golem_config)
1719
export(app_dev)
1820
export(app_prod)
1921
export(browser_button)
2022
export(browser_dev)
23+
export(bundle_resources)
2124
export(cat_dev)
2225
export(create_golem)
2326
export(detach_all_attached)
@@ -27,16 +30,22 @@ export(expect_shinytag)
2730
export(expect_shinytaglist)
2831
export(favicon)
2932
export(fill_desc)
30-
export(get_dependencies)
33+
export(get_golem_name)
3134
export(get_golem_options)
35+
export(get_golem_version)
3236
export(get_golem_wd)
37+
export(get_sysreqs)
3338
export(invoke_js)
3439
export(make_dev)
3540
export(message_dev)
3641
export(print_dev)
3742
export(remove_favicon)
43+
export(set_golem_name)
3844
export(set_golem_options)
45+
export(set_golem_version)
3946
export(set_golem_wd)
47+
export(use_external_css_file)
48+
export(use_external_js_file)
4049
export(use_favicon)
4150
export(use_recommended_deps)
4251
export(use_recommended_tests)
@@ -45,33 +54,61 @@ export(use_utils_ui)
4554
export(warning_dev)
4655
export(with_golem_options)
4756
importFrom(attempt,attempt)
57+
importFrom(attempt,is_try_error)
58+
importFrom(attempt,stop_if)
4859
importFrom(attempt,stop_if_not)
4960
importFrom(attempt,without_warning)
5061
importFrom(cli,cat_bullet)
5162
importFrom(cli,cat_line)
5263
importFrom(cli,cat_rule)
64+
importFrom(config,get)
65+
importFrom(desc,desc_get_deps)
5366
importFrom(desc,description)
54-
importFrom(glue,glue)
55-
importFrom(htmltools,includeScript)
67+
importFrom(dockerfiler,Dockerfile)
68+
importFrom(fs,dir_create)
69+
importFrom(fs,dir_exists)
70+
importFrom(fs,file_copy)
71+
importFrom(fs,file_create)
72+
importFrom(fs,file_delete)
73+
importFrom(fs,file_exists)
74+
importFrom(fs,file_move)
75+
importFrom(fs,file_temp)
76+
importFrom(fs,path)
77+
importFrom(fs,path_abs)
78+
importFrom(fs,path_file)
79+
importFrom(htmltools,htmlDependency)
5680
importFrom(htmltools,save_html)
5781
importFrom(htmltools,tags)
82+
importFrom(jsonlite,fromJSON)
5883
importFrom(pkgload,load_all)
5984
importFrom(pkgload,pkg_name)
85+
importFrom(pkgload,pkg_path)
86+
importFrom(remotes,dev_package_deps)
87+
importFrom(remotes,package_deps)
6088
importFrom(rlang,enquo)
6189
importFrom(roxygen2,roxygenise)
90+
importFrom(rstudioapi,getSourceEditorContext)
6291
importFrom(rstudioapi,isAvailable)
92+
importFrom(rstudioapi,modifyRange)
93+
importFrom(rstudioapi,navigateToFile)
6394
importFrom(rstudioapi,openProject)
95+
importFrom(shiny,addResourcePath)
6496
importFrom(shiny,getShinyOption)
65-
importFrom(stats,setNames)
97+
importFrom(shiny,includeScript)
6698
importFrom(testthat,expect)
6799
importFrom(testthat,expect_equal)
68100
importFrom(testthat,quasi_label)
101+
importFrom(usethis,proj_set)
69102
importFrom(usethis,use_build_ignore)
70103
importFrom(usethis,use_package)
71104
importFrom(usethis,use_testthat)
72105
importFrom(utils,capture.output)
106+
importFrom(utils,download.file)
73107
importFrom(utils,file.edit)
74108
importFrom(utils,getFromNamespace)
75109
importFrom(utils,installed.packages)
110+
importFrom(utils,menu)
111+
importFrom(utils,packageVersion)
76112
importFrom(utils,sessionInfo)
77-
importFrom(yesno,yesno)
113+
importFrom(yaml,read_yaml)
114+
importFrom(yaml,write_yaml)

NEWS.md

Lines changed: 76 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,74 @@
1+
> Notes: the # between parenthesis referes to the related issue on GitHub, and the @ refers to an external contributor solving this issue.
2+
13
# golem 0.1.9000+
24

35
## New functions
46

7+
+ `add_dockerfile()` was completely refactored. It now starts from r-ver, uses explicit package versions from you local machine, and tries to set as much System Requirements as possible by using `{sysreq}`, and parses and installs the Remotes tag from the DESCRIPTION (#189, #175)
8+
9+
+ `add_dockerfile()` allow now to directly use the source of the package by mounting the source folder in the container and running `remotes::install_local()`
10+
11+
+ `add_dockerfile()` now builds the tar.gz (#273)
12+
513
+ `add_fct` and `add_utils` add new files in your R folder that can hold utils and functions (#123).
614

15+
+ We switched from `shiny::addResourcePath()` to `golem::add_resource_path()`, which doesn't fail if the folder is empty (#223).
16+
17+
+ New JavaScript functions to use alert, prompt and confirm (#108, @zwycl)
18+
19+
+ `use_external_js_file` and `use_external_css_file` are designed to download .js and .css file off the web to the appropriate directory (#130, @zwycl)
20+
21+
722
## New features
823

24+
+ `{golem}` now comes with an internal config file. Please refer to the `config` Vignette for more information.
25+
26+
+ `bundle_resources()` comes with every new app and bundles all the css and js files you put inside the `inst/app/www` folder, by matchine the file extension.
27+
28+
+ There is now an `app_sys()` function, which is a wrapper around `system.file(..., package = "myapp")` (#207, @novica)
29+
930
+ `document_and_reload()` now stops when it fails, and returns an explicit failure message (#157)
1031

32+
+ You can now create a golem without any comment (#171, @ArthurData)
33+
34+
+ The default `app_ui()` now has a `request` parameter, to natively handle bookmarking.
35+
36+
+ `document_and_reload()` now stops when it fails, and returns an explicit failure message (#157). It also uses `get_golem_wd()` as a default path, to be consistent with the rest of `{golem}` (#219, @j450h1)
37+
1138
+ `add_module` now allows to create and `fct_` and an `utils_` file (#154, @novica)
1239

1340
+ `golem::detach_all_attached()` is now silent (#186, @annakau)
1441

42+
+ There is now a series of addins for going to a specific golem file (#212, @novica), and also to wrap a selected text into `ns()` (#143, @kokbent)
43+
44+
+ Creation of a golem project is now a little bit more talkative (#63, @novica)
45+
46+
+ golem apps now have a title tag in the header by default, (#172, @novica)
47+
48+
+ The `rsconnect` folder is now added to `.Rbuildignore` (#244)
49+
50+
+ `devtools::test()` in 03_deploy.R is now `devtools::check()`
51+
52+
+ modules bow have a placeholder for content
53+
54+
+ Dev scripts have been rewritten and rerordered a litte bit
55+
1556
## Breaking changes
1657

58+
+ `invoke_js()` now takes a list of elements to send to JS (through `...`) instead of a vector (#155, @zwycl)
59+
60+
+ `get_dependencies` was removed from this package, please use `desc::desc_get_deps()` instead (#251)
61+
62+
+ `{golem}` now uses `here::here()` to determine the default working directory (#287)
63+
64+
+ Modules used to be exported by default. You now have to specify it when creating the modules (#144)
65+
66+
+ `run_app()` is no longer explicitely namespaced in the run_dev script (#267)
67+
68+
+ JavaScript files now default to having `$(document).ready()` (#227)
69+
70+
+ Every filesystem manipulation is now done with `{fs}`. That should be pretty transparent for most users but please open an issue if it causes problem (#285)
71+
1772
## Bug fix
1873

1974
+ The Dockerfile is now correctly added to .Rbuildignore (#81)
@@ -24,8 +79,26 @@
2479

2580
+ spellcheck in files (@privefl)
2681

82+
+ Message to link to `golem_add_external_resources()` is now conditional to R being in a golem project (#167, @novica)
83+
84+
+ Better error on missing name in add_*, (#120, @novica)
85+
86+
+ When adding file, the extension is now ignored if provided by the user (#231)
87+
88+
+ The dots R/run_app.R are now documented by default (#243)
89+
90+
+ Bug fix of the pkgdown website (#180)
91+
92+
+ `{golem}` now correctly handles command line creation of projet inside the current directory (#248)
93+
94+
+ The test are now more robust when it comes to random name generation (#281)
95+
2796
## Internal changes
2897

98+
+ We no longer depend on `{stringr}` (#201, @TomerPacific)
99+
100+
+ get_golem_wd() is now used everywhere in `{golem}` (#237, @felixgolcher)
101+
29102
# golem 0.1.0 - CRAN release candidate, v2
30103

31104
## New Functions
@@ -42,11 +115,13 @@
42115

43116
+ The `installed.packages()` function is no longer used.
44117

118+
+ Every filesystem manipulation is now done with `{fs}` (#285)
119+
45120
# golem 0.0.1.9999 - CRAN release candidate
46121

47122
## Changes in the way run_app and deploy files are build
48123

49-
+ There is now a unique framework for run_app, that allows to deploy anywhere and can accept arguments. These arguments can then be retrieved with `get_golem_options()`. #
124+
+ There is now a unique framework for run_app, that allows to deploy anywhere and can accept arguments. These arguments can then be retrieved with `get_golem_options()`.
50125

51126
> See https://rtask.thinkr.fr/blog/shinyapp-runapp-shinyappdir-difference/
52127

0 commit comments

Comments
 (0)