Skip to content

Commit

Permalink
fix: limit 'data.table' cores to 2 on CRAN
Browse files Browse the repository at this point in the history
  • Loading branch information
gisler committed Sep 27, 2023
1 parent 744c3d6 commit 644b916
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: DTSg
Type: Package
Title: A Class for Working with Time Series Data Based on 'data.table' and 'R6'
with Largely Optional Reference Semantics
Version: 1.1.2
Version: 1.1.3
Authors@R: person("Gerold", "Hepp", email = "gisler@hepp.cc", role = c("aut", "cre"))
Description: Basic time series functionalities such as listing of missing
values, application of arbitrary aggregation as well as rolling (asymmetric)
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# DTSg v1.1.2
# DTSg v1.1.3

* Cease use of legacy time zone symlinks in tests.
* Bumped minimum tested R version from 4.0.2 to 4.2.3 using the corresponding Posit Public Package Manager snapshot.
Expand Down
7 changes: 7 additions & 0 deletions R/aaa.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
NULL

.onLoad <- function(libname, pkgname) {
suppressWarnings(onCRAN <- isTRUE(as.logical(as.numeric(
Sys.getenv("_R_CHECK_EXAMPLE_TIMING_CPU_TO_ELAPSED_THRESHOLD_")
))))
if(onCRAN) {

Check warning on line 11 in R/aaa.R

View workflow job for this annotation

GitHub Actions / Lint Code Base

file=/github/workspace/R/aaa.R,line=11,col=5,[spaces_left_parentheses_linter] Place a space before left parenthesis, except in a function call.
setDTthreads(2L)
}

getOption("DTSgClone" , options(DTSgClone = TRUE )) # nolint
getOption("DTSgDeprecatedWarnings", options(DTSgDeprecatedWarnings = TRUE )) # nolint
getOption("DTSgFast" , options(DTSgFast = FALSE )) # nolint
Expand Down

0 comments on commit 644b916

Please sign in to comment.