Skip to content

Commit 91a6c43

Browse files
Merge branch 'master' into dim_cedta
2 parents 9f8bc3d + 0a11ffa commit 91a6c43

File tree

298 files changed

+65496
-11182
lines changed

Some content is hidden

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

298 files changed

+65496
-11182
lines changed

.Rbuildignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
.dir-locals.el
2+
.check.translations.R
23
^\.Rprofile$
34
^data\.table_.*\.tar\.gz$
5+
^config\.log$
46
^vignettes/plots/figures$
57
^\.Renviron$
68
^[^/]+\.R$
@@ -15,8 +17,9 @@
1517
^\.devcontainer$
1618
^\.graphics$
1719
^\.github$
20+
^\.vscode$
21+
^\.zed$
1822

19-
^\.appveyor\.yml$
2023
^\.gitlab-ci\.yml$
2124

2225
^Makefile$
@@ -26,6 +29,7 @@
2629
^src/Makevars$
2730
^CODEOWNERS$
2831
^GOVERNANCE\.md$
32+
^Seal_of_Approval\.md$
2933

3034
^\.RData$
3135
^\.Rhistory$
@@ -45,3 +49,6 @@
4549
^lib$
4650
^library$
4751
^devwd$
52+
53+
# only the inst/po compressed files are needed, not raw .pot/.po
54+
^po$

.appveyor.yml

Lines changed: 0 additions & 71 deletions
This file was deleted.

.ci/.lintr.R

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
dt_linters = new.env()
2+
for (f in list.files('.ci/linters/r', full.names=TRUE)) sys.source(f, dt_linters)
3+
rm(f)
4+
5+
# NB: Could do this inside the linter definition, this separation makes those files more standardized
6+
dt_linters <- eapply(dt_linters, function(linter_factory) linter_factory())
7+
8+
linters = c(dt_linters, all_linters(
9+
packages = "lintr", # TODO(lintr->3.2.0): Remove this.
10+
# eq_assignment_linter(),
11+
brace_linter(allow_single_line = TRUE),
12+
implicit_integer_linter(allow_colon = TRUE),
13+
# TODO(michaelchirico): Activate these incrementally. These are the
14+
# parameterizations that match our style guide.
15+
# implicit_assignment_linter(allow_lazy = TRUE, allow_scoped = TRUE),
16+
# system_time_linter = undesirable_function_linter(c(
17+
# system.time = "Only run timings in benchmark.Rraw"
18+
# )),
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+
rev = "Use frev internally, or setfrev if by-reference is safe.",
25+
NULL
26+
)),
27+
# undesirable_function_linter(modify_defaults(
28+
# default_undesirable_functions,
29+
# ifelse = "Use fifelse instead.",
30+
# Sys.setenv = NULL,
31+
# library = NULL,
32+
# options = NULL,
33+
# par = NULL,
34+
# setwd = NULL
35+
# )),
36+
undesirable_operator_linter(),
37+
# TODO(lintr#2765): Use upstream implementation.
38+
# assignment_linter(operator = "="),
39+
assignment_linter = NULL,
40+
absolute_path_linter = NULL, # too many false positives
41+
# TODO(lintr#2442): Use this once x[ , j, by] is supported.
42+
commas_linter = NULL,
43+
commented_code_linter = NULL,
44+
# TODO(linter->3.2.0): Activate this.
45+
consecutive_assertion_linter = NULL,
46+
cyclocomp_linter = NULL,
47+
function_argument_linter = NULL,
48+
indentation_linter = NULL,
49+
infix_spaces_linter = NULL,
50+
line_length_linter = NULL,
51+
missing_package_linter = NULL,
52+
namespace_linter = NULL,
53+
nonportable_path_linter = NULL,
54+
object_name_linter = NULL,
55+
object_usage_linter = NULL,
56+
quotes_linter = NULL,
57+
semicolon_linter = NULL,
58+
spaces_inside_linter = NULL,
59+
spaces_left_parentheses_linter = NULL,
60+
# TODO(michaelchirico): Only exclude from vignettes, not sure what's wrong.
61+
strings_as_factors_linter = NULL,
62+
# TODO(lintr->3.2.0): Fix on a valid TODO style, enforce it, and re-activate.
63+
todo_comment_linter = NULL,
64+
# TODO(michaelchirico): Enforce these and re-activate them one-by-one.
65+
brace_linter = NULL,
66+
fixed_regex_linter = NULL,
67+
if_not_else_linter = NULL,
68+
implicit_assignment_linter = NULL,
69+
implicit_integer_linter = NULL,
70+
keyword_quote_linter = NULL,
71+
object_overwrite_linter = NULL,
72+
paren_body_linter = NULL,
73+
redundant_equals_linter = NULL,
74+
undesirable_function_linter = NULL,
75+
unnecessary_concatenation_linter = NULL,
76+
unnecessary_nesting_linter = NULL,
77+
unreachable_code_linter = NULL,
78+
unused_import_linter = NULL
79+
))
80+
rm(dt_linters)
81+
82+
exclusions = list(
83+
`../tests` = list(
84+
quotes_linter = Inf,
85+
# TODO(michaelchirico): Enforce these and re-activate them one-by-one.
86+
implicit_integer_linter = Inf,
87+
infix_spaces_linter = Inf,
88+
undesirable_function_linter = Inf
89+
),
90+
`../vignettes*` = list(
91+
# assignment_linter = Inf,
92+
implicit_integer_linter = Inf,
93+
quotes_linter = Inf,
94+
sample_int_linter = Inf
95+
# strings_as_factors_linter = Inf
96+
# system_time_linter = Inf
97+
),
98+
`../inst/tests` = list(
99+
library_call_linter = Inf,
100+
numeric_leading_zero_linter = Inf,
101+
undesirable_operator_linter = Inf, # For ':::', possibly we could be more careful to only exclude ':::'.
102+
# TODO(michaelchirico): Enforce these and re-activate them one-by-one.
103+
comparison_negation_linter = Inf,
104+
condition_call_linter = Inf,
105+
duplicate_argument_linter = Inf,
106+
equals_na_linter = Inf,
107+
missing_argument_linter = Inf,
108+
paste_linter = Inf,
109+
rep_len_linter = Inf,
110+
sample_int_linter = Inf,
111+
seq_linter = Inf,
112+
unnecessary_lambda_linter = Inf
113+
),
114+
`../inst/tests/froll.Rraw` = list(
115+
dt_test_literal_linter = Inf # TODO(michaelchirico): Fix these once #5898, #5692, #5682, #5576, #5575, #5441 are merged.
116+
)
117+
)

