Skip to content

Commit

Permalink
Merge pull request #64 from pharmaverse/63-cran-submission-feedback
Browse files Browse the repository at this point in the history
Closes #63 CRAN updates
  • Loading branch information
mstackhouse authored Jun 19, 2024
2 parents 587ba10 + 51f8b55 commit bc253f5
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 28 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ Authors@R: c(
person("Atorus Research LLC", role = "cph")
)
Description: The purpose of this package is to support the setup the R environment.
The two main features are `autos`, to automatically source files and/or
directories into your environment, and `paths` to consistently set path objects
The two main features are 'autos', to automatically source files and/or
directories into your environment, and 'paths' to consistently set path objects
across projects for input and output. Both are implemented using a configuration
file to allow easy, custom configurations that can be used for multiple
or all projects.
License: Apache License 2.0 | file LICENSE
License: Apache License 2.0
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
Expand Down
13 changes: 0 additions & 13 deletions LICENSE

This file was deleted.

4 changes: 2 additions & 2 deletions R/init.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' Initialize the R environment with envsetup
#'
#' @param project Character. The path to the project directory. Defaults to the current working directory.
#' @param project Character. The path to the project directory.
#' @param config_path Character. The path of the config file. Defaults to NULL.
#' @param create_paths Logical indicating if missing paths should be created. Defaults to NULL.
#' @export
Expand Down Expand Up @@ -36,7 +36,7 @@
#' init(project = tmpdir,
#' config_path = file.path(tmpdir, "hierarchy.yml"),
#' create_paths = TRUE)
init <- function(project = getwd(), config_path = NULL, create_paths = NULL) {
init <- function(project, config_path = NULL, create_paths = NULL) {

create_config <- FALSE
config_found <- FALSE
Expand Down
4 changes: 2 additions & 2 deletions man/init.Rd

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

3 changes: 2 additions & 1 deletion tests/testthat/_snaps/R4.2/autos.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Code
suppressMessages(rprofile(custom_name))
Warning <simpleWarning>
Condition
Warning:
The projects autos has named environments DEV, QA, PROD that do not match with the envsetup_environ parameter or ENVSETUP_ENVIRON environment variable bad_name

6 changes: 3 additions & 3 deletions tests/testthat/_snaps/R4.2/init.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Code
init(init_tmpdir, config_path, create_paths = FALSE)
Message <rlang_message>
Message
v Configuration file found!
i The following paths in your configuration do not exist:
/DEV/username/project1/data
Expand All @@ -21,7 +21,7 @@

Code
init(init_tmpdir, config_path, create_paths = FALSE)
Message <rlang_message>
Message
v Configuration file found!
i The following paths in your configuration do not exist:
/DEV/username/project1/data
Expand All @@ -40,7 +40,7 @@

Code
init(init_tmpdir, config_path, create_paths = FALSE)
Message <rlang_message>
Message
v Configuration file found!
i The following paths in your configuration do not exist:
/DEV/username/project1/data
Expand Down
8 changes: 4 additions & 4 deletions tests/testthat/_snaps/utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

Code
validate_config(config::get(file = path))
Message <rlang_message>
Message
v paths are specified as part of your configuration
i no hierarchical paths found

# validate_config, hierarchy paths return correct messages

Code
validate_config(config::get(file = path))
Message <rlang_message>
Message
v paths are specified as part of your configuration
v hierarchal paths found for:
data
Expand All @@ -21,7 +21,7 @@

Code
validate_config(config::get(file = path))
Message <rlang_message>
Message
v paths are specified as part of your configuration
v hierarchal paths found for:
data
Expand All @@ -35,6 +35,6 @@

Code
validate_config(config::get(file = path))
Message <rlang_message>
Message
i no paths are specified as part of your configuration, skipping path valiation

0 comments on commit bc253f5

Please sign in to comment.