diff --git a/.Rbuildignore b/.Rbuildignore index 35d9d81..bbcbcb9 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -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$ diff --git a/.github/.gitignore b/.github/.gitignore new file mode 100644 index 0000000..2d19fc7 --- /dev/null +++ b/.github/.gitignore @@ -0,0 +1 @@ +*.html diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml new file mode 100644 index 0000000..9fc803d --- /dev/null +++ b/.github/workflows/R-CMD-check.yaml @@ -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")' diff --git a/.lintr b/.lintr index c1b8f7d..c76f623 100644 --- a/.lintr +++ b/.lintr @@ -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" diff --git a/R/calculate_principal_stats.R b/R/calculate_principal_stats.R index 1693a17..90368ba 100644 --- a/R/calculate_principal_stats.R +++ b/R/calculate_principal_stats.R @@ -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 diff --git a/R/read_results_parquet_files.R b/R/read_results_parquet_files.R index 15627fe..99bfecd 100644 --- a/R/read_results_parquet_files.R +++ b/R/read_results_parquet_files.R @@ -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