Skip to content

Commit c751124

Browse files
committed
Merge branch 'master' into frev
2 parents 181957e + faaae13 commit c751124

23 files changed

+303
-172
lines changed

.dev/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# data.table developer
22

3+
## Setup
4+
5+
To use the optional helper function `cc()`, one needs to set up the project path and source `.dev/cc.R` to use `cc()` conveniently. This works through creating an additional `.Rprofile` in the `data.table` directory.
6+
7+
```r
8+
# content of .Rprofile in the package directory
9+
Sys.setenv(PROJ_PATH="~/git/data.table")
10+
source(".dev/cc.R")
11+
```
12+
313
## Utilities
414

515
### [`cc.R`](./cc.R)

.github/workflows/R-CMD-check.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,8 @@
33
on:
44
push:
55
branches:
6-
- main
76
- master
87
pull_request:
9-
branches:
10-
- main
11-
- master
128

139
name: R-CMD-check
1410

.github/workflows/test-coverage.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
on:
22
push:
33
branches:
4-
- main
54
- master
65
pull_request:
7-
branches:
8-
- main
9-
- master
106

117
name: test-coverage
128

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Rplots.pdf
99
data.table_*.tar.gz
1010
data.table.Rcheck
1111
src/Makevars
12+
.Rprofile
1213

1314
# Package install
1415
inst/cc

.gitlab-ci.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ variables:
1414
## a non-UTC timezone, although, that's what we do routinely in dev.
1515
R_REL_VERSION: "4.3"
1616
R_REL_WIN_BIN: "https://cloud.r-project.org/bin/windows/base/old/4.3.2/R-4.3.2-win.exe"
17-
RTOOLS_REL_BIN: "https://cloud.r-project.org/bin/windows/Rtools/rtools43/files/rtools43-5863-5818.exe"
17+
RTOOLS_REL_BIN: "https://cloud.r-project.org/bin/windows/Rtools/rtools43/files/rtools43-5958-5975.exe"
1818
RTOOLS43_HOME: "/c/rtools"
1919
R_DEV_VERSION: "4.4"
2020
R_DEV_WIN_BIN: "https://cloud.r-project.org/bin/windows/base/R-devel-win.exe"
21-
RTOOLS_DEV_BIN: "https://cloud.r-project.org/bin/windows/Rtools/rtools43/files/rtools43-5863-5818.exe"
21+
RTOOLS_DEV_BIN: "https://cloud.r-project.org/bin/windows/Rtools/rtools43/files/rtools43-5958-5975.exe"
2222
RTOOLS44_HOME: "" ## in case R-devel will use new Rtools toolchain, now it uses 4.3 env var
2323
R_OLD_VERSION: "4.2"
2424
R_OLD_WIN_BIN: "https://cloud.r-project.org/bin/windows/base/old/4.2.3/R-4.2.3-win.exe"
@@ -211,8 +211,10 @@ test-lin-310-cran:
211211
tags:
212212
- shared-windows
213213
before_script:
214-
- curl.exe -s -o ../R-win.exe $R_BIN; Start-Process -FilePath ..\R-win.exe -ArgumentList "/VERYSILENT /DIR=C:\R" -NoNewWindow -Wait
215-
- curl.exe -s -o ../rtools.exe $RTOOLS_BIN; Start-Process -FilePath ..\rtools.exe -ArgumentList "/VERYSILENT /DIR=C:\rtools" -NoNewWindow -Wait
214+
- curl.exe -s -o ../R-win.exe $R_BIN --fail; if (!(Test-Path -Path ..\R-win.exe)) {Write-Error "R-win.exe not found, download failed?"}
215+
- Start-Process -FilePath ..\R-win.exe -ArgumentList "/VERYSILENT /DIR=C:\R" -NoNewWindow -Wait
216+
- curl.exe -s -o ../rtools.exe $RTOOLS_BIN --fail; if (!(Test-Path -Path ..\rtools.exe)) {Write-Error "rtools.exe not found, download failed?"}
217+
- Start-Process -FilePath ..\rtools.exe -ArgumentList "/VERYSILENT /DIR=C:\rtools" -NoNewWindow -Wait
216218
- $env:PATH = "C:\R\bin;C:\rtools\usr\bin;$env:PATH"
217219
- Rscript.exe -e "source('.ci/ci.R'); install.packages(dcf.dependencies('DESCRIPTION', which='all'), repos=file.path('file://',getwd(),'bus/mirror-packages/cran'), quiet=TRUE)"
218220
- cp.exe $(ls.exe -1t bus/build/data.table_*.tar.gz | head.exe -n 1) .

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
2-
* @mattdowle
2+
* @jangorecki @michaelchirico
33

