Skip to content

Commit c6e5a03

Browse files
author
Toby Dylan Hocking
committed
merge master
2 parents ded8afb + 546259d commit c6e5a03

File tree

380 files changed

+86170
-23268
lines changed

Some content is hidden

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

380 files changed

+86170
-23268
lines changed

.Rbuildignore

Lines changed: 48 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,54 @@
1-
^\.travis\.yml$
2-
^CONTRIBUTING\.md$
3-
^ISSUE_TEMPLATE\.md$
4-
^CRAN_Release\.cmd$
5-
^deploy\.sh$
1+
.dir-locals.el
2+
.check.translations.R
3+
^\.Rprofile$
4+
^data\.table_.*\.tar\.gz$
5+
^config\.log$
6+
^vignettes/plots/figures$
7+
^\.Renviron$
8+
^[^/]+\.R$
9+
^[^/]+\.csv$
10+
^[^/]+\.csvy$
11+
^[^/]+\.RDS$
12+
^[^/]+\.diff$
13+
^[^/]+\.patch$
14+
15+
^\.ci$
16+
^\.dev$
17+
^\.devcontainer$
18+
^\.graphics$
19+
^\.github$
20+
^\.vscode$
21+
^\.zed$
22+
23+
^\.gitlab-ci\.yml$
24+
25+
^Makefile$
26+
^NEWS\.0\.md$
27+
^NEWS\.1\.md$
28+
^_pkgdown\.yml$
29+
^src/Makevars$
30+
^CODEOWNERS$
31+
^GOVERNANCE\.md$
32+
^Seal_of_Approval\.md$
33+
34+
^\.RData$
35+
^\.Rhistory$
36+
637
^\.emacs\.desktop
738
^\.emacs\.desktop\.lock
839
^.*\.Rproj$
940
^\.Rproj\.user$
10-
^appveyor\.yml$
11-
^.gitlab-ci\.yml$
1241
^\.idea$
13-
^\.RData$
14-
^\.Rhistory$
15-
^data\.table_.*\.tar\.gz$
16-
^cc\.R$
17-
^ci\.R$
18-
^publish\.R$
19-
^Makefile$
20-
^NEWS.0.md$
42+
^\.libs$
43+
44+
^.*\.dll$
45+
2146
^bus$
22-
^Dockerfile$
23-
^Dockerfile\.in$
47+
^pkgdown$
48+
^docs$
49+
^lib$
50+
^library$
51+
^devwd$
52+
53+
# only the inst/po compressed files are needed, not raw .pot/.po
54+
^po$

.ci/.lintr.R

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
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+
# TODO(michaelchirico): Activate these incrementally. These are the
13+
# parameterizations that match our style guide.
14+
# implicit_assignment_linter(allow_lazy = TRUE, allow_scoped = TRUE),
15+
# implicit_integer_linter(allow_colon = TRUE),
16+
# system_time_linter = undesirable_function_linter(c(
17+
# system.time = "Only run timings in benchmark.Rraw"
18+
# )),
19+
# undesirable_function_linter(modify_defaults(
20+
# default_undesirable_functions,
21+
# ifelse = "Use fifelse instead.",
22+
# Sys.setenv = NULL,
23+
# library = NULL,
24+
# options = NULL,
25+
# par = NULL,
26+
# setwd = NULL
27+
# )),
28+
undesirable_operator_linter(),
29+
# TODO(lintr#2441): Use upstream implementation.
30+
assignment_linter = NULL,
31+
absolute_path_linter = NULL, # too many false positives
32+
# TODO(lintr#2442): Use this once x[ , j, by] is supported.
33+
commas_linter = NULL,
34+
commented_code_linter = NULL,
35+
# TODO(linter->3.2.0): Activate this.
36+
consecutive_assertion_linter = NULL,
37+
cyclocomp_linter = NULL,
38+
function_argument_linter = NULL,
39+
indentation_linter = NULL,
40+
infix_spaces_linter = NULL,
41+
line_length_linter = NULL,
42+
missing_package_linter = NULL,
43+
namespace_linter = NULL,
44+
nonportable_path_linter = NULL,
45+
object_name_linter = NULL,
46+
object_usage_linter = NULL,
47+
quotes_linter = NULL,
48+
semicolon_linter = NULL,
49+
spaces_inside_linter = NULL,
50+
spaces_left_parentheses_linter = NULL,
51+
# TODO(michaelchirico): Only exclude from vignettes, not sure what's wrong.
52+
strings_as_factors_linter = NULL,
53+
# TODO(lintr->3.2.0): Fix on a valid TODO style, enforce it, and re-activate.
54+
todo_comment_linter = NULL,
55+
# TODO(michaelchirico): Enforce these and re-activate them one-by-one.
56+
brace_linter = NULL,
57+
fixed_regex_linter = NULL,
58+
if_not_else_linter = NULL,
59+
implicit_assignment_linter = NULL,
60+
implicit_integer_linter = NULL,
61+
keyword_quote_linter = NULL,
62+
object_overwrite_linter = NULL,
63+
paren_body_linter = NULL,
64+
redundant_equals_linter = NULL,
65+
undesirable_function_linter = NULL,
66+
unnecessary_concatenation_linter = NULL,
67+
unnecessary_nesting_linter = NULL,
68+
unreachable_code_linter = NULL,
69+
unused_import_linter = NULL
70+
))
71+
rm(dt_linters)
72+
73+
# TODO(lintr#2172): Glob with lintr itself.
74+
exclusions = c(local({
75+
exclusion_for_dir <- function(dir, exclusions) {
76+
files = file.path("..", list.files(dir, pattern = "\\.(R|Rmd|Rraw)$", full.names=TRUE))
77+
stats::setNames(rep(list(exclusions), length(files)), files)
78+
}
79+
c(
80+
exclusion_for_dir("tests", list(
81+
quotes_linter = Inf,
82+
# TODO(michaelchirico): Enforce these and re-activate them one-by-one.
83+
implicit_integer_linter = Inf,
84+
infix_spaces_linter = Inf,
85+
undesirable_function_linter = Inf
86+
)),
87+
exclusion_for_dir(c("vignettes", "vignettes/fr"), list(
88+
quotes_linter = Inf,
89+
sample_int_linter = Inf
90+
# strings_as_factors_linter = Inf
91+
# system_time_linter = Inf
92+
)),
93+
exclusion_for_dir("inst/tests", list(
94+
library_call_linter = Inf,
95+
numeric_leading_zero_linter = Inf,
96+
undesirable_operator_linter = Inf, # For ':::', possibly we could be more careful to only exclude ':::'.
97+
# TODO(michaelchirico): Enforce these and re-activate them one-by-one.
98+
comparison_negation_linter = Inf,
99+
condition_call_linter = Inf,
100+
duplicate_argument_linter = Inf,
101+
equals_na_linter = Inf,
102+
missing_argument_linter = Inf,
103+
paste_linter = Inf,
104+
rep_len_linter = Inf,
105+
sample_int_linter = Inf,
106+
seq_linter = Inf,
107+
unnecessary_lambda_linter = Inf
108+
))
109+
)
110+
}),
111+
list(`../inst/tests/froll.Rraw` = list(dt_test_literal_linter = Inf)) # TODO(michaelchirico): Fix these once #5898, #5692, #5682, #5576, #5575, #5441 are merged.
112+
)

.ci/README.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# data.table continuous integration and deployment
2+
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.
4+
5+
## Environments
6+
7+
### [GitLab CI](./../.gitlab-ci.yml)
8+
9+
Test jobs:
10+
- `test-lin-rel` - `r-release` on Linux, most comprehensive test environment, force all suggests, `-O3 -flto=auto -fno-common -Wunused-result`, test for no compilation warnings.
11+
- `test-lin-rel-vanilla` - `r-release` on Linux, no suggested deps, no zlib, no OpenMP, flags `-g -O0 -fno-openmp`, skip manual and vignettes.
12+
- `test-lin-rel-cran` - `--as-cran` on Linux, strict test for final status of `R CMD check`.
13+
- `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`.
14+
- `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.
16+
- `test-win-rel` - `r-release` on Windows.
17+
- `test-win-dev` - `r-devel` on Windows.
18+
- `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
20+
21+
Tests jobs are allowed to fail, summary and logs of test jobs are later published at _CRAN-like checks_ page, see artifacts below.
22+
23+
Artifacts:
24+
- [homepage](https://rdatatable.gitlab.io/data.table) - made with [pkgdown](https://github.com/r-lib/pkgdown)
25+
- [html manual](https://rdatatable.gitlab.io/data.table/library/data.table/html/00Index.html)
26+
- [pdf manual](https://rdatatable.gitlab.io/data.table/web/packages/data.table/data.table.pdf)
27+
- [html vignettes](https://rdatatable.gitlab.io/data.table/library/data.table/doc/index.html)
28+
- R packages repository for `data.table` and all _Suggests_ dependencies, url: `https://rdatatable.gitlab.io/data.table`
29+
- sources
30+
- Windows binaries for `r-release`, `r-devel` and `r-oldrel`
31+
- [CRAN-like homepage](https://rdatatable.gitlab.io/data.table/web/packages/data.table/index.html)
32+
- [CRAN-like checks results](https://rdatatable.gitlab.io/data.table/web/checks/check_results_data.table.html)
33+
34+
### [GitHub Actions](./../.github/workflows)
35+
36+
TODO document
37+
38+
## CI tools
39+
40+
### [`ci.R`](./ci.R)
41+
42+
Base R implemented helper script, [originally proposed to base R](https://svn.r-project.org/R/branches/tools4pkgs/src/library/tools/R/packages.R), that ease the process of extracting dependency information from description files, and to mirror packages and their recursive dependencies from CRAN to local CRAN-like directory. It is used in [GitLab CI pipeline](./../.gitlab-ci.yml).
43+
44+
### [`publish.R`](./publish.R)
45+
46+
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.

0 commit comments

Comments
 (0)