Skip to content

Commit

Permalink
RC: CRAN 1.5.2 (#248)
Browse files Browse the repository at this point in the history
* update comment

* bump Pandoc and update linters

* bump versions

* bump to devel

* get rid of note about Rd cross-references

* get rid of new lints

* Update global_vars.R

* update workflows

* fixes warning in example?

* revert correlation version bump

* Apply automatic changes

* just suppress warnings

* fix lints

* minor

* Fix failures on R-devel

closes #251

---------

Co-authored-by: IndrajeetPatil <[email protected]>
  • Loading branch information
IndrajeetPatil and IndrajeetPatil authored Sep 12, 2023
1 parent fe40d44 commit c121c87
Show file tree
Hide file tree
Showing 44 changed files with 301 additions and 263 deletions.
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
33 changes: 26 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,40 @@ 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,
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
16 changes: 11 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,33 @@ 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,
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
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
2 changes: 1 addition & 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 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
15 changes: 10 additions & 5 deletions .lintr
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
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,
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 c121c87

Please sign in to comment.