Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
^nhp_reskit[.]Rproj$
^[.]Rproj[.]user$
^LICENSE[.]md$
^CODEOWNERS$
^[.]github$
^nhp_reskit[.]code-workspace$
^CODEOWNERS$
^[.]vscode$
^air[.]toml$
^[.]Renviron[.]example$
^inst/a_.*$
^test_results[.]rds$
^[.]lintr$
^jarl[.]toml$
^nhp_reskit[.]Rproj$
^[.]Rproj[.]user$
^LICENSE[.]md$
^CODEOWNERS$
^[.]github$
^nhp_reskit[.]code-workspace$
^CODEOWNERS$
^[.]vscode$
^air[.]toml$
^[.]Renviron[.]example$
^inst/a_.*$
^test_results[.]rds$
^[.]lintr$
^jarl[.]toml$
^\.github$
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
30 changes: 30 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
on:
pull_request:
branches: main
types: [ edited, ready_for_review ]
release:
types: [ published ]
name: R-CMD-check
permissions: read-all
jobs:
R-CMD-check:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- uses: actions/checkout@v6
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
with:
r-version: release
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check
- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
error-on: '"error"'
build_args: 'c("--no-manual", "--no-tests", "--compact-vignettes=gs+qpdf")'
7 changes: 2 additions & 5 deletions .lintr
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
linters: linters_with_defaults( # see vignette("lintr")
commented_code_linter = NULL,
object_length_linter(32)
)
exclusions: list(
"R/distribution_plots.R",
"R/read_results_parquet_files.R" = 129
object_length_linter(34)
)
exclusions: list()
encoding: "UTF-8"
2 changes: 1 addition & 1 deletion R/calculate_principal_stats.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ swap_modelrun_for_stage <- \(x) sub("^model_run$", "stage", x)
check_single_row_groups <- function(tbl, group_cols) {
out <- tbl |>
dplyr::summarise(n = dplyr::n(), .by = tidyselect::all_of(group_cols))
csrg <- "check_single_row_groups"
csrg <- "check_single_row_groups" # nolint
msg <- "{.fn {csrg}}: The grouping columns do not group to single rows"
azkit::check_that(out, \(x) all(x[["n"]] == 1L), msg)
tbl
Expand Down
2 changes: 1 addition & 1 deletion R/read_results_parquet_files.R
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ check_single_subdir <- function(path, level, dttm_stamp, container) {
max_dttm <- max(dir_name)

# construct error messages if length(dir_name) > 1
dir_names <- cli::cli_vec(basename(dir_name), list(`vec-trunc` = 2))
dir_names <- cli::cli_vec(basename(dir_name), list(`vec-trunc` = 2)) # nolint

if (level == "scenario" || is.null(dttm_stamp)) {
# if length(folder_name) == 1 then return it, otherwise throw an error
Expand Down