Skip to content

Commit 89f28f3

Browse files
committed
Merge branch 'master' into froll2025
2 parents 784ad57 + 8647d44 commit 89f28f3

File tree

12 files changed

+329
-300
lines changed

12 files changed

+329
-300
lines changed

.ci/.lintr.R

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ linters = c(dt_linters, all_linters(
1616
# system_time_linter = undesirable_function_linter(c(
1717
# system.time = "Only run timings in benchmark.Rraw"
1818
# )),
19+
undesirable_function_linter(c(
20+
cat = "Use catf to enable translations",
21+
message = "Use messagef to avoid fragmented translations.",
22+
warning = "Use warningf to avoid fragmented translations.",
23+
stop = "Use stopf to avoid fragmented translations.",
24+
NULL
25+
)),
1926
# undesirable_function_linter(modify_defaults(
2027
# default_undesirable_functions,
2128
# ifelse = "Use fifelse instead.",

.dev/CRAN_Release.cmd

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -95,17 +95,6 @@ grep "PROTECT_PTR" ./src/*.c
9595
# No use of long long, instead use int64_t. TODO
9696
# grep "long long" ./src/*.c
9797

98-
// No use of llu, lld, zd or zu
99-
grep -nE "(llu|lld|zd|zu)" src/*.[hc]
100-
// Comment moved here from fread.c on 19 Nov 2019
101-
// [Moved from fread.c on 19 Nov 2019] On Windows variables of type `size_t` cannot be printed
102-
// with "%zu" in the `snprintf()` function. For those variables we used to cast them into
103-
// `unsigned long long int` before printing, and defined (llu) to make the cast shorter.
104-
// We're now observing warnings from gcc-8 with -Wformat-extra-args, #4062. So
105-
// now we're more strict and cast to [u]int64_t and use PRIu64/PRId64 from <inttypes.h>
106-
// In many cases the format specifier is passed to our own macro (e.g. DTPRINT) or to Rprintf(),
107-
// error() etc, and even if they don't call sprintf() now, they could in future.
108-
10998
# No tabs in C or R code (sorry, Richard Hendricks)
11099
grep -P "\t" ./R/*.R
111100
grep -P "\t" ./src/*.c

.dev/README.md

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

3+
Inside this repository we provide some tools to improves development experience. Most notable is the `cc()` helper function that recompiles C sources, reloads R sources, and runs tests.
4+
5+
Typical development workflow will then look like:
6+
7+
0. `git checkout -b [branch]`
8+
1. edit package files
9+
2. run `R`
10+
3. call `cc(TRUE)`
11+
4. (if needed) go to point 1.
12+
13+
Once we (and tests) are satisfied with changes, we then run complete package checks:
14+
15+
0. in shell terminal
16+
1. run `make build`
17+
2. run `make check`
18+
3. (optionally) run on `r-devel`, e.g. `R=~/build/R-devel/bin/R make check`
19+
4. (optionally) run on ancient R, e.g. `R=~/build/R-340/bin/R make check`
20+
5. `git commit -m '[changes description]'`
21+
6. `git push [remote] [branch]`
22+
323
## Setup
424

525
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.

.github/CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ See [`?test`](https://rdatatable.gitlab.io/data.table/reference/test.html).
7676
1. **[Squashing Github pull requests into a single commit](http://eli.thegreenplace.net/2014/02/19/squashing-github-pull-requests-into-a-single-commit)**.
7777
1. **[Github help](https://help.github.com/articles/using-pull-requests/)** - you'll need the *fork and pull* model.
7878

79+
#### Performance testing
80+
81+
If your PR may have an effect on time/memory usage, please consider adding a performance test, either in the same PR, or a follow-up PR. Note that first-time contributors _must_ do so in a follow-up PR, since the tests are only run on PRs from branches created directly in the Rdatatable/data.table repo. See the [Performance testing](https://github.com/Rdatatable/data.table/wiki/Performance-testing) wiki page for details.
82+
7983
Minimal first time PR
8084
---------------------
8185

DESCRIPTION

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Authors@R: c(
5656
person("Martin","Morgan", role="ctb"),
5757
person("Michael","Quinn", role="ctb"),
5858
person("@javrucebo","", role="ctb"),
59-
person("@marc-outins","", role="ctb"),
59+
person("Marc","Halperin", role="ctb"),
6060
person("Roy","Storey", role="ctb"),
6161
person("Manish","Saraswat", role="ctb"),
6262
person("Morgan","Jacob", role="ctb"),
@@ -101,5 +101,6 @@ Authors@R: c(
101101
person("Vijay", "Lulla", role="ctb"),
102102
person("Aljaž", "Sluga", role="ctb"),
103103
person("Bill", "Evans", role="ctb"),
104-
person("Reino", "Bruner", role="ctb")
104+
person("Reino", "Bruner", role="ctb"),
105+
person(comment=c(github="@badasahog"), role="ctb")
105106
)

NEWS.0.md

Lines changed: 140 additions & 138 deletions
Large diffs are not rendered by default.

NEWS.1.md

Lines changed: 78 additions & 76 deletions
Large diffs are not rendered by default.

NEWS.md

Lines changed: 34 additions & 32 deletions
Large diffs are not rendered by default.

src/assign.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ SEXP setdt_nrows(SEXP x)
215215
* many operations still work in the presence of NULL columns and it might be convenient
216216
* e.g. in package eplusr which calls setDT on a list when parsing JSON. Operations which
217217
* fail for NULL columns will give helpful error at that point, #3480 and #3471 */
218-
if (Rf_isNull(xi)) continue;
218+
if (isNull(xi)) continue;
219219
if (Rf_inherits(xi, "POSIXlt")) {
220220
error(_("Column %d has class 'POSIXlt'. Please convert it to POSIXct (using as.POSIXct) and run setDT() again. We do not recommend the use of POSIXlt at all because it uses 40 bytes to store one date."), i+1);
221221
}

src/data.table.h

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,10 @@
1010
# define INTEGER_RO INTEGER
1111
# define REAL_RO REAL
1212
# define COMPLEX_RO COMPLEX
13-
# define R_Calloc(x, y) Calloc(x, y) // #6380
14-
# define R_Realloc(x, y, z) Realloc(x, y, z)
15-
# define R_Free(x) Free(x)
13+
# define RAW_RO RAW
14+
# define LOGICAL_RO LOGICAL
1615
#endif
17-
#if R_VERSION < R_Version(3, 4, 0)
18-
# define SET_GROWABLE_BIT(x) // #3292
19-
#endif
20-
// TODO: remove the `R_SVN_VERSION` check when R 4.5.0 is released (circa Apr. 2025)
21-
#if R_VERSION < R_Version(4, 5, 0) || R_SVN_REVISION < 86702
16+
#if R_VERSION < R_Version(4, 5, 0)
2217
# define isDataFrame(x) isFrame(x) // #6180
2318
#endif
2419
#if !defined(R_VERSION) || R_VERSION < R_Version(3, 4, 0)
@@ -45,8 +40,7 @@
4540
/* we mean the encoding bits, not CE_NATIVE in a UTF-8 locale */
4641
#define IS_UTF8(x) (getCharCE(x) == CE_UTF8)
4742
#define IS_LATIN(x) (getCharCE(x) == CE_LATIN1)
48-
// TODO: remove the `R_SVN_VERSION` check when R 4.5.0 is released (circa Apr. 2025)
49-
#if R_VERSION < R_Version(4, 5, 0) || R_SVN_REVISION < 86789
43+
#if R_VERSION < R_Version(4, 5, 0)
5044
# define IS_ASCII(x) (LEVELS(x) & 64)
5145
#else
5246
# define IS_ASCII(x) (Rf_charIsASCII(x)) // no CE_ASCII

0 commit comments

Comments
 (0)