From c20c60c8d727d690cc4cace207c4f4506e58f4c6 Mon Sep 17 00:00:00 2001 From: Sebastian Carl Date: Tue, 9 Jan 2024 17:53:01 +0100 Subject: [PATCH] prepeare CRAN 4.6.1 --- DESCRIPTION | 2 +- NEWS.md | 6 +++++- cran-comments.md | 2 +- tests/testthat/setup.R | 26 -------------------------- 4 files changed, 7 insertions(+), 29 deletions(-) delete mode 100644 tests/testthat/setup.R diff --git a/DESCRIPTION b/DESCRIPTION index 56586f83..704418bb 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: nflfastR Title: Functions to Efficiently Access NFL Play by Play Data -Version: 4.6.0.9000 +Version: 4.6.1 Authors@R: c(person(given = "Sebastian", family = "Carl", diff --git a/NEWS.md b/NEWS.md index 31bf104d..af8c7d02 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,10 @@ -# nflfastR (development version) +# nflfastR 4.6.1 - The function `calculate_series_conversion_rates()` now correctly aggregates season level conversion rates. Performance has also been improved. (#440) +- Adjusted test behavior at CRAN's request. + +Thank you to +[@andrewtek](https://github.com/andrewtek), [@gregalvi86](https://github.com/gregalvi86), [@Ic4ru5Wing](https://github.com/Ic4ru5Wing), [@JoeMarino2021](https://github.com/JoeMarino2021), [@jreddy1990](https://github.com/jreddy1990), [@marvin3FF](https://github.com/marvin3FF), [@mrcaseb](https://github.com/mrcaseb), [@RicShern](https://github.com/RicShern), [@SPNE](https://github.com/SPNE), and [@trivialfis](https://github.com/trivialfis) for their questions, feedback, and contributions towards this release. # nflfastR 4.6.0 diff --git a/cran-comments.md b/cran-comments.md index 13c60f76..3f5bf835 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,7 +1,7 @@ ## Release summary This is a minor release that -* fixes bugs +* adjusts the setup process of unit tests per request ## R CMD check results diff --git a/tests/testthat/setup.R b/tests/testthat/setup.R deleted file mode 100644 index 3da41907..00000000 --- a/tests/testthat/setup.R +++ /dev/null @@ -1,26 +0,0 @@ -# CRAN incoming checks can fail if tests use more than 2 cores. -# We can run in this problem by using data.table https://github.com/Rdatatable/data.table/issues/5658 -# R CMD Check throws the NOTE because CRAN sets -# _R_CHECK_TEST_TIMING_CPU_TO_ELAPSED_THRESHOLD_ and/or -# _R_CHECK_EXAMPLE_TIMING_CPU_TO_ELAPSED_THRESHOLD_to "2.5" -# (EDIT: They probably use different ones in R DEVEL) -# which means "more than two cores are running". -# We check for these environment variables and if we find them -# we set data.table to two threads. -cpu_check <- as.numeric( - c( - Sys.getenv("_R_CHECK_EXAMPLE_TIMING_CPU_TO_ELAPSED_THRESHOLD_", unset = 0), - Sys.getenv("_R_CHECK_TEST_TIMING_CPU_TO_ELAPSED_THRESHOLD_", unset = 0) - ) -) - -if (any(is.na(cpu_check)) || any(cpu_check[!is.na(cpu_check)] != 0)) { - cores <- min( - floor(as.integer(Sys.getenv("_R_CHECK_EXAMPLE_TIMING_CPU_TO_ELAPSED_THRESHOLD_"))), - floor(as.integer(Sys.getenv("_R_CHECK_TEST_TIMING_CPU_TO_ELAPSED_THRESHOLD_"))), - 2L, - na.rm = TRUE - ) - Sys.setenv("OMP_THREAD_LIMIT" = cores) - data.table::setDTthreads(cores) -}