Skip to content

Commit

Permalink
Merge pull request #648 from ThinkR-open/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinFay authored Apr 16, 2021
2 parents f90ae42 + c498b70 commit 23daa07
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 49 deletions.
4 changes: 3 additions & 1 deletion R/disable_autoload.R
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#' Disabling Shiny Autoload of R Scripts
#'
#' @inherit add_module
#' @inheritParams add_module
#'
#' @export
#'
#' @examples
#' if (interactive()){
#' disable_autoload()
#' }
#'
#' @return The path to the file, invisibly.
disable_autoload <- function(
pkg = get_golem_wd()
){
Expand Down
48 changes: 6 additions & 42 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,12 @@
## 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)
* local R installation, R 4.0.5
* ubuntu 16.04 (on travis-ci), R 4.0.5
* win-builder (devel)

## R CMD check results

0 errors | 0 warnings | 1 note
0 errors | 0 warnings | 0 notes

* This is a resubmission.
## Comments

Feedbacks from previous submission:

```
please replace \dontrun{} by \donttest{} or if(interactive()){}
(for interactive examples) in your Rd-files if this is feasible.
```

-> We replaced them

```
Please ensure that your functions do not write by default or in your
examples/vignettes/tests in the user's home filespace.(...).
Please only write/save files if the user has specified
a directory.
```

-> One of the goal of {golem} is to write files to disk, in the spirit of {usethis}. But nothing is written without the user knowing it:

+ when first using a project created by golem, the user has to set a series of options, one being the current "golem working directory".
+ All writing functions then have a parameter to specify the path, which default to a path returned by `get_golem_wd`.
+ The `set_golem_wd` allows to change globally this path, and the user is informed of that through a message to the console whenever this path is set.

```
Please ensure that you do not install packages in your functions without
the user's knowledge or without the possibility to change the target
library.
```

-> There is no function in {golem} installing packages: the only "install.packages"to be found is the one which is written inside the Dockerfile generated by `add_dockerfile`, so nothing is installed in the user library.

```
You are using installed.packages(): do not use
it to find out if a named package is installed (...)
nor to find out if a package is usable
```

-> We used the install.packages function to check which packages are of priority 'basic'. We switched to an hardcoded vector containing these packages.
* Maintainer has changed.
8 changes: 2 additions & 6 deletions man/disable_autoload.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions tests/testthat/test-use_recomended.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
test_that("test use_recommended_deps",{
testthat::skip_on_cran()
with_dir(pkg,{
packages <- c('shiny', 'DT', 'attempt', 'glue', 'golem', 'htmltools')
to_add <- c()
Expand Down

0 comments on commit 23daa07

Please sign in to comment.