44
# melt
55
/R/fmelt.R @tdhock

DESCRIPTION

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,7 @@ Authors@R: c(
8181
person("Olivier","Delmarcell", role="ctb"),
8282
person("Josh","O'Brien", role="ctb"),
8383
person("Dereck","de Mezquita", role="ctb"),
84-
person("Michael","Czekanski", role="ctb")
84+
person("Michael","Czekanski", role="ctb"),
85+
person("Dmitry", "Shemetov", role="ctb"),
86+
person("Nitish", "Jha", role="ctb")
8587
)

GOVERNANCE.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Functionality that is out of current scope:
6464

6565
* Definition: permission to commit to, and merge PRs into, master branch.
6666
* How to obtain this role: after a reviewer has a consistent history of careful reviews of others' PRs, then a current Committer should ask all other current Committers if they approve promoting the Reviewer to Committer, and it should be done if there is Consensus among active Committers.
67-
* How this role is recognized: credited via role="aut" in DESCRIPTION (so they appear in Author list on CRAN), and added to https://github.com/orgs/Rdatatable/teams/maintainers which gives permission to merge PRs into master branch.
67+
* How this role is recognized: credited via role="aut" in DESCRIPTION (so they appear in Author list on CRAN), and added to https://github.com/orgs/Rdatatable/teams/committers which gives permission to merge PRs into master branch.
6868

6969
## CRAN maintainer
7070

@@ -123,6 +123,9 @@ data.table Version line in DESCRIPTION typically has the following meanings
123123

124124
# Governance history
125125

126+
Feb 2024: change team name/link maintainers to committers, to be consistent with role defined in governance.
127+
126128
Nov-Dec 2023: initial version drafted by Toby Dylan Hocking and
127129
reviewed by Tyson Barrett, Jan Gorecki, Michael Chirico, Benjamin
128130
Schwendinger.
131+

NAMESPACE

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
useDynLib("data_table", .registration=TRUE)
22

33
## For S4-ization
4-
import(methods)
4+
importFrom(methods, "S3Part<-", slotNames)
5+
importMethodsFrom(methods, "[")
56
exportClasses(data.table, IDate, ITime)
67
##
78

@@ -130,11 +131,11 @@ S3method(melt, default)
130131
# and many packges on CRAN call dcast.data.table() and/or melt.data.table() directly. See #3082.
131132
export(melt.data.table, dcast.data.table)
132133

133-
import(utils)
134+
importFrom(utils, capture.output, contrib.url, download.file, flush.console, getS3method, head, packageVersion, tail, untar, unzip)
134135
export(update_dev_pkg)
135136
S3method(tail, data.table)
136137
S3method(head, data.table)
137-
import(stats)
138+
importFrom(stats, as.formula, na.omit, setNames, terms)
138139
S3method(na.omit, data.table)
139140

140141
S3method(as.data.table, xts)

NEWS.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,21 @@
1414
# 2:
1515
```
1616

17-
2. `cedta()` now returns `FALSE` if `.datatable.aware = FALSE` is set in the calling environment, [#5654](https://github.com/Rdatatable/data.table/issues/5654).
17+
2. `cedta()` now returns `FALSE` if `.datatable.aware = FALSE` is set in the calling environment, [#5654](https://github.com/Rdatatable/data.table/issues/5654). Thanks @dvg-p4 for the request and PR.
18+
19+
3. `split.data.table` also accepts a formula for `f`, [#5392](https://github.com/Rdatatable/data.table/issues/5392), mirroring the same in `base::split.data.frame` since R 4.1.0 (May 2021). Thanks to @XiangyunHuang for the request, and @ben-schwen for the PR.
20+
21+
4. Namespace-qualifying `data.table::shift()`, `data.table::first()`, or `data.table::last()` will not deactivate GForce, [#5942](https://github.com/Rdatatable/data.table/issues/5942). Thanks @MichaelChirico for the proposal and fix. Namespace-qualifying other calls like `stats::sum()`, `base::prod()`, etc., continue to work as an escape valve to avoid GForce, e.g. to ensure S3 method dispatch.
22+
23+
## BUG FIXES
24+
25+
1. `unique()` returns a copy the case when `nrows(x) <= 1` instead of a mutable alias, [#5932](https://github.com/Rdatatable/data.table/pull/5932). This is consistent with existing `unique()` behavior when the input has no duplicates but more than one row. Thanks to @brookslogan for the report and @dshemetov for the fix.
26+
27+
2. `dcast` handles coercion of `fill` to `integer64` correctly, [#4561](https://github.com/Rdatatable/data.table/issues/4561). Thanks to @emallickhossain for the bug report and @MichaelChirico for the fix.
28+
29+
3. Optimized `shift` per group produced wrong results when simultaneously subsetting, for example, `DT[i==1L, shift(x), by=group]`, [#5962](https://github.com/Rdatatable/data.table/issues/5962). Thanks to @renkun-ken for the report and Benjamin Schwendinger for the fix.
30+
31+
4. `dcast(fill=NULL)` only computes default fill value if necessary, which eliminates some previous warnings (for example, when fun.aggregate=min or max, warning was NAs introduced by coercion to integer range) which were potentially confusing, [#5512](https://github.com/Rdatatable/data.table/issues/5512), [#5390](https://github.com/Rdatatable/data.table/issues/5390). Thanks to Toby Dylan Hocking for the fix.
1832

1933
3. New `frev(x, copy=TRUE)` as a faster analogue to `base::rev()` for atomic vectors/lists, [#5885](https://github.com/Rdatatable/data.table/issues/5885). Thanks to Benjamin Schwendinger for suggesting and implementing.
2034

@@ -44,6 +58,12 @@
4458

4559
4. Erroneous assignment calls in `[` with a trailing comma (e.g. ``DT[, `:=`(a = 1, b = 2,)]``) get a friendlier error since this situation is common during refactoring and easy to miss visually. Thanks @MichaelChirico for the fix.
4660

61+
5. Input files are now kept open during `mmap()` when running under Emscripten, [emscripten-core/emscripten#20459](https://github.com/emscripten-core/emscripten/issues/20459). This avoids an error in `fread()` when running in WebAssembly, [#5969](https://github.com/Rdatatable/data.table/issues/5969). Thanks to @maek-ies for the report and @georgestagg for the PR.
62+
63+
6. `dcast()` message about `fun.aggregate` defaulting to `length()` when aggregation is necessary, which could be confusing if duplicates were unexpected, does better explaining the behavior and suggesting alternatives, [#5217](https://github.com/Rdatatable/data.table/issues/5217). Thanks @MichaelChirico for the suggestion and @Nj221102 for the fix.
64+
65+
7. Updated a test relying on `>` working for comparing language objects to a string, which will be deprecated by R, [#5977](https://github.com/Rdatatable/data.table/issues/5977); no user-facing effect. Thanks to R-core for continuously improving the language.
66+
4767
# data.table [v1.15.0](https://github.com/Rdatatable/data.table/milestone/29) (30 Jan 2024)
4868

4969
## BREAKING CHANGE

0 commit comments

Comments
 (0)