Skip to content

Commit 394556a

Browse files
committed
merge master
2 parents 94eb6ed + c4a2085 commit 394556a

20 files changed

+180
-100
lines changed

.appveyor.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,14 @@ environment:
1616
global:
1717
CRAN: http://cloud.r-project.org
1818
WARNINGS_ARE_ERRORS: 1
19-
R_CHECK_ARGS: --no-manual --no-multiarch
20-
R_ARCH: i386
21-
# R_CHECK_ARGS specified in order to turn off --as-cran (on by default) as that can be slow
22-
# multiarch is on by default which (when R_ARCH: x64) compiles and tests both 32bit and 64bit in one x64 job
23-
# --no-multiarch so as to not run both 32bit and 64bit on every commit in PRs to save dev cycle time; GLCI after merge is full-strength
24-
# GHA has MacOS 64bit (test-coverage) and Ubuntu 64bit, therefore picked 32bit for Windows
25-
GCC_PATH: mingw_64
26-
# Default GCC_PATH appears to be gcc-4.6.3 which is now unsupported as from Rtools.exe v3.4.
19+
R_CHECK_ARGS: --as-cran --no-manual
20+
# --no-manual to avoid error 'pdflatex is not available'
21+
# --as-cran no longer a lot slower (now takes under 6 mins with and without); logs show _R_CHECK_CRAN_INCOMING_=FALSE which could take 5+ mins
2722
_R_CHECK_NO_STOP_ON_TEST_ERROR_: true
2823
# continue tests even if some script failed
2924
_R_CHECK_TESTS_NLINES_: 0
3025
# Block truncation of any error messages in R CMD check
26+
# R is 64-bit only on Windows from 4.2.0 (prior default was build and test both 32bit and 64bit) so we no longer use R_ARCH to pick one to reduce CI time in PRs
3127

3228
matrix:
3329

.gitlab-ci.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ variables:
66
TZ: "UTC" ## to avoid 'Failed to create bus connection' from timedatectl via Sys.timezone() on Docker with R 3.4.
77
## Setting TZ for all GLCI jobs to isolate them from timezone. We could have a new GLCI job to test under
88
## a non-UTC timezone, although, that's what we do routinely in dev.
9-
R_REL_VERSION: "4.1"
10-
R_DEVEL_VERSION: "4.2"
11-
R_OLDREL_VERSION: "4.0"
9+
R_REL_VERSION: "4.2"
10+
R_DEVEL_VERSION: "4.3"
11+
R_OLDREL_VERSION: "4.1"
1212

1313
stages:
1414
- dependencies
@@ -94,15 +94,15 @@ build: ## build data.table sources as tar.gz archive
9494
- mkdir.exe -p cran/bin/windows/contrib/$R_VERSION; mv.exe $(ls.exe -1t data.table_*.zip | head.exe -n 1) cran/bin/windows/contrib/$R_VERSION
9595

9696
.test-install-r-rel-win: &install-r-rel-win
97-
- curl.exe -s -o ../R-rel.exe https://cloud.r-project.org/bin/windows/base/R-4.1.3-win.exe; Start-Process -FilePath ..\R-rel.exe -ArgumentList "/VERYSILENT /DIR=C:\R" -NoNewWindow -Wait
97+
- curl.exe -s -o ../R-rel.exe https://cloud.r-project.org/bin/windows/base/R-4.2.1-win.exe; Start-Process -FilePath ..\R-rel.exe -ArgumentList "/VERYSILENT /DIR=C:\R" -NoNewWindow -Wait
9898
# see #5198 for discussion about the https link used above; it will break each time R is released and the version number will need to be updated
9999
.test-install-r-devel-win: &install-r-devel-win
100100
- curl.exe -s -o ../R-devel.exe https://cloud.r-project.org/bin/windows/base/R-devel-win.exe; Start-Process -FilePath ..\R-devel.exe -ArgumentList "/VERYSILENT /DIR=C:\R" -NoNewWindow -Wait
101101
.test-install-r-oldrel-win: &install-r-oldrel-win
102-
- curl.exe -s -o ../R-oldrel.exe https://cloud.r-project.org/bin/windows/base/old/4.0.5/R-4.0.5-win.exe; Start-Process -FilePath ..\R-oldrel.exe -ArgumentList "/VERYSILENT /DIR=C:\R" -NoNewWindow -Wait
102+
- curl.exe -s -o ../R-oldrel.exe https://cloud.r-project.org/bin/windows/base/old/4.1.3/R-4.1.3-win.exe; Start-Process -FilePath ..\R-oldrel.exe -ArgumentList "/VERYSILENT /DIR=C:\R" -NoNewWindow -Wait
103103

