Skip to content

Commit 9f5b9ab

Browse files
authored
Merge branch 'master' into staticBufferRemoval
2 parents 6b223e0 + 05d6797 commit 9f5b9ab

26 files changed

+170
-101
lines changed

.ci/atime/tests.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
pval.thresh <- 0.001 # to reduce false positives.
2+
13
# Test case adapted from https://github.com/Rdatatable/data.table/issues/6105#issue-2268691745 which is where the issue was reported.
24
# https://github.com/Rdatatable/data.table/pull/6107 fixed performance across 3 ways to specify a column as Date, and we test each individually.
35
extra.args.6107 <- c(

.ci/linters/c/cocci_linter.R

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
cocci_linter = if (!nzchar(Sys.which("spatch"))) function(...) {} else function(c_obj) {
2-
bad <- FALSE
2+
bad = FALSE
3+
tmp = tempfile(fileext = '.c')
4+
on.exit(unlink(tmp))
5+
writeLines(c_obj$preprocessed, tmp)
36
for (spfile in list.files(".ci/linters/cocci", full.names = TRUE)) {
4-
# Coccinelle parser gets confused sometimes, so ignore stderr and the exit code
5-
out = suppressWarnings(system2(
7+
out = system2(
68
"spatch",
7-
shQuote(c(
8-
"--sp-file", spfile, c_obj$path, "--recursive-includes",
9-
"-I", R.home("include"), "-I", "src"
10-
)),
9+
shQuote(c("--sp-file", spfile, tmp)),
1110
stdout = TRUE, stderr = FALSE
12-
))
11+
)
1312
if (length(out) > 0) {
14-
cat(sprintf("In file '%s', Coccinelle patch '%s' recommends the following changes:\n", c_obj$path, spfile))
13+
cat(sprintf("In file '%s', Coccinelle linter '%s' located the following problems:\n", c_obj$path, spfile))
1514
writeLines(out)
16-
bad <- TRUE
15+
bad = TRUE
16+
}
17+
if (!is.null(status <- attr(out, 'status'))) {
18+
cat(sprintf("While working on file '%s', Coccinelle linter '%s' failed with exit code %d:\n", c_obj$path, spfile, status))
19+
bad = TRUE
1720
}
1821
}
19-
if (bad) stop("Please apply the changes above or fix the linter")
22+
if (bad) stop("Please investigate the problems above.")
2023
}

.ci/linters/cocci/malloc_return_value_cast.cocci

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ expression E;
55
- (T)
66
malloc(E)
77

8+
@calloc_realloc_return_value_cast expression@
9+
type T;
10+
expression E1, E2;
11+
identifier alloc =~ "^(c|re)alloc$";
12+
@@
813
- (T)
9-
calloc(_, E)
10-
11-
- (T)
12-
realloc(_, E)
14+
alloc(E1, E2)

.github/CODE_OF_CONDUCT.md

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,16 @@
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.
1+
The R data.table project adheres to NumFOCUS's Code of Conduct.
22

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.
3+
# The NumFOCUS Code of Conduct
44

5-
Examples of unacceptable behavior by participants include:
5+
## The Short Version
66

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
7+
Be kind to others. Do not insult or put down others. Behave professionally. Remember that harassment and sexist, racist, or exclusionary jokes are not appropriate for NumFOCUS.
138

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.
9+
All communication should be appropriate for a professional audience including people of many different backgrounds. Sexual language and imagery is not appropriate.
1510

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.
11+
NumFOCUS is dedicated to providing a harassment-free community for everyone, regardless of gender, sexual orientation, gender identity and expression, disability, physical appearance, body size, race, or religion. We do not tolerate harassment of community members in any form.
12+
Thank you for helping make this a welcoming, friendly community for all.
1713

18-
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
14+
[Code of Conduct Reporting Form](https://numfocus.typeform.com/to/ynjGdT)
1915

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:[email protected]). 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), Benjamin Schwendinger (@ben-schwen), and Ivan Krylov (@aitap).
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.
16+
For the full version of the Code of Conduct, please visit: [https://numfocus.org/code-of-conduct](https://numfocus.org/code-of-conduct).

.github/workflows/performance-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ jobs:
2020
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
2121
repo_token: ${{ secrets.GITHUB_TOKEN }}
2222
steps:
23-
- uses: Anirban166/[email protected].2
23+
- uses: Anirban166/[email protected].3

DESCRIPTION

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,5 +102,6 @@ Authors@R: c(
102102
person("Aljaž", "Sluga", role="ctb"),
103103
person("Bill", "Evans", role="ctb"),
104104
person("Reino", "Bruner", role="ctb"),
105-
person(comment=c(github="@badasahog"), role="ctb")
105+
person(comment=c(github="@badasahog"), role="ctb"),
106+
person("Vinit", "Thakur", role="ctb")
106107
)

GOVERNANCE.md

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -108,23 +108,14 @@ Please also make a note in the change log under [`# Governance history`](#govern
108108

109109
# Finances and Funding
110110

111-
There is currently no mechanism for the data.table project to receive funding as an entity.
111+
data.table is a [NumFOCUS](https://numfocus.org/) project. Donations to the data.table can be made at [https://numfocus.org/project/data-table]([https://numfocus.org/donate-to-data-table](https://app.hubspot.com/payments/FFWKWTTvKFdzqH?referrer=PAYMENT_LINK))
112112

113-
Funding support for this project therefore may come in two forms:
113+
*NumFOCUS is a 501(c)(3) non-profit charity in the United States; as such, donations to NumFOCUS are tax-deductible as allowed by law. As with any donation, you should consult with your personal tax adviser or the IRS about your particular tax situation.*
114114

115-
## Individual external funding
116115

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.
116+
## Decision-making for funding use
118117

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.
120-
121-
## Direct donations
122-
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.
124-
125-
## Decision-making for future opportunities
126-
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).
118+
We here outline a procedure for disbursing funds acquired through direct donations via NumFOCUS or grant-style research funding.
128119

129120
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.
130121

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

149140
# Governance history
150141

142+
May 2025: update Finance and CoC language for NumFOCUS incorporation.
143+
151144
Feb 2025: add Finances and Funding section, update Code of Conduct section to be a brief summary and reference the broader CoC document.
152145

153146
Jan 2025: clarify that edits to governance should notify all committers, and that role names are proper nouns (i.e., upper-case) throughout.

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@
3838

3939
9. Joins to extended data.frames, e.g. `x[i, col := x.col1 + i.col2]` where `i` is a `tbl`, can use the `x.` and `i.` prefix forms, [#6998](https://github.com/Rdatatable/data.table/issues/6998). Thanks @MichaelChirico for the bug and PR.
4040

41+
10. On a heavily loaded machine, a `forder` thread could try to perform a zero-length copy from a null pointer, which was de-facto harmless but is against the C standard and was caught by additional CRAN checks, [#7051](https://github.com/Rdatatable/data.table/issues/7051). Thanks to @helske for the report and @aitap for the PR.
42+
43+
11. Out of sample type bumps now respect `integer64=` selection, [#7032](https://github.com/Rdatatable/data.table/pull/7032).
44+
4145
### NOTES
4246

4347
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/.

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,27 @@
1010
[![CRAN usage](https://jangorecki.gitlab.io/rdeps/data.table/CRAN_usage.svg?sanitize=true)](https://gitlab.com/jangorecki/rdeps)
1111
[![BioC usage](https://jangorecki.gitlab.io/rdeps/data.table/BioC_usage.svg?sanitize=true)](https://gitlab.com/jangorecki/rdeps)
1212
[![indirect usage](https://jangorecki.gitlab.io/rdeps/data.table/indirect_usage.svg?sanitize=true)](https://gitlab.com/jangorecki/rdeps)
13+
[![Powered by NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A )](http://numfocus.org)
1314
<!-- badges: end -->
1415

1516
`data.table` provides a high-performance version of [base R](https://www.r-project.org/about.html)'s `data.frame` with syntax and feature enhancements for ease of use, convenience and programming speed.
1617

18+
[//]: # (numfocus-fiscal-sponsor-attribution)
19+
20+
The `data.table` project uses a [custom governance agreement](./GOVERNANCE.md)
21+
and is fiscally sponsored by [NumFOCUS](https://numfocus.org/). Consider making
22+
a [tax-deductible donation](https://numfocus.org/project/data-table) to help the project
23+
pay for developer time, professional services, travel, workshops, and a variety of other needs.
24+
25+
<div align="center">
26+
<a href="https://numfocus.org/project/data-table">
27+
<img width="25%"
28+
src="https://raw.githubusercontent.com/numfocus/templates/master/images/numfocus-logo.png"
29+
align="center">
30+
</a>
31+
</div>
32+
<br>
33+
1734
## Why `data.table`?
1835

1936
* concise syntax: fast to type, fast to read

inst/tests/tests.Rraw

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3070,6 +3070,16 @@ if (test_bit64) test(1017.1, fread(f), copy(DT)[,A:=as.integer64(A)])
30703070
test(1017.2, fread(f, integer64="character"), DT)
30713071
unlink(f)
30723072

3073+
DT = data.table(a=seq(10000), b="100")
3074+
DT[111, b := "1000000000000"]
3075+
f = tempfile()
3076+
fwrite(DT, f)
3077+
3078+
test(1017.3, fread(f, integer64="numeric"), fread(f, colClasses=c("integer", "numeric")))
3079+
test(1017.4, fread(f, integer64="character"), fread(f, colClasses=c("integer", "character")))
3080+
3081+
unlink(f)
3082+
30733083
# ERANGE errno handled, #106 #4165
30743084
test(1018.1, identical(fread("1.46761e-313\n"), data.table(V1=1.46761e-313)))
30753085
test(1018.2, identical(fread("1.46761e+313\n"), data.table(V1=1.46761e+313)))

0 commit comments

Comments
 (0)