From d1d92edea07c4de971ce482714775f747515e7cb Mon Sep 17 00:00:00 2001 From: Kenton White Date: Thu, 3 Dec 2020 13:38:39 -0500 Subject: [PATCH] Heads/v0.9.3 (#305) * Fixed R4.1 error with exists() in tests get(), exists(), and get0() now signal an error if the first argument has length greater than 1. Previously additional elements were silently ignored. Suggested by Antoine Fabri on R-devel. * Updated News for impemding v0.9.3 release * Updated DESACRIPTION for impending v0.9.3 release * Updates config to v0.9.3 * Migrate travis from .org to .com .org will be deprecated in 2021 --- DESCRIPTION | 5 +++-- NEWS.md | 7 +++++++ README.markdown | 2 +- inst/defaults/templates/full/config/global.dcf | 2 +- inst/defaults/templates/minimal/config/global.dcf | 2 +- tests/testthat/test-clear.R | 6 ++++-- 6 files changed, 17 insertions(+), 7 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e3da3bff..5806b64e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: ProjectTemplate Type: Package Title: Automates the Creation of New Statistical Analysis Projects -Version: 0.9.2 +Version: 0.9.3 Date: 2020-04-15 Authors@R: c( person("Aleksandar", "Blagotic", role = "ctb"), person("Diego", "Valle-Jones", role = "ctb"), @@ -14,7 +14,8 @@ Authors@R: c( person("Aleksandar", "Blagotic", role = "ctb"), person("Matteo", "Redaelli", role = "ctb"), person("Noah", "Lorang", role = "ctb"), person("Patrick", "Schalk", role = "ctb"), - person("Dominik", "Schneider", role="ctb")) + person("Dominik", "Schneider", role="ctb"), + person("Gerold", "Hepp", role="ctb")) Description: Provides functions to automatically build a directory structure for a new R project. Using this structure, 'ProjectTemplate' diff --git a/NEWS.md b/NEWS.md index faec706b..febbae2d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,10 @@ +0.9.3 (2020-12-03) + +Internal +-------- +* Fix passing first argument with length greater than 1 to `exists()` (Breaking change in R 4.1.0) +* Fix issue where some Namespaces where not properly resolved in `cache()` (#303). + 0.9.2 (2020-05-11) Features diff --git a/README.markdown b/README.markdown index d2c8edf4..9eb9273e 100644 --- a/README.markdown +++ b/README.markdown @@ -1,4 +1,4 @@ -# ProjectTemplate [![Travis-CI build status](https://travis-ci.org/KentonWhite/ProjectTemplate.png?branch=master)](https://travis-ci.org/KentonWhite/ProjectTemplate) +# ProjectTemplate [![Travis-CI build status](https://travis-ci.com/KentonWhite/ProjectTemplate.png?branch=master)](https://travis-ci.org/KentonWhite/ProjectTemplate) The ProjectTemplate package lets you automatically build a directory for a new R project with a standardized subdirectory structure. Using this structure, ProjectTemplate automates data and package loading. The hope is that standardized data loading, automatic importing of best practice packages, integrated unit testing and useful nudges towards keeping a cleanly organized codebase will improve the quality of R coding. diff --git a/inst/defaults/templates/full/config/global.dcf b/inst/defaults/templates/full/config/global.dcf index 2905c2bd..e617f8a1 100644 --- a/inst/defaults/templates/full/config/global.dcf +++ b/inst/defaults/templates/full/config/global.dcf @@ -1,4 +1,4 @@ -version: 0.9.2 +version: 0.9.3 data_loading: TRUE data_loading_header: TRUE data_ignore: diff --git a/inst/defaults/templates/minimal/config/global.dcf b/inst/defaults/templates/minimal/config/global.dcf index 2905c2bd..e617f8a1 100644 --- a/inst/defaults/templates/minimal/config/global.dcf +++ b/inst/defaults/templates/minimal/config/global.dcf @@ -1,4 +1,4 @@ -version: 0.9.2 +version: 0.9.3 data_loading: TRUE data_loading_header: TRUE data_ignore: diff --git a/tests/testthat/test-clear.R b/tests/testthat/test-clear.R index 4b513cc2..7f0f05eb 100644 --- a/tests/testthat/test-clear.R +++ b/tests/testthat/test-clear.R @@ -23,7 +23,8 @@ test_that('running clear() with default parameters removes everything except con expect_message(clear(), "clear from memory:.*?config.*?helper\\.function.*project.info.*") # check they don't exist - expect_true(!exists(c("project.info", "helper.function"), envir = .TargetEnv)) + expect_true(!exists(c("project.info"), envir = .TargetEnv)) + expect_true(!exists(c("helper.function"), envir = .TargetEnv)) # check config does not exist expect_true(!exists("config", envir = .TargetEnv)) @@ -79,7 +80,8 @@ test_that('running clear() removes everything except the config$sticky_variables expect_true(!exists("project.info", envir = .TargetEnv)) # check that config and helper.function does exist - expect_true(exists(c("config", "helper.function"), envir = .TargetEnv)) + expect_true(exists(c("config"), envir = .TargetEnv)) + expect_true(exists(c("helper.function"), envir = .TargetEnv)) tidy_up() })