Skip to content

Commit

Permalink
Merge branch 'main' into more_uniform_data_extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
IndrajeetPatil authored Sep 22, 2023
2 parents 109aeb2 + de77bdc commit 560fc51
Show file tree
Hide file tree
Showing 63 changed files with 517 additions and 611 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
^CRAN-RELEASE$
^CRAN-SUBMISSION$
^LICENSE\.md$
^Makefile$
^Meta$
^NEWS$
^README-.*\.png$
Expand Down Expand Up @@ -48,4 +49,5 @@
hextools
publication/*
references.bib
shell
tests\^spelling
4 changes: 2 additions & 2 deletions .github/workflows/R-CMD-check-devel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2
with:
pandoc-version: "3.1.5"
pandoc-version: "3.1.7"

- uses: r-lib/actions/setup-r@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/R-CMD-check-hard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2
with:
pandoc-version: "3.1.5"
pandoc-version: "3.1.7"

- uses: r-lib/actions/setup-r@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/R-CMD-check-strict.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ jobs:
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2
with:
pandoc-version: "3.1.5"
pandoc-version: "3.1.7"

- uses: r-lib/actions/setup-r@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ jobs:
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2
with:
pandoc-version: "3.1.5"
pandoc-version: "3.1.7"

- uses: r-lib/actions/setup-r@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-all-examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check-link-rot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2
with:
pandoc-version: "3.1.5"
pandoc-version: "3.1.7"

- uses: r-lib/actions/setup-r@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-random-test-order.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check-readme.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2
with:
pandoc-version: "3.1.5"
pandoc-version: "3.1.7"

- uses: r-lib/actions/setup-r@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check-spelling.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2
with:
pandoc-version: "3.1.5"
pandoc-version: "3.1.7"

- uses: r-lib/actions/setup-r@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-styling.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-test-warnings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check-vignette-warnings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2
with:
pandoc-version: "3.1.5"
pandoc-version: "3.1.7"

- uses: r-lib/actions/setup-r@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/html-5-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
Expand Down
34 changes: 27 additions & 7 deletions .github/workflows/lint-changed-files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
Expand All @@ -26,21 +26,41 @@ jobs:
any::purrr
needs: check

- name: Add lintr options
run: |
cat('\noptions(lintr.linter_file = ".lintr")\n', file = "~/.Rprofile", append = TRUE)
shell: Rscript {0}

- name: Install package
run: R CMD INSTALL .

- name: Extract and lint files changed by this PR
run: |
options(crayon.enabled = TRUE)
library(lintr)
files <- gh::gh("GET https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files")
changed_files <- purrr::map_chr(files, "filename")
all_files <- list.files(recursive = TRUE)
exclusions_list <- as.list(setdiff(all_files, changed_files))
lintr::lint_package(exclusions = exclusions_list)
lint_package(linters = linters_with_defaults(
absolute_path_linter = NULL,
assignment_linter = NULL,
commented_code_linter = NULL,
cyclocomp_linter(25L),
extraction_operator_linter = NULL,
if_not_else_linter(exceptions = character(0L)),
implicit_integer_linter = NULL,
library_call_linter = NULL,
line_length_linter(120L),
namespace_linter = NULL,
nonportable_path_linter = NULL,
object_name_linter = NULL,
object_length_linter(50L),
object_usage_linter = NULL,
string_boundary_linter = NULL,
strings_as_factors_linter = NULL,
todo_comment_linter = NULL,
undesirable_function_linter = NULL,
undesirable_operator_linter = NULL,
unnecessary_concatenation_linter(allow_single_expression = FALSE),
unused_import_linter = NULL,
defaults = linters_with_tags(tags = NULL)
), exclusions = exclusions_list)
shell: Rscript {0}
env:
LINTR_ERROR_ON_LINT: true
19 changes: 14 additions & 5 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
Expand All @@ -32,27 +32,36 @@ jobs:
local::.
needs: lint

# TODO: Revisit to remove some of these allowances after more important lints
# have been removed.
- name: Lint
run: |
options(crayon.enabled = TRUE)
library(lintr)
lint_package(linters = linters_with_defaults(
absolute_path_linter = NULL,
assignment_linter = NULL,
commented_code_linter = NULL,
cyclocomp_linter(20L),
cyclocomp_linter(25L),
extraction_operator_linter = NULL,
if_not_else_linter(exceptions = character(0L)),
implicit_integer_linter = NULL,
library_call_linter = NULL,
line_length_linter(120L),
namespace_linter = NULL,
nonportable_path_linter = NULL,
object_name_linter = NULL,
object_length_linter(50L),
object_usage_linter = NULL,
nonportable_path_linter = NULL,
string_boundary_linter = NULL,
strings_as_factors_linter = NULL,
todo_comment_linter = NULL,
undesirable_function_linter = NULL,
undesirable_operator_linter = NULL,
unnecessary_concatenation_linter(allow_single_expression = FALSE),
unused_import_linter = NULL,
defaults = linters_with_tags(tags = NULL)
))
shell: Rscript {0}
# env:
# LINTR_ERROR_ON_LINT: true
env:
LINTR_ERROR_ON_LINT: true
4 changes: 2 additions & 2 deletions .github/workflows/pkgdown-no-suggests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ jobs:
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2
with:
pandoc-version: "3.1.5"
pandoc-version: "3.1.7"

- uses: r-lib/actions/setup-r@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2
with:
pandoc-version: "3.1.5"
pandoc-version: "3.1.7"

- uses: r-lib/actions/setup-r@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
with:
access_token: ${{ github.token }}

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/styler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -30,6 +30,7 @@ jobs:
r-lib/pkgapi
r-lib/styler
r-lib/roxygen2
anthonynorth/roxyglobals
needs: |
styler
roxygen2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-coverage-examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
Expand Down
16 changes: 11 additions & 5 deletions .lintr
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
linters: linters_with_defaults(
absolute_path_linter = NULL,
assignment_linter = NULL,
commented_code_linter = NULL,
cyclocomp_linter = cyclocomp_linter(20),
cyclocomp_linter(25L),
extraction_operator_linter = NULL,
if_not_else_linter(exceptions = character(0L)),
implicit_integer_linter = NULL,
line_length_linter(120),
library_call_linter = NULL,
line_length_linter(120L),
namespace_linter = NULL,
nonportable_path_linter = NULL,
object_name_linter = NULL,
object_length_linter(50),
object_length_linter(50L),
object_usage_linter = NULL,
nonportable_path_linter = NULL,
todo_comment_linter = NULL,
string_boundary_linter = NULL,
strings_as_factors_linter = NULL,
todo_comment_linter = NULL,
undesirable_function_linter = NULL,
undesirable_operator_linter = NULL,
unnecessary_concatenation_linter(allow_single_expression = FALSE),
unused_import_linter = NULL,
defaults = linters_with_tags(tags = NULL)
)
Loading

0 comments on commit 560fc51

Please sign in to comment.