Skip to content

Commit

Permalink
update devel w/main (#68)
Browse files Browse the repository at this point in the history
* initial updates

* update documentation and snapshots

* Update cran-comments.md

---------

Co-authored-by: Michael Stackhouse <[email protected]>
  • Loading branch information
nicholas-masel and mstackhouse authored Oct 9, 2024
1 parent 8f9e0c0 commit 3b52da7
Show file tree
Hide file tree
Showing 8 changed files with 23 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
7 changes: 7 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## Resubmission
This is a resubmission. In this version I have:

* Corrected quotations in the description.
* Removed the LICENSE file, as there are no additional restrictions.
* Removed the default write path in R/init.R.

## envsetup 0.1.0

Tested on RHEL 7, RHEL 8, GitHub Action and RHub.
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 3b52da7

Please sign in to comment.