104104
.test-install-rtools-win: &install-rtools-win
105-
- curl.exe -s -o ../rtools.exe https://cloud.r-project.org/bin/windows/Rtools/rtools40-x86_64.exe; Start-Process -FilePath ..\rtools.exe -ArgumentList "/VERYSILENT /DIR=C:\rtools40" -NoNewWindow -Wait
105+
- curl.exe -s -o ../rtools.exe https://cloud.r-project.org/bin/windows/Rtools/rtools42/files/rtools42-5253-5107-signed.exe; Start-Process -FilePath ..\rtools.exe -ArgumentList "/VERYSILENT /DIR=C:\rtools42" -NoNewWindow -Wait
106106

107107
.test-template: &test
108108
stage: test
@@ -246,7 +246,7 @@ test-rel-win: ## R-release on Windows, test and build binaries
246246
before_script:
247247
- *install-r-rel-win
248248
- *install-rtools-win
249-
- $ENV:PATH = "C:\R\bin;C:\rtools40\usr\bin;$ENV:PATH"
249+
- $ENV:PATH = "C:\R\bin;C:\rtools42\usr\bin;$ENV:PATH"
250250
- Rscript.exe -e "source('.ci/ci.R'); install.packages(dcf.dependencies('DESCRIPTION', which='most'), quiet=TRUE)"
251251
- *cp-src-win
252252
- rm.exe -r bus
@@ -264,7 +264,7 @@ test-dev-win: ## R-devel on Windows; see #5294 for changes in Dec 2021 related t
264264
R_VERSION: "$R_DEVEL_VERSION"
265265
before_script:
266266
- *install-r-devel-win
267-
- curl.exe -s -o ../rtools.exe https://www.r-project.org/nosvn/winutf8/ucrt3/rtools42-5038-5046.exe; Start-Process -FilePath ..\rtools.exe -ArgumentList "/VERYSILENT /DIR=C:\rtools42" -NoNewWindow -Wait
267+
- *install-rtools-win
268268
- $ENV:PATH = "C:\R\bin;C:\rtools42\usr\bin;$ENV:PATH"
269269
- Rscript.exe -e "source('.ci/ci.R'); install.packages(dcf.dependencies('DESCRIPTION', which='most', exclude=c('knitr','rmarkdown')), quiet=TRUE)" ## exclude= for #5294
270270
- *cp-src-win
@@ -283,7 +283,8 @@ test-old-win: ## R-oldrel on Windows
283283
R_VERSION: "$R_OLDREL_VERSION"
284284
before_script:
285285
- *install-r-oldrel-win
286-
- *install-rtools-win
286+
- curl.exe -s -o ../rtools.exe https://cloud.r-project.org/bin/windows/Rtools/rtools40-x86_64.exe; Start-Process -FilePath ..\rtools.exe -ArgumentList "/VERYSILENT /DIR=C:\rtools40" -NoNewWindow -Wait
287+
## rtools42 doesn't support 32bit so oldrel-win (currently R 4.1) needs rtools40. Can use install-rtools-win again here when oldrel is R 4.2+
287288
- $ENV:PATH = "C:\R\bin;C:\rtools40\usr\bin;$ENV:PATH"
288289
- Rscript.exe -e "source('.ci/ci.R'); install.packages(dcf.dependencies('DESCRIPTION', which='most', exclude=c('knitr','rmarkdown')), quiet=TRUE)" ## exclude= for #5294
289290
- *cp-src-win

DESCRIPTION

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ Authors@R: c(
7171
person("Boniface Christian","Kamgang", role="ctb"),
7272
person("Olivier","Delmarcell", role="ctb"),
7373
person("Josh","O'Brien", role="ctb"),
74-
person("Dereck","de Mezquita", role="ctb"))
74+
person("Dereck","de Mezquita", role="ctb"),
75+
person("Michael","Czekanski", role="ctb"))
7576
Depends: R (>= 3.1.0)
7677
Imports: methods
7778
Suggests: bit64 (>= 4.0.0), bit (>= 4.0.4), curl, R.utils, xts, nanotime, zoo (>= 1.8-1), yaml, knitr, rmarkdown, markdown

NAMESPACE

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ exportClasses(data.table, IDate, ITime)
88
export(data.table, tables, setkey, setkeyv, key, "key<-", haskey, CJ, SJ, copy)
99
export(setindex, setindexv, indices)
1010
export(as.data.table,is.data.table,test.data.table)
11-
export(last,first,like,"%like%","%ilike%","%flike%","%plike%",between,"%between%",inrange,"%inrange%")
11+
export(last,first,like,"%like%","%ilike%","%flike%","%plike%",between,"%between%",inrange,"%inrange%", "%notin%")
1212
export(timetaken)
1313
export(truelength, setalloccol, alloc.col, ":=", let)
1414
export(setattr, setnames, setcolorder, set, setDT, setDF)
@@ -131,8 +131,7 @@ S3method(melt, default)
131131
export(melt.data.table, dcast.data.table)
132132

133133
import(utils)
134-
S3method(update, dev.pkg)
135-
export(update.dev.pkg)
134+
export(update_dev_pkg)
136135
S3method(tail, data.table)
137136
S3method(head, data.table)
138137
import(stats)

NEWS.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,9 @@
294294

295295
40. New functions `yearmon()` and `yearqtr` give a combined representation of `year()` and `month()`/`quarter()`. These and also `yday`, `wday`, `mday`, `week`, `month` and `year` are now optimized for memory and compute efficiency by removing the `POSIXlt` dependency, [#649](https://github.com/Rdatatable/data.table/issues/649). Thanks to Matt Dowle for the request, and Benjamin Schwendinger for the PR.
296296

297-
41. `first()` and `last()` gain `na.rm` taking values `FALSE` (default), `TRUE` or `"row"`, [#4239](https://github.com/Rdatatable/data.table/issues/4239). For vector input, `TRUE` and `"row"` are the same. For `data.table|frame` input, `TRUE` returns the first/last non-NA observation in each column, while `"row"` returns the first/last row where all columns are non-NA. `TRUE` is optimized by group and `"row"` may be optimized by group in future. `n>1` with `na.rm=TRUE` is also optimized by group. Thanks to Nicolas Bennett and Michael Chirico for the requests, and Benjamin Schwendinger for the PR.
297+
41. New function `%notin%` provides a convenient alternative to `!(x %in% y)`, [#4152](https://github.com/Rdatatable/data.table/issues/4152). Thanks to Jan Gorecki for suggesting and Michael Czekanski for the PR. `%notin%` uses half the memory because it computes the result directly as opposed to `!` which allocates a new vector to hold the negated result. If `x` is long enough to occupy more than half the remaining free memory, this can make the difference between the operation working, or failing with an out-of-memory error.
298+
299+
42. `first()` and `last()` gain `na.rm` taking values `FALSE` (default), `TRUE` or `"row"`, [#4239](https://github.com/Rdatatable/data.table/issues/4239). For vector input, `TRUE` and `"row"` are the same. For `data.table|frame` input, `TRUE` returns the first/last non-NA observation in each column, while `"row"` returns the first/last row where all columns are non-NA. `TRUE` is optimized by group and `"row"` may be optimized by group in future. `n>1` with `na.rm=TRUE` is also optimized by group. Thanks to Nicolas Bennett and Michael Chirico for the requests, and Benjamin Schwendinger for the PR.
298300

299301
```R
300302
x
@@ -677,6 +679,8 @@
677679

678680
16. The options `datatable.print.class` and `datatable.print.keys` are now `TRUE` by default. They have been available since v1.9.8 (Nov 2016) and v1.11.0 (May 2018) respectively.
679681

682+
17. `update.dev.pkg()` has been renamed `update_dev_pkg()` to get out of the way of the `stats::update` generic function, [#5421](https://github.com/Rdatatable/data.table/pull/5421). This is a utility function which upgrades the version of `data.table` to the latest commit in development which has also passed all tests. As such we don't expect any backwards compatibility concerns.
683+
680684

681685
# data.table [v1.14.2](https://github.com/Rdatatable/data.table/milestone/24?closed=1) (27 Sep 2021)
682686

R/devel.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ dcf.repo = function(pkg, repo, field, type) {
1717
dcf[dcf[,"Package"]==pkg, field][[1L]]
1818
}
1919

20-
update.dev.pkg = function(object="data.table", repo="https://Rdatatable.gitlab.io/data.table", field="Revision", type=getOption("pkgType"), lib=NULL, ...) {
20+
update_dev_pkg = function(object="data.table", repo="https://Rdatatable.gitlab.io/data.table", field="Revision", type=getOption("pkgType"), lib=NULL, ...) {
2121
# this works for any package, not just data.table
2222
pkg = object
2323
# perform package upgrade when new Revision present
@@ -32,7 +32,7 @@ update.dev.pkg = function(object="data.table", repo="https://Rdatatable.gitlab.i
3232
pkg, field, contrib.url(repo, type=type))
3333
# see if Revision is different then currently installed Revision, note that installed package will have Revision info only when it was installed from remote devel repo
3434
upg = una || !identical(ups, dcf.lib(pkg, field, lib.loc=lib))
35-
# update.dev.pkg fails on windows R 4.0.0, we have to unload package namespace before installing new version #4403
35+
# update_dev_pkg fails on windows R 4.0.0, we have to unload package namespace before installing new version #4403
3636
on.exit({
3737
if (upg) {
3838
unloadNamespace(pkg) ## hopefully will release dll lock on Windows

R/notin.R

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
"%notin%" = function(x, table) {
2+
if (is.character(x) && is.character(table)) {
3+
.Call(Cnotchin, x, table)
4+
} else {
5+
match(x, table, nomatch = 0L) == 0L
6+
}
7+
}

R/onAttach.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
if (gettext("TRANSLATION CHECK") != "TRANSLATION CHECK")
2828
packageStartupMessagef("**********\nRunning data.table in English; package support is available in English only. When searching for online help, be sure to also check for the English error message. This can be obtained by looking at the po/R-<locale>.po and po/<locale>.po files in the package source, where the native language and English error messages can be found side-by-side\n**********")
2929
if (dev && (Sys.Date() - as.Date(d))>28L)
30-
packageStartupMessagef("**********\nThis development version of data.table was built more than 4 weeks ago. Please update: data.table::update.dev.pkg()\n**********")
30+
packageStartupMessagef("**********\nThis development version of data.table was built more than 4 weeks ago. Please update: data.table::update_dev_pkg()\n**********")
3131
if (!.Call(ChasOpenMP)) {
3232
packageStartupMessagef("**********\nThis installation of data.table has not detected OpenMP support. It should still work but in single-threaded mode.\n", appendLF=FALSE)
3333
if (Sys.info()["sysname"] == "Darwin")

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
```r
4343
install.packages("data.table")
4444

45-
# latest development version:
46-
data.table::update.dev.pkg()
45+
# latest development version that has passed all tests:
46+
data.table::update_dev_pkg()
4747
```
4848

4949
See [the Installation wiki](https://github.com/Rdatatable/data.table/wiki/Installation) for more details.

0 commit comments

Comments
 (0)