-
Notifications
You must be signed in to change notification settings - Fork 991
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
380 changed files
with
86,170 additions
and
23,268 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,54 @@ | ||
^\.travis\.yml$ | ||
^CONTRIBUTING\.md$ | ||
^ISSUE_TEMPLATE\.md$ | ||
^CRAN_Release\.cmd$ | ||
^deploy\.sh$ | ||
.dir-locals.el | ||
.check.translations.R | ||
^\.Rprofile$ | ||
^data\.table_.*\.tar\.gz$ | ||
^config\.log$ | ||
^vignettes/plots/figures$ | ||
^\.Renviron$ | ||
^[^/]+\.R$ | ||
^[^/]+\.csv$ | ||
^[^/]+\.csvy$ | ||
^[^/]+\.RDS$ | ||
^[^/]+\.diff$ | ||
^[^/]+\.patch$ | ||
|
||
^\.ci$ | ||
^\.dev$ | ||
^\.devcontainer$ | ||
^\.graphics$ | ||
^\.github$ | ||
^\.vscode$ | ||
^\.zed$ | ||
|
||
^\.gitlab-ci\.yml$ | ||
|
||
^Makefile$ | ||
^NEWS\.0\.md$ | ||
^NEWS\.1\.md$ | ||
^_pkgdown\.yml$ | ||
^src/Makevars$ | ||
^CODEOWNERS$ | ||
^GOVERNANCE\.md$ | ||
^Seal_of_Approval\.md$ | ||
|
||
^\.RData$ | ||
^\.Rhistory$ | ||
|
||
^\.emacs\.desktop | ||
^\.emacs\.desktop\.lock | ||
^.*\.Rproj$ | ||
^\.Rproj\.user$ | ||
^appveyor\.yml$ | ||
^.gitlab-ci\.yml$ | ||
^\.idea$ | ||
^\.RData$ | ||
^\.Rhistory$ | ||
^data\.table_.*\.tar\.gz$ | ||
^cc\.R$ | ||
^ci\.R$ | ||
^publish\.R$ | ||
^Makefile$ | ||
^NEWS.0.md$ | ||
^\.libs$ | ||
|
||
^.*\.dll$ | ||
|
||
^bus$ | ||
^Dockerfile$ | ||
^Dockerfile\.in$ | ||
^pkgdown$ | ||
^docs$ | ||
^lib$ | ||
^library$ | ||
^devwd$ | ||
|
||
# only the inst/po compressed files are needed, not raw .pot/.po | ||
^po$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
dt_linters = new.env() | ||
for (f in list.files('.ci/linters/r', full.names=TRUE)) sys.source(f, dt_linters) | ||
rm(f) | ||
|
||
# NB: Could do this inside the linter definition, this separation makes those files more standardized | ||
dt_linters <- eapply(dt_linters, function(linter_factory) linter_factory()) | ||
|
||
linters = c(dt_linters, all_linters( | ||
packages = "lintr", # TODO(lintr->3.2.0): Remove this. | ||
# eq_assignment_linter(), | ||
brace_linter(allow_single_line = TRUE), | ||
# TODO(michaelchirico): Activate these incrementally. These are the | ||
# parameterizations that match our style guide. | ||
# implicit_assignment_linter(allow_lazy = TRUE, allow_scoped = TRUE), | ||
# implicit_integer_linter(allow_colon = TRUE), | ||
# system_time_linter = undesirable_function_linter(c( | ||
# system.time = "Only run timings in benchmark.Rraw" | ||
# )), | ||
# undesirable_function_linter(modify_defaults( | ||
# default_undesirable_functions, | ||
# ifelse = "Use fifelse instead.", | ||
# Sys.setenv = NULL, | ||
# library = NULL, | ||
# options = NULL, | ||
# par = NULL, | ||
# setwd = NULL | ||
# )), | ||
undesirable_operator_linter(), | ||
# TODO(lintr#2441): Use upstream implementation. | ||
assignment_linter = NULL, | ||
absolute_path_linter = NULL, # too many false positives | ||
# TODO(lintr#2442): Use this once x[ , j, by] is supported. | ||
commas_linter = NULL, | ||
commented_code_linter = NULL, | ||
# TODO(linter->3.2.0): Activate this. | ||
consecutive_assertion_linter = NULL, | ||
cyclocomp_linter = NULL, | ||
function_argument_linter = NULL, | ||
indentation_linter = NULL, | ||
infix_spaces_linter = NULL, | ||
line_length_linter = NULL, | ||
missing_package_linter = NULL, | ||
namespace_linter = NULL, | ||
nonportable_path_linter = NULL, | ||
object_name_linter = NULL, | ||
object_usage_linter = NULL, | ||
quotes_linter = NULL, | ||
semicolon_linter = NULL, | ||
spaces_inside_linter = NULL, | ||
spaces_left_parentheses_linter = NULL, | ||
# TODO(michaelchirico): Only exclude from vignettes, not sure what's wrong. | ||
strings_as_factors_linter = NULL, | ||
# TODO(lintr->3.2.0): Fix on a valid TODO style, enforce it, and re-activate. | ||
todo_comment_linter = NULL, | ||
# TODO(michaelchirico): Enforce these and re-activate them one-by-one. | ||
brace_linter = NULL, | ||
fixed_regex_linter = NULL, | ||
if_not_else_linter = NULL, | ||
implicit_assignment_linter = NULL, | ||
implicit_integer_linter = NULL, | ||
keyword_quote_linter = NULL, | ||
object_overwrite_linter = NULL, | ||
paren_body_linter = NULL, | ||
redundant_equals_linter = NULL, | ||
undesirable_function_linter = NULL, | ||
unnecessary_concatenation_linter = NULL, | ||
unnecessary_nesting_linter = NULL, | ||
unreachable_code_linter = NULL, | ||
unused_import_linter = NULL | ||
)) | ||
rm(dt_linters) | ||
|
||
# TODO(lintr#2172): Glob with lintr itself. | ||
exclusions = c(local({ | ||
exclusion_for_dir <- function(dir, exclusions) { | ||
files = file.path("..", list.files(dir, pattern = "\\.(R|Rmd|Rraw)$", full.names=TRUE)) | ||
stats::setNames(rep(list(exclusions), length(files)), files) | ||
} | ||
c( | ||
exclusion_for_dir("tests", list( | ||
quotes_linter = Inf, | ||
# TODO(michaelchirico): Enforce these and re-activate them one-by-one. | ||
implicit_integer_linter = Inf, | ||
infix_spaces_linter = Inf, | ||
undesirable_function_linter = Inf | ||
)), | ||
exclusion_for_dir(c("vignettes", "vignettes/fr"), list( | ||
quotes_linter = Inf, | ||
sample_int_linter = Inf | ||
# strings_as_factors_linter = Inf | ||
# system_time_linter = Inf | ||
)), | ||
exclusion_for_dir("inst/tests", list( | ||
library_call_linter = Inf, | ||
numeric_leading_zero_linter = Inf, | ||
undesirable_operator_linter = Inf, # For ':::', possibly we could be more careful to only exclude ':::'. | ||
# TODO(michaelchirico): Enforce these and re-activate them one-by-one. | ||
comparison_negation_linter = Inf, | ||
condition_call_linter = Inf, | ||
duplicate_argument_linter = Inf, | ||
equals_na_linter = Inf, | ||
missing_argument_linter = Inf, | ||
paste_linter = Inf, | ||
rep_len_linter = Inf, | ||
sample_int_linter = Inf, | ||
seq_linter = Inf, | ||
unnecessary_lambda_linter = Inf | ||
)) | ||
) | ||
}), | ||
list(`../inst/tests/froll.Rraw` = list(dt_test_literal_linter = Inf)) # TODO(michaelchirico): Fix these once #5898, #5692, #5682, #5576, #5575, #5441 are merged. | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# data.table continuous integration and deployment | ||
|
||
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. | ||
|
||
## Environments | ||
|
||
### [GitLab CI](./../.gitlab-ci.yml) | ||
|
||
Test jobs: | ||
- `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. | ||
- `test-lin-rel-vanilla` - `r-release` on Linux, no suggested deps, no zlib, no OpenMP, flags `-g -O0 -fno-openmp`, skip manual and vignettes. | ||
- `test-lin-rel-cran` - `--as-cran` on Linux, strict test for final status of `R CMD check`. | ||
- `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`. | ||
- `test-lin-dev-clang-cran` - same as `gcc-strict` job but R built with `clang` and no `--enable-strict-barrier --disable-long-double` flags. | ||
- `test-lin-310-cran` - R 3.1.0 on Linux, stated R dependency version. | ||
- `test-win-rel` - `r-release` on Windows. | ||
- `test-win-dev` - `r-devel` on Windows. | ||
- `test-win-old` - `r-oldrel` on Windows. | ||
- `test-mac-rel` - macOS build not yet available, see [#3326](https://github.com/Rdatatable/data.table/issues/3326) for status | ||
|
||
Tests jobs are allowed to fail, summary and logs of test jobs are later published at _CRAN-like checks_ page, see artifacts below. | ||
|
||
Artifacts: | ||
- [homepage](https://rdatatable.gitlab.io/data.table) - made with [pkgdown](https://github.com/r-lib/pkgdown) | ||
- [html manual](https://rdatatable.gitlab.io/data.table/library/data.table/html/00Index.html) | ||
- [pdf manual](https://rdatatable.gitlab.io/data.table/web/packages/data.table/data.table.pdf) | ||
- [html vignettes](https://rdatatable.gitlab.io/data.table/library/data.table/doc/index.html) | ||
- R packages repository for `data.table` and all _Suggests_ dependencies, url: `https://rdatatable.gitlab.io/data.table` | ||
- sources | ||
- Windows binaries for `r-release`, `r-devel` and `r-oldrel` | ||
- [CRAN-like homepage](https://rdatatable.gitlab.io/data.table/web/packages/data.table/index.html) | ||
- [CRAN-like checks results](https://rdatatable.gitlab.io/data.table/web/checks/check_results_data.table.html) | ||
|
||
### [GitHub Actions](./../.github/workflows) | ||
|
||
TODO document | ||
|
||
## CI tools | ||
|
||
### [`ci.R`](./ci.R) | ||
|
||
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). | ||
|
||
### [`publish.R`](./publish.R) | ||
|
||
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). | ||
|
||
## GitLab Open Source Program | ||
|
||
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. | ||
|
||
## Updating CI pipeline | ||
|
||
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. | ||
|
||
```shell | ||
# fetch changes from remote (GitHub) and push them to GitLab | ||
git fetch [email protected]:Rdatatable/data.table.git new_branch:new_branch | ||
git push | ||
# after updating on GitHub, pull changes from remote and push to GitLab | ||
git pull [email protected]:Rdatatable/data.table.git new_branch | ||
git push | ||
``` | ||
|
||
Make sure to include a link to the pipeline results in your PR. |
Oops, something went wrong.