Skip to content

Commit f62143d

Browse files
Merge branch 'master' into depr-autostart
2 parents 88edda8 + 885bdb3 commit f62143d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+532
-236
lines changed

.ci/.lintr.R

+34-40
Original file line numberDiff line numberDiff line change
@@ -71,45 +71,39 @@ linters = c(dt_linters, all_linters(
7171
))
7272
rm(dt_linters)
7373

74-
# TODO(lintr#2172): Glob with lintr itself.
75-
exclusions = c(local({
76-
exclusion_for_dir <- function(dir, exclusions) {
77-
files = file.path("..", list.files(dir, pattern = "\\.(R|Rmd|Rraw)$", full.names=TRUE))
78-
stats::setNames(rep(list(exclusions), length(files)), files)
79-
}
80-
c(
81-
exclusion_for_dir("tests", list(
82-
quotes_linter = Inf,
83-
# TODO(michaelchirico): Enforce these and re-activate them one-by-one.
84-
implicit_integer_linter = Inf,
85-
infix_spaces_linter = Inf,
86-
undesirable_function_linter = Inf
87-
)),
88-
exclusion_for_dir(c("vignettes", "vignettes/fr", "vignettes/ru"), list(
89-
# assignment_linter = Inf,
90-
implicit_integer_linter = Inf,
91-
quotes_linter = Inf,
92-
sample_int_linter = Inf
93-
# strings_as_factors_linter = Inf
94-
# system_time_linter = Inf
95-
)),
96-
exclusion_for_dir("inst/tests", list(
97-
library_call_linter = Inf,
98-
numeric_leading_zero_linter = Inf,
99-
undesirable_operator_linter = Inf, # For ':::', possibly we could be more careful to only exclude ':::'.
100-
# TODO(michaelchirico): Enforce these and re-activate them one-by-one.
101-
comparison_negation_linter = Inf,
102-
condition_call_linter = Inf,
103-
duplicate_argument_linter = Inf,
104-
equals_na_linter = Inf,
105-
missing_argument_linter = Inf,
106-
paste_linter = Inf,
107-
rep_len_linter = Inf,
108-
sample_int_linter = Inf,
109-
seq_linter = Inf,
110-
unnecessary_lambda_linter = Inf
111-
))
74+
exclusions = list(
75+
`../tests` = list(
76+
quotes_linter = Inf,
77+
# TODO(michaelchirico): Enforce these and re-activate them one-by-one.
78+
implicit_integer_linter = Inf,
79+
infix_spaces_linter = Inf,
80+
undesirable_function_linter = Inf
81+
),
82+
`../vignettes*` = list(
83+
# assignment_linter = Inf,
84+
implicit_integer_linter = Inf,
85+
quotes_linter = Inf,
86+
sample_int_linter = Inf
87+
# strings_as_factors_linter = Inf
88+
# system_time_linter = Inf
89+
),
90+
`../inst/tests` = list(
91+
library_call_linter = Inf,
92+
numeric_leading_zero_linter = Inf,
93+
undesirable_operator_linter = Inf, # For ':::', possibly we could be more careful to only exclude ':::'.
94+
# TODO(michaelchirico): Enforce these and re-activate them one-by-one.
95+
comparison_negation_linter = Inf,
96+
condition_call_linter = Inf,
97+
duplicate_argument_linter = Inf,
98+
equals_na_linter = Inf,
99+
missing_argument_linter = Inf,
100+
paste_linter = Inf,
101+
rep_len_linter = Inf,
102+
sample_int_linter = Inf,
103+
seq_linter = Inf,
104+
unnecessary_lambda_linter = Inf
105+
),
106+
`../inst/tests/froll.Rraw` = list(
107+
dt_test_literal_linter = Inf # TODO(michaelchirico): Fix these once #5898, #5692, #5682, #5576, #5575, #5441 are merged.
112108
)
113-
}),
114-
list(`../inst/tests/froll.Rraw` = list(dt_test_literal_linter = Inf)) # TODO(michaelchirico): Fix these once #5898, #5692, #5682, #5576, #5575, #5441 are merged.
115109
)

.dev/CRAN_Release.cmd

+1-3
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ potools::check_untranslated_src(message_db)
1818
potools::po_extract(custom_translation_functions = dt_custom_translators)
1919

2020
# 2) Open a PR with the new templates & contact the translators
21-
# * zh_CN: @hongyuanjia
22-
# * pt_BR: @rffontenelle
23-
# * es: @rikivillalba
21+
# using @Rdatatable/<lang>, e.g. @Rdatatable/chinese
2422
## Translators to submit commits with translations to this PR
2523
## [or perhaps, if we get several languages, each to open
2624
## its own PR and merge to main translation PR]

.github/CODE_OF_CONDUCT.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
2+
3+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
4+
5+
Examples of unacceptable behavior by participants include:
6+
7+
* The use of sexualized language or imagery
8+
* Personal attacks
9+
* Trolling or insulting/derogatory comments
10+
* Public or private harassment
11+
* Publishing other's private information, such as physical or electronic addresses, without explicit permission
12+
* Other unethical or unprofessional conduct
13+
14+
Project members with the Committer role have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
15+
16+
By adopting this Code of Conduct, project members commit themselves to fairly and consistently apply these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.
17+
18+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
19+
20+
21+
## Reporting
22+
23+
Project members with the Committer role or the CRAN Maintainer role are pledged to promptly address any reported issues. Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to any individual with this role.
24+
25+
Those who prefer to report in a way that is independent of the current Committers and Maintainer may instead contact the Community Engagement Coordinator by e-mailing [r.data.table\@gmail.com](mailto:r.data.table@gmail.com). Messages sent to this e-mail address will be visible only to the current Community Engagement Coordinator, a position always held by an individual who is not a Committer or CRAN Maintainer of the package.
26+
27+
The current Committers are Toby Dylan Hocking (@tdhock), Matt Dowle (@mattdowle), Arun Srinivasan (@arunsrinivasan), Jan Gorecki (@jangorecki), Michael Chirico (@MichaelChirico), and Benjamin Schwendinger (@ben-schwen).
28+
29+
The current CRAN Maintainer is Tyson Barrett (@tysonstanley).
30+
31+
The current Community Engagement Coordinator is Kelly Bodwin (@kbodwin).
32+
33+
All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. Complaint respondents are obligated to maintain confidentiality with regard to the reporter of an incident.
34+
35+
This Code of Conduct is adapted from the [Contributor Covenant, version 1.3.0](https://www.contributor-covenant.org/version/1/3/0/code-of-conduct/), available at [https://www.contributor-covenant.org/version/1/3/0/](https://www.contributor-covenant.org/version/1/3/0/), and the Swift Code of Conduct.

.gitlab-ci.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ mirror-packages:
4444
stage: dependencies
4545
tags:
4646
- saas-linux-medium-amd64
47-
image: registry.gitlab.com/jangorecki/dockerfiles/r-base-minimal
47+
image: registry.gitlab.com/rdatatable/dockerfiles/r-base-minimal
4848
cache:
4949
paths:
5050
- bus/$CI_JOB_NAME/cran
@@ -67,7 +67,7 @@ build:
6767
stage: build
6868
tags:
6969
- saas-linux-medium-amd64
70-
image: registry.gitlab.com/jangorecki/dockerfiles/r-base-gcc
70+
image: registry.gitlab.com/rdatatable/dockerfiles/r-base-gcc
7171
needs: ["mirror-packages"]
7272
before_script:
7373
- *install-deps
@@ -106,7 +106,7 @@ build:
106106
# tests for compilation warnings
107107
test-lin-rel:
108108
<<: *test-lin
109-
image: registry.gitlab.com/jangorecki/dockerfiles/r-data.table
109+
image: registry.gitlab.com/rdatatable/dockerfiles/r-data.table
110110
variables:
111111
_R_CHECK_COMPILATION_FLAGS_KNOWN_: "-Wvla"
112112
_R_CHECK_CRAN_INCOMING_: "FALSE"
@@ -128,7 +128,7 @@ test-lin-rel:
128128
# flags: gcc -O0 -fno-openmp
129129
test-lin-rel-vanilla:
130130
<<: *test-lin
131-
image: registry.gitlab.com/jangorecki/dockerfiles/r-base-gcc
131+
image: registry.gitlab.com/rdatatable/dockerfiles/r-base-gcc
132132
variables:
133133
_R_CHECK_COMPILATION_FLAGS_KNOWN_: "-Wvla"
134134
script:
@@ -141,7 +141,7 @@ test-lin-rel-vanilla:
141141
# extra NOTEs check and build pdf manual thus not from cran-lin template
142142
test-lin-rel-cran:
143143
<<: *test-lin
144-
image: registry.gitlab.com/jangorecki/dockerfiles/r-base
144+
image: registry.gitlab.com/rdatatable/dockerfiles/r-base
145145
variables:
146146
_R_CHECK_CRAN_INCOMING_: "TRUE" ## stricter --as-cran checks should run in dev pipelines continuously (not sure what they are though)
147147
_R_CHECK_CRAN_INCOMING_REMOTE_: "FALSE" ## Other than no URL checking (takes many minutes) or 'Days since last update 0' NOTEs needed, #3284
@@ -161,7 +161,7 @@ test-lin-rel-cran:
161161
# tests for new notes
162162
test-lin-dev-gcc-strict-cran:
163163
<<: *test-lin
164-
image: registry.gitlab.com/jangorecki/dockerfiles/r-devel-gcc-strict
164+
image: registry.gitlab.com/rdatatable/dockerfiles/r-devel-gcc-strict
165165
variables:
166166
_R_CHECK_COMPILATION_FLAGS_KNOWN_: "-Wvla"
167167
_R_CHECK_CRAN_INCOMING_: "TRUE"
@@ -183,7 +183,7 @@ test-lin-dev-gcc-strict-cran:
183183
# tests for new notes
184184
test-lin-dev-clang-cran:
185185
<<: *test-lin
186-
image: registry.gitlab.com/jangorecki/dockerfiles/r-devel-clang
186+
image: registry.gitlab.com/rdatatable/dockerfiles/r-devel-clang
187187
variables:
188188
_R_CHECK_COMPILATION_FLAGS_KNOWN_: "-Wvla"
189189
_R_CHECK_CRAN_INCOMING_: "TRUE"
@@ -203,7 +203,7 @@ test-lin-dev-clang-cran:
203203
# stated dependency on R
204204
test-lin-ancient-cran:
205205
<<: *test-lin
206-
image: registry.gitlab.com/jangorecki/dockerfiles/r-3.3.0
206+
image: registry.gitlab.com/rdatatable/dockerfiles/r-3.3.0
207207
variables:
208208
_R_CHECK_FORCE_SUGGESTS_: "FALSE" # can be removed if all dependencies are available (knitr, xts, etc.)
209209
script:
@@ -306,7 +306,7 @@ test-mac-old:
306306
# generating pkgdown website
307307
integration:
308308
stage: integration
309-
image: registry.gitlab.com/jangorecki/dockerfiles/r-pkgdown
309+
image: registry.gitlab.com/rdatatable/dockerfiles/r-pkgdown
310310
tags:
311311
- saas-linux-medium-amd64
312312
only:

DESCRIPTION

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ Authors@R: c(
1515
person("Tyson","Barrett", role=c("aut","cre"), email="t.barrett88@gmail.com", comment = c(ORCID="0000-0002-2137-1391")),
1616
person("Matt","Dowle", role="aut", email="mattjdowle@gmail.com"),
1717
person("Arun","Srinivasan", role="aut", email="asrini@pm.me"),
18-
person("Jan","Gorecki", role="aut"),
19-
person("Michael","Chirico", role="aut", comment = c(ORCID="0000-0003-0787-087X")),
20-
person("Toby","Hocking", role="aut", comment = c(ORCID="0000-0002-3146-0865")),
18+
person("Jan","Gorecki", role="aut", email="j.gorecki@wit.edu.pl"),
19+
person("Michael","Chirico", role="aut", email="michaelchirico4@gmail.com", comment = c(ORCID="0000-0003-0787-087X")),
20+
person("Toby","Hocking", role="aut", email="toby.hocking@r-project.org", comment = c(ORCID="0000-0002-3146-0865")),
2121
person("Benjamin","Schwendinger",role="aut", comment = c(ORCID="0000-0003-3315-8114")),
2222
person("Ivan", "Krylov", role="aut", email="ikrylov@disroot.org", comment = c(ORCID="0000-0002-0172-3812")),
2323
person("Pasha","Stetsenko", role="ctb"),

GOVERNANCE.md

+33-7
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,14 @@ Functionality that is out of current scope:
7272
* How to obtain this role: (1) merge into master a PR adding role="cre" to DESCRIPTION, and (2) submit updated package to CRAN (previous CRAN Maintainer will have to confirm change by email to CRAN).
7373
* How this role is recognized: credited via role="cre" in DESCRIPTION, so they appear as Maintainer on CRAN.
7474

75+
## Community Engagement Coordinator
76+
77+
* Definition: An individual who is involved in the project but does **not** also occupy the Committer or CRAN Maintainer role. In charge of maintaining The Raft blog, preparing Seal of Approval Applications, addressing Code of Conduct violations, and planning social or community events.
78+
79+
* How to obtain this role: At the discretion of the current Community Engagement Coordinator(s) in conversation with the current Committers.
80+
81+
* How this role is recognized: Holds the Owner role in the [rdatatable-community organization](https://github.com/orgs/rdatatable-community/people) on GitHub.
82+
7583
# Decision-making processes
7684

7785
## Definition of Consensus
@@ -98,19 +106,35 @@ There is no special process for changing this document. Submit a PR and ask for
98106

99107
Please also make a note in the change log under [`# Governance history`](#governance-history)
100108

101-
# Code of conduct
109+
# Finances and Funding
110+
111+
There is currently no mechanism for the data.table project to receive funding as an entity.
112+
113+
Funding support for this project therefore may come in two forms:
114+
115+
## Individual external funding
102116

103-
As contributors of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
117+
Any individual developer or community member of data.table may apply for and receive funding for their work on the project. Individuals or groups seeking funding support are strongly encouraged to consult directly with the data.table Project Members (by initiating an Issue on GitHub) to ensure funds are used meaningfully. Formally, however, decisions about use of funds are governed by the individual grantee(s) and their contract with the funding agency.
104118

105-
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, etc.
119+
There is no guarantee that funded work will be incorporated into the data.table package; any contributions, whether funded or unfunded, are subject to the same review process as outlined above.
106120

107-
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
121+
## Direct donations
108122

109-
Committers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. A person with special roles who does not follow the Code of Conduct may have their roles revoked.
123+
Direct donations to the project may be made via GitHub Sponsorships, which allow individuals to fund a specific developer. If the current CRAN Maintainer offers a personal sponsorship option, donations may be made to them to support the project in general.
110124

111-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or emailing one or more of the Committers.
125+
## Decision-making for future opportunities
112126

113-
This Code of Conduct is adapted from Tidyverse code of conduct.
127+
We here outline a procedure for disbursing funds, should this project in the future become a directly fundable entity (e.g. an LLC or a subsidiary of an umbrella LLC).
128+
129+
Funds acquired by the data.table project will be disbursed at the discretion of the **Committers**, defined as above. The **CRAN Maintainer** will have authority to make final decisions in the event that no consensus is reached among committers prior to deadlines for use of funds, and will be responsible for disbursement logistics.
130+
131+
# Code of conduct
132+
133+
The full Code of Conduct can be found [here](CODE_OF_CONDUCT.md), including details for reporting violations.
134+
135+
## Reporting Responsibility
136+
137+
Committers and the Community Engagement Coordinator pledge to address any publicly posted issues or privately sent messages regarding Code of Conduct violations in a respectful and timely manner.
114138

115139
# Version numbering
116140

@@ -124,6 +148,8 @@ data.table Version line in DESCRIPTION typically has the following meanings
124148

125149
# Governance history
126150

151+
Feb 2025: add Finances and Funding section, update Code of Conduct section to be a brief summary and reference the broader CoC document.
152+
127153
Jan 2025: clarify that edits to governance should notify all committers, and that role names are proper nouns (i.e., upper-case) throughout.
128154

129155
Feb 2024: change team name/link maintainers to committers, to be consistent with role defined in governance.

NAMESPACE

+3
Original file line numberDiff line numberDiff line change
@@ -206,3 +206,6 @@ S3method(format_list_item, data.frame)
206206

207207
export(fdroplevels, setdroplevels)
208208
S3method(droplevels, data.table)
209+
210+
# sort_by added in R 4.4.0, #6662, https://stat.ethz.ch/pipermail/r-announce/2024/000701.html
211+
if (getRversion() >= "4.4.0") S3method(sort_by, data.table)

NEWS.md

+16-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,23 @@
22

33
# data.table [v1.17.99](https://github.com/Rdatatable/data.table/milestone/35) (in development)
44

5+
## NEW FEATURES
6+
7+
1. New `sort_by()` method for data.tables, [#6662](https://github.com/Rdatatable/data.table/issues/6662). It uses `forder()` to improve upon the data.frame method and also match `DT[order(...)]` behavior with respect to locale. Thanks @rikivillalba for the suggestion and PR.
8+
9+
## BUG FIXES
10+
11+
1. Custom binary operators from the `lubridate` package now work with objects of class `IDate` as with a `Date` subclass, [#6839](https://github.com/Rdatatable/data.table/issues/6839). Thanks @emallickhossain for the report and @aitap for the fix.
12+
13+
2. `fwrite(compress="gzip")` once again produces a gzip header when the column names are missing or disabled, [@6852](https://github.com/Rdatatable/data.table/issues/6852). Thanks @maxscheiber for the report and @aitap for the fix.
14+
15+
3. `fread(keepLeadingZeros=TRUE)` now correctly parses dates with leading zeros as dates instead of strings, [#6851](https://github.com/Rdatatable/data.table/issues/6851). Thanks @TurnaevEvgeny for the report and @ben-schwen for the fix.
16+
517
## NOTES
618

7-
1. The following in-progress deprecations have proceeded:
19+
1. Continued work to remove non-API C functions, [#6180](https://github.com/Rdatatable/data.table/issues/6180). Thanks Ivan Krylov for the PRs and for writing a clear and concise guide about the R API: https://aitap.codeberg.page/R-api/.
20+
21+
2. The following in-progress deprecations have proceeded:
822

923
+ Argument `logicalAsInt` to `fwrite()` has been removed.
1024
+ Argument `autostart` to `fread()` has been removed.
@@ -25,7 +39,7 @@ rowwiseDT(
2539
a=,b=,c=, d=,
2640
1, 2, "a", 2:3,
2741
3, 4, "b", list("e"),
28-
5, 6, "c", ~a+b,
42+
5, 6, "c", ~a+b
2943
)
3044
#> a b c d
3145
#> <num> <num> <char> <list>

R/AllS4.R

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ if ("package:data.table" %in% search()) stopf("data.table package loaded. When d
33

44
## Allows data.table to be defined as an object of an S4 class,
55
## or even have data.table be a super class of an S4 class.
6-
methods::setOldClass(c('data.frame'))
76
methods::setOldClass(c('data.table', 'data.frame'))
87

98
## as(some.data.frame, "data.table")
@@ -16,7 +15,7 @@ methods::setAs("data.table", "data.frame", function(from) {
1615
as.data.frame(from)
1716
})
1817

19-
methods::setOldClass("IDate")
18+
methods::setOldClass(c("IDate", "Date"))
2019
methods::setOldClass("ITime")
2120

2221
methods::setAs("character", "IDate", function(from) as.IDate(from))

R/IDateTime.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ as.IDate.POSIXct = function(x, tz = attr(x, "tzone", exact=TRUE), ...) {
4040
if (is_utc(tz))
4141
(setattr(as.integer(as.numeric(x) %/% 86400L), "class", c("IDate", "Date"))) # %/% returns new object so can use setattr() on it; wrap with () to return visibly
4242
else
43-
as.IDate(as.Date(x, tz = if (is.null(tz)) '' else tz, ...))
43+
as.IDate(as.Date(x, tz = tz %||% '', ...))
4444
}
4545

4646
as.IDate.IDate = function(x, ...) x
@@ -147,7 +147,7 @@ as.ITime.default = function(x, ...) {
147147

148148
as.ITime.POSIXct = function(x, tz = attr(x, "tzone", exact=TRUE), ...) {
149149
if (is_utc(tz)) as.ITime(unclass(x), ...)
150-
else as.ITime(as.POSIXlt(x, tz = if (is.null(tz)) '' else tz, ...), ...)
150+
else as.ITime(as.POSIXlt(x, tz = tz %||% '', ...), ...)
151151
}
152152

153153
as.ITime.numeric = function(x, ms = 'truncate', ...) {

0 commit comments

Comments
 (0)