From 3b52da76b6433114c9c1de3007f83939023b580b Mon Sep 17 00:00:00 2001 From: Nicholas Masel <61123199+nicholas-masel@users.noreply.github.com> Date: Wed, 9 Oct 2024 09:58:25 -0400 Subject: [PATCH] update devel w/main (#68) * initial updates * update documentation and snapshots * Update cran-comments.md --------- Co-authored-by: Michael Stackhouse --- DESCRIPTION | 6 +++--- LICENSE | 13 ------------- R/init.R | 4 ++-- cran-comments.md | 7 +++++++ man/init.Rd | 4 ++-- tests/testthat/_snaps/R4.2/autos.md | 3 ++- tests/testthat/_snaps/R4.2/init.md | 6 +++--- tests/testthat/_snaps/utils.md | 8 ++++---- 8 files changed, 23 insertions(+), 28 deletions(-) delete mode 100644 LICENSE diff --git a/DESCRIPTION b/DESCRIPTION index cfaf315..c0de556 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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 diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 223c83b..0000000 --- a/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2022 Janssen R&D - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/R/init.R b/R/init.R index b12bdfa..f701308 100644 --- a/R/init.R +++ b/R/init.R @@ -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 @@ -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 diff --git a/cran-comments.md b/cran-comments.md index 368ba59..4587b05 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -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. diff --git a/man/init.Rd b/man/init.Rd index 4595308..293f5e0 100644 --- a/man/init.Rd +++ b/man/init.Rd @@ -4,10 +4,10 @@ \alias{init} \title{Initialize the R environment with envsetup} \usage{ -init(project = getwd(), config_path = NULL, create_paths = NULL) +init(project, config_path = NULL, create_paths = NULL) } \arguments{ -\item{project}{Character. The path to the project directory. Defaults to the current working directory.} +\item{project}{Character. The path to the project directory.} \item{config_path}{Character. The path of the config file. Defaults to NULL.} diff --git a/tests/testthat/_snaps/R4.2/autos.md b/tests/testthat/_snaps/R4.2/autos.md index 8797947..018ac22 100644 --- a/tests/testthat/_snaps/R4.2/autos.md +++ b/tests/testthat/_snaps/R4.2/autos.md @@ -2,6 +2,7 @@ Code suppressMessages(rprofile(custom_name)) - Warning + 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 diff --git a/tests/testthat/_snaps/R4.2/init.md b/tests/testthat/_snaps/R4.2/init.md index 8773ae3..55cdbd6 100644 --- a/tests/testthat/_snaps/R4.2/init.md +++ b/tests/testthat/_snaps/R4.2/init.md @@ -2,7 +2,7 @@ Code init(init_tmpdir, config_path, create_paths = FALSE) - Message + Message v Configuration file found! i The following paths in your configuration do not exist: /DEV/username/project1/data @@ -21,7 +21,7 @@ Code init(init_tmpdir, config_path, create_paths = FALSE) - Message + Message v Configuration file found! i The following paths in your configuration do not exist: /DEV/username/project1/data @@ -40,7 +40,7 @@ Code init(init_tmpdir, config_path, create_paths = FALSE) - Message + Message v Configuration file found! i The following paths in your configuration do not exist: /DEV/username/project1/data diff --git a/tests/testthat/_snaps/utils.md b/tests/testthat/_snaps/utils.md index a86bffa..ff7f94e 100644 --- a/tests/testthat/_snaps/utils.md +++ b/tests/testthat/_snaps/utils.md @@ -2,7 +2,7 @@ Code validate_config(config::get(file = path)) - Message + Message v paths are specified as part of your configuration i no hierarchical paths found @@ -10,7 +10,7 @@ Code validate_config(config::get(file = path)) - Message + Message v paths are specified as part of your configuration v hierarchal paths found for: data @@ -21,7 +21,7 @@ Code validate_config(config::get(file = path)) - Message + Message v paths are specified as part of your configuration v hierarchal paths found for: data @@ -35,6 +35,6 @@ Code validate_config(config::get(file = path)) - Message + Message i no paths are specified as part of your configuration, skipping path valiation