Skip to content

Commit 3630413

Browse files
Merge branch 'master' into fix_fwrite_length
2 parents 309da8f + 23dac21 commit 3630413

Some content is hidden

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

54 files changed

+5142
-234
lines changed

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.dir-locals.el
2+
.check.translations.R
23
^\.Rprofile$
34
^data\.table_.*\.tar\.gz$
45
^config\.log$

.ci/.lintr.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ exclusions = c(local({
8484
infix_spaces_linter = Inf,
8585
undesirable_function_linter = Inf
8686
)),
87-
exclusion_for_dir("vignettes", list(
87+
exclusion_for_dir(c("vignettes", "vignettes/fr"), list(
8888
quotes_linter = Inf,
8989
sample_int_linter = Inf
9090
# strings_as_factors_linter = Inf

.ci/README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# data.table continuous integration and deployment
22

3-
On each Pull Request opened in GitHub we run GitHub Actions test jobs to provide prompt feedback about the status of PR. Our main CI pipeline runs on GitLab CI nightly. GitLab repository automatically mirrors our GitHub repository and runs pipeline on `master` branch every night. It tests more environments and different configurations. It publish variety of artifacts.
3+
On each Pull Request opened in GitHub we run GitHub Actions test jobs to provide prompt feedback about the status of PR. Our more thorough main CI pipeline runs nightly on GitLab CI. GitLab repository automatically mirrors our GitHub repository and runs pipeline on `master` branch every night. It tests more environments and different configurations. It publishes a variety of artifacts such as our [homepage](https://rdatatable.gitlab.io/data.table/) and [CRAN-like website for dev version](https://rdatatable.gitlab.io/data.table/web/packages/data.table/index.html), including windows binaries for the dev version.
44

55
## Environments
66

@@ -44,3 +44,22 @@ Base R implemented helper script, [originally proposed to base R](https://svn.r-
4444
### [`publish.R`](./publish.R)
4545

4646
Base R implemented helper script to orchestrate generation of most artifacts and to arrange them nicely. It is being used only in [_integration_ stage in GitLab CI pipeline](./../.gitlab-ci.yml).
47+
48+
## GitLab Open Source Program
49+
50+
We are currently part of the [GitLab for Open Source Program](https://about.gitlab.com/solutions/open-source/). This gives us 50,000 compute minutes per month for our GitLab CI. Our license needs to be renewed yearly (around July) and is currently managed by @ben-schwen.
51+
52+
## Updating CI pipeline
53+
54+
Basic CI checks are also run on every push to the GitLab repository. This can **and should** be used for PRs changing the CI pipeline before merging them to master.
55+
56+
```shell
57+
# fetch changes from remote (GitHub) and push them to GitLab
58+
git fetch [email protected]:Rdatatable/data.table.git new_branch:new_branch
59+
git push
60+
# after updating on GitHub, pull changes from remote and push to GitLab
61+
git pull [email protected]:Rdatatable/data.table.git new_branch
62+
git push
63+
```
64+
65+
Make sure to include a link to the pipeline results in your PR.

.ci/atime/tests.R

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,31 @@ for (extra.arg in extra.args.6107){
1919
extra.test.list[[sprintf("fread(%s) improved in #6107", extra.arg)]] <- this.test
2020
}
2121

22+
# Test case adapted from https://github.com/Rdatatable/data.table/pull/4386#issue-602528139 which is where the performance was improved.
23+
for(retGrp_chr in c("T","F"))extra.test.list[[sprintf(
24+
"forderv(retGrp=%s) improved in #4386", retGrp_chr
25+
)]] <- list(
26+
setup = quote({
27+
dt <- data.table(group = rep(1:2, l=N))
28+
}),
29+
expr = substitute({
30+
old.opt <- options(datatable.forder.auto.index = TRUE) # required for test, un-documented, comments in forder.c say it is for debugging only.
31+
data.table:::forderv(dt, "group", retGrp = RETGRP)
32+
options(old.opt) # so the option does not affect other tests.
33+
}, list(RETGRP=eval(str2lang(retGrp_chr)))),
34+
## From ?bench::mark, "Each expression will always run at least twice,
35+
## once to measure the memory allocation and store results
36+
## and one or more times to measure timing."
37+
## So for atime(times=10) that means 11 times total.
38+
## First time for memory allocation measurement,
39+
## (also sets the index of dt in this example),
40+
## then 10 more times for time measurement.
41+
## Timings should be constant if the cached index is used (Fast),
42+
## and (log-)linear if the index is re-computed (Slow).
43+
Slow = "b1b1832b0d2d4032b46477d9fe6efb15006664f4", # Parent of the first commit (https://github.com/Rdatatable/data.table/commit/b0efcf59442a7d086c6df17fa6a45c81b082322e) in the PR (https://github.com/Rdatatable/data.table/pull/4386/commits) where the performance was improved.
44+
Fast = "ffe431fbc1fe2d52ed9499f78e7e16eae4d71a93" # Last commit of the PR (https://github.com/Rdatatable/data.table/pull/4386/commits) where the performance was improved.
45+
)
46+
2247
# A list of performance tests.
2348
#
2449
# See documentation in https://github.com/Rdatatable/data.table/wiki/Performance-testing for best practices.

.ci/ci.R

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ mirror.packages <-
111111
function(pkgs,
112112
which = c("Depends", "Imports", "LinkingTo"),
113113
repos = getOption("repos"),
114-
type = c("source", "mac.binary", "win.binary"),
114+
type = c("source", "mac.binary.big-sur-arm64", "win.binary"),
115115
repodir,
116116
except.repodir = repodir,
117117
except.priority = "base",
@@ -169,7 +169,8 @@ function(pkgs,
169169
newpkgs <- newpkgs[availpkgs]
170170
}
171171

172-
pkgsext <- switch(type,
172+
typeshort <- if (startsWith(type, "mac.binary.")) "mac.binary" else type
173+
pkgsext <- switch(typeshort,
173174
"source" = "tar.gz",
174175
"mac.binary" = "tgz",
175176
"win.binary" = "zip")
@@ -181,7 +182,7 @@ function(pkgs,
181182
dp <- utils::download.packages(pkgs = newpkgs, destdir = destdir,
182183
available = db, contriburl = repos.url,
183184
type = type, method = method, quiet = quiet)
184-
tools::write_PACKAGES(dir = destdir, type = type, ...)
185+
tools::write_PACKAGES(dir = destdir, type = typeshort, ...)
185186
dp
186187
}
187188

.ci/publish.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ format.bins <- function(ver, bin_ver, cran.home, os.type, pkg, version, repodir)
2727
plat.path = "windows"
2828
} else if (os.type=="macosx") {
2929
ext = "tgz"
30-
plat.path = "macosx/el-capitan"
30+
plat.path = "macosx/big-sur-arm64"
3131
} else stop("format.bins only valid for 'windows' or 'macosx' os.type")
3232
file = sprintf("bin/%s/contrib/%s/%s_%s.%s", plat.path, bin_ver, pkg, version, ext)
3333
fe = file.exists(file.path(repodir, file))

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
echo "LC_ALL=lv_LV.utf8" >> $GITHUB_ENV
6666
echo "LANGUAGE=lv_LV" >> $GITHUB_ENV
6767
68-
- uses: actions/checkout@v2
68+
- uses: actions/checkout@v4
6969

7070
- uses: r-lib/actions/setup-r@v2
7171
with:

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
3838

3939
steps:
40-
- uses: actions/checkout@v2
40+
- uses: actions/checkout@v4
4141

4242
- uses: r-lib/actions/setup-r@v2
4343
with:
@@ -52,7 +52,7 @@ jobs:
5252
shell: Rscript {0}
5353

5454
- name: Restore R package cache
55-
uses: actions/cache@v2
55+
uses: actions/cache@v4
5656
with:
5757
path: ${{ env.R_LIBS_USER }}
5858
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}

.github/workflows/code-quality.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
on:
22
push:
3-
branches:
4-
- master
3+
branches: [master]
54
pull_request:
6-
branches:
7-
- master
85

96
name: code-quality
107

.github/workflows/performance-tests.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ name: atime performance tests
22

33
on:
44
pull_request:
5-
branches:
6-
- '*'
75
types:
86
- opened
97
- reopened
@@ -22,4 +20,4 @@ jobs:
2220
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
2321
repo_token: ${{ secrets.GITHUB_TOKEN }}
2422
steps:
25-
- uses: Anirban166/Autocomment-atime-results@v1.2.1
23+
- uses: Anirban166/Autocomment-atime-results@v1.4.1

0 commit comments

Comments
 (0)