Skip to content

Commit

Permalink
doc: doc cleaning before CRAN release
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinFay committed Mar 10, 2023
1 parent 585cc03 commit 1b4018a
Show file tree
Hide file tree
Showing 10 changed files with 282 additions and 181 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@
^Meta$
^\.github$
^revdep$
README.html
225 changes: 109 additions & 116 deletions R/add_dockerfiles.R
Original file line number Diff line number Diff line change
Expand Up @@ -83,26 +83,25 @@ 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 @@ -123,26 +122,25 @@ 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 @@ -191,24 +189,23 @@ 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 @@ -227,24 +224,23 @@ 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 @@ -285,24 +281,23 @@ 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 @@ -321,24 +316,23 @@ 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 Expand Up @@ -409,10 +403,9 @@ golem::add_dockerfile_heroku() is not recommended anymore.\nPlease use golem::ad
)

alert_build <- function(
path,
output,
build_golem_from_source
) {
path,
output,
build_golem_from_source) {
cat_created(output, "Dockerfile")
if (!build_golem_from_source) {
cat_red_bullet(
Expand Down
7 changes: 4 additions & 3 deletions R/install_dev_deps.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@
#' if (interactive()) {
#' install_dev_deps()
#' }
#'
#' @return Used for side-effects
install_dev_deps <- function(
force_install = FALSE,
...
) {
force_install = FALSE,
...) {
if (!force_install) {
if (!interactive()) {
# In non interactive mode with force_install turned to FALSE,
Expand Down
7 changes: 4 additions & 3 deletions R/pkg_tools.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Getting the DESCRIPTION file in a data.frame
daf_desc <- function(
path = ".",
entry
) {
path = ".",
entry) {
as.character(
unlist(
unname(
Expand All @@ -27,6 +26,8 @@ daf_desc <- function(
#'
#' @export
#' @rdname pkg_tools
#'
#' @return The value of the entry in the DESCRIPTION file
pkg_name <- function(path = ".") {
daf_desc(path, "Package")
}
Expand Down
28 changes: 24 additions & 4 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ output: github_document
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
eval = FALSE,
eval = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%",
Expand All @@ -27,8 +27,27 @@ knitr::opts_chunk$set(

## About

You're reading the doc about version : ``r as.data.frame(read.dcf("DESCRIPTION"))$Version ``
You're reading the doc about version : `r pkgload::pkg_version()`

This README has been compiled on the

```{r}
Sys.time()
```

Here are the test & coverage results :

```{r}
devtools::check(quiet = TRUE)
```

```{r echo = FALSE}
unloadNamespace("golem")
```

```{r}
covr::package_coverage()
```

## Tool series

Expand All @@ -37,13 +56,14 @@ This package is part of a series of tools for Shiny, which includes:
- `{golem}` - <https://github.com/ThinkR-open/golem>
- `{shinipsum}` - <https://github.com/ThinkR-open/shinipsum>
- `{fakir}` - <https://github.com/ThinkR-open/fakir>
- `{shinysnippets}` - <https://github.com/ThinkR-open/shinysnippets>
- `{gemstones}` - <https://github.com/ThinkR-open/gemstones>

## Resources

### The Book :

- <https://engineering-shiny.org/>

- [paper version of the book “Engineering Production-Grade Shiny Apps”](https://www.routledge.com/Engineering-Production-Grade-Shiny-Apps/Fay-Rochette-Guyader-Girard/p/book/9780367466022)

### Blog posts :
Expand All @@ -69,7 +89,7 @@ This package is part of a series of tools for Shiny, which includes:
- [Hands-on demonstration of {golem}](https://www.youtube.com/watch?v=3-p9XLvoJV0)
- useR! 2019 : [A Framework for Building Robust & Production Ready Shiny Apps](https://youtu.be/tCAan6smrjs)
- `r emo::flag("France")` [Introduction to {golem}](https://youtu.be/6qI4NzxlAFU)
- rstudio::conf(2020) : [Production-grade Shiny Apps with golem](https://www.rstudio.com/resources/rstudioconf-2020/production-grade-shiny-apps-with-golem/)
- rstudio::conf(2020) : [Production-grade Shiny Apps with golem](https://posit.co/resources/videos/production-grade-shiny-apps-with-golem/)
- `r emo::flag("France")` Rencontres R 2021 : [ Conception d'applications Shiny avec {golem}](https://www.youtube.com/watch?v=0f5Me1PFGDs)
- `r emo::flag("France")` [ Déploiement d'une application {shiny} dans docker avec {renv} et {golem}](https://www.youtube.com/watch?v=diCG4t76k78)

Expand Down
Loading

0 comments on commit 1b4018a

Please sign in to comment.