Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GitHub Action Versions #175

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/lintr.yml
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@ jobs:
LINTR_ERROR_ON_LINT: false

- name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@v2
uses: github/codeql-action/upload-sarif@codeql-bundle-20230524
with:
sarif_file: lintr-results.sarif
wait-for-processing: true

Unchanged files with check annotations Beta

# ------------------------------------------------------------------------
# simulate transactions on insurance claims
# transactions will include claim closures, payments and changes in case

Check warning on line 12 in data-raw/scripts/claims_transactional.R

GitHub Actions / Run lintr scanning

file=data-raw/scripts/claims_transactional.R,line=12,col=73,[trailing_whitespace_linter] Trailing whitespace is superfluous.

Check warning on line 12 in data-raw/scripts/claims_transactional.R

GitHub Actions / Run lintr scanning

file=data-raw/scripts/claims_transactional.R,line=12,col=73,[trailing_whitespace_linter] Trailing whitespace is superfluous.
# reserves this is all completely made up and does not accurately resemble

Check warning on line 13 in data-raw/scripts/claims_transactional.R

GitHub Actions / Run lintr scanning

file=data-raw/scripts/claims_transactional.R,line=13,col=75,[trailing_whitespace_linter] Trailing whitespace is superfluous.

Check warning on line 13 in data-raw/scripts/claims_transactional.R

GitHub Actions / Run lintr scanning

file=data-raw/scripts/claims_transactional.R,line=13,col=75,[trailing_whitespace_linter] Trailing whitespace is superfluous.
# actual claims
library(lubridate)
library(dplyr)
library(randomNames)
library(tidyr)
# source("R/utils.R")

Check warning on line 21 in data-raw/scripts/claims_transactional.R

GitHub Actions / Run lintr scanning

file=data-raw/scripts/claims_transactional.R,line=21,col=3,[commented_code_linter] Commented code should be removed.

Check warning on line 21 in data-raw/scripts/claims_transactional.R

GitHub Actions / Run lintr scanning

file=data-raw/scripts/claims_transactional.R,line=21,col=3,[commented_code_linter] Commented code should be removed.
devtools::load_all()
# number of claims
payment_fun <- function(n) rlnorm(n, 7.5, 1.5)
claims <- tibble::tibble(
claim_num = 1:n_claims,

Check warning on line 39 in data-raw/scripts/claims_transactional.R

GitHub Actions / Run lintr scanning

file=data-raw/scripts/claims_transactional.R,line=39,col=2,[indentation_linter] Hanging indent should be 25 spaces but is 2 spaces.

Check warning on line 39 in data-raw/scripts/claims_transactional.R

GitHub Actions / Run lintr scanning

file=data-raw/scripts/claims_transactional.R,line=39,col=2,[indentation_linter] Hanging indent should be 25 spaces but is 2 spaces.
claim_id = paste0("claim-", 1:n_claims),
accident_date = beg_date + lubridate::days(accident_date),
state = sample(c("TX", "CA", "GA", "FL"), size = n_claims, replace = TRUE),
zero_claims <- dplyr::filter(claims, status == 0)
first_trans <- dplyr::filter(claims, status == 1)
subsequent_trans <- left_join(trans_tbl, first_trans,

Check warning on line 84 in data-raw/scripts/claims_transactional.R

GitHub Actions / Run lintr scanning

file=data-raw/scripts/claims_transactional.R,line=84,col=54,[trailing_whitespace_linter] Trailing whitespace is superfluous.

Check warning on line 84 in data-raw/scripts/claims_transactional.R

GitHub Actions / Run lintr scanning

file=data-raw/scripts/claims_transactional.R,line=84,col=54,[trailing_whitespace_linter] Trailing whitespace is superfluous.
by = c("claim_num", "claim_id")) %>%
filter(!is.na(accident_date))
arrange(transaction_date)
# add in a transaction number
trans$trans_num <- 1:nrow(trans)

Check warning on line 101 in data-raw/scripts/claims_transactional.R

GitHub Actions / Run lintr scanning

file=data-raw/scripts/claims_transactional.R,line=101,col=20,[seq_linter] 1:nrow(...) is likely to be wrong in the empty edge case. Use seq_len(nrow(...)) instead.

Check warning on line 101 in data-raw/scripts/claims_transactional.R

GitHub Actions / Run lintr scanning

file=data-raw/scripts/claims_transactional.R,line=101,col=20,[seq_linter] 1:nrow(...) is likely to be wrong in the empty edge case. Use seq_len(nrow(...)) instead.
# set final trans status to closed and case to 0
trans <- trans %>%
filter(.data$transaction_date <= end_date)
fs::dir_create("data-raw/cache")
qs::qsave(trans, file = paste0("data-raw/cache/", Sys.Date(),

Check warning on line 121 in data-raw/scripts/claims_transactional.R

GitHub Actions / Run lintr scanning

file=data-raw/scripts/claims_transactional.R,line=121,col=62,[trailing_whitespace_linter] Trailing whitespace is superfluous.

Check warning on line 121 in data-raw/scripts/claims_transactional.R

GitHub Actions / Run lintr scanning

file=data-raw/scripts/claims_transactional.R,line=121,col=62,[trailing_whitespace_linter] Trailing whitespace is superfluous.
"-transactional-claims.qs"))
claims_transactional <- trans
doc_data(losses)
doc_data(exposures)

Check warning on line 49 in data-raw/scripts/dataprep.R

GitHub Actions / Run lintr scanning

file=data-raw/scripts/dataprep.R,line=49,col=1,[trailing_blank_lines_linter] Trailing blank lines are superfluous.

Check warning on line 49 in data-raw/scripts/dataprep.R

GitHub Actions / Run lintr scanning

file=data-raw/scripts/dataprep.R,line=49,col=1,[trailing_blank_lines_linter] Trailing blank lines are superfluous.

Check warning on line 50 in data-raw/scripts/dataprep.R

GitHub Actions / Run lintr scanning

file=data-raw/scripts/dataprep.R,line=50,col=1,[trailing_blank_lines_linter] Trailing blank lines are superfluous.

Check warning on line 50 in data-raw/scripts/dataprep.R

GitHub Actions / Run lintr scanning

file=data-raw/scripts/dataprep.R,line=50,col=1,[trailing_blank_lines_linter] Trailing blank lines are superfluous.
library(dbplyr)
db_config <- config::get(file = "inst/database/config.yml")$local_container
# db_config <- config::get(file = "inst/database/config.yml")$spawn

Check warning on line 11 in data-raw/scripts/db_init.R

GitHub Actions / Run lintr scanning

file=data-raw/scripts/db_init.R,line=11,col=3,[commented_code_linter] Commented code should be removed.

Check warning on line 11 in data-raw/scripts/db_init.R

GitHub Actions / Run lintr scanning

file=data-raw/scripts/db_init.R,line=11,col=3,[commented_code_linter] Commented code should be removed.
conn <- dbx::dbxConnect(db_config$conn_string)