.ci/README.md

Lines changed: 44 additions & 7 deletions
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. In addition to branches pushed directly, the GitLab repository automatically mirrors our GitHub repository and runs pipeline on the `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

@@ -12,11 +12,16 @@ Test jobs:
1212
- `test-lin-rel-cran` - `--as-cran` on Linux, strict test for final status of `R CMD check`.
1313
- `test-lin-dev-gcc-strict-cran` - `--as-cran` on Linux, `r-devel` built with `-enable-strict-barrier --disable-long-double`, test for compilation warnings, test for new NOTEs/WARNINGs from `R CMD check`.
1414
- `test-lin-dev-clang-cran` - same as `gcc-strict` job but R built with `clang` and no `--enable-strict-barrier --disable-long-double` flags.
15-
- `test-lin-310-cran` - R 3.1.0 on Linux, stated R dependency version.
15+
- `test-lin-ancient-cran` - Stated R dependency version (currently 3.4.0) on Linux.
16+
- `test-lin-dev-clang-san` - `r-devel` on Linux built with `clang -fsanitize=address,undefined` (including LeakSanitizer), test for sanitizer output in tests and examples.
17+
- `test-lin-dev-gcc-san` - `r-devel` on Linux built with `gcc -fsanitize=address,undefined` (including LeakSanitizer), test for sanitizer output in tests and examples.
1618
- `test-win-rel` - `r-release` on Windows.
1719
- `test-win-dev` - `r-devel` on Windows.
1820
- `test-win-old` - `r-oldrel` on Windows.
19-
- `test-mac-rel` - macOS build not yet available, see [#3326](https://github.com/Rdatatable/data.table/issues/3326) for status
21+
- `test-mac-rel` - `r-release` on macOS.
22+
- `test-mac-old` - `r-oldrel` on macOS.
23+
24+
The CI steps for the tests are [required](https://github.com/Rdatatable/data.table/blob/55eb0f160b169398d51f138131c14a66c86e5dc9/.ci/publish.R#L162-L168) to be named according to the pattern `test-(lin|win|mac)-<R version>[-<suffix>]*`, where `<R version>` is `rel`, `dev`, `old`, `ancient`, or three digits comprising an R version (e.g. `362` corresponding to R-3.6.2).
2025

2126
Tests jobs are allowed to fail, summary and logs of test jobs are later published at _CRAN-like checks_ page, see artifacts below.
2227

@@ -35,10 +40,6 @@ Artifacts:
3540

3641
TODO document
3742

38-
### [Appveyor](./../.appveyor.yml)
39-
40-
TODO document
41-
4243
## CI tools
4344

4445
### [`ci.R`](./ci.R)
@@ -48,3 +49,39 @@ Base R implemented helper script, [originally proposed to base R](https://svn.r-
4849
### [`publish.R`](./publish.R)
4950

5051
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).
52+
53+
### [`lint.R`](./lint.R)
54+
55+
Base R runner for the manual (non-`lintr`) lint checks to be run from GitHub Actions during the code quality check. The command line arguments are as follows:
56+
1. Path to the directory containing files defining the linters. A linter is a function that accepts one argument (typically the path to the file) and signals an error if it fails the lint check.
57+
2. Path to the directory containing files to check.
58+
3. A regular expression matching the files to check.
59+
60+
One of the files in the linter directory may define the `.preprocess` function, which must accept one file path and return a value that other linter functions will understand. The function may also return `NULL` to indicate that the file must be skipped.
61+
62+
Example command lines:
63+
64+
```sh
65+
Rscript .ci/lint.R .ci/linters/c src '[.][ch]$'
66+
Rscript .ci/lint.R .ci/linters/po po '[.]po$'
67+
Rscript .ci/lint.R .ci/linters/md . '[.]R?md$'
68+
```
69+
70+
## GitLab Open Source Program
71+
72+
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.
73+
74+
## Updating CI pipeline
75+
76+
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.
77+
78+
```shell
79+
# fetch changes from remote (GitHub) and push them to GitLab
80+
git fetch [email protected]:Rdatatable/data.table.git new_branch:new_branch
81+
git push
82+
# after updating on GitHub, pull changes from remote and push to GitLab
83+
git pull [email protected]:Rdatatable/data.table.git new_branch
84+
git push
85+
```
86+
87+
Make sure to include a link to the pipeline results in your PR.

0 commit comments

Comments
 (0)