mirror of
https://github.com/msberends/AMR.git
synced 2025-07-10 16:22:10 +02:00
rename pre-commit hook to pre-commit checks (no-check)
This commit is contained in:
@ -28,7 +28,7 @@
|
||||
# ==================================================================== #
|
||||
|
||||
# add new version numbers here, and add the rules themselves to "data-raw/eucast_rules.tsv" and clinical_breakpoints
|
||||
# (sourcing "data-raw/_pre_commit_hook.R" will process the TSV file)
|
||||
# (sourcing "data-raw/_pre_commit_checks.R" will process the TSV file)
|
||||
EUCAST_VERSION_BREAKPOINTS <- list(
|
||||
# "13.0" = list(
|
||||
# version_txt = "v13.0",
|
||||
|
@ -689,7 +689,7 @@ create_eucast_ab_documentation <- function() {
|
||||
ab <- character()
|
||||
for (val in x) {
|
||||
if (paste0("AB_", val) %in% ls(envir = asNamespace("AMR"))) {
|
||||
# antibiotic group names, as defined in data-raw/_pre_commit_hook.R, such as `CARBAPENEMS`
|
||||
# antibiotic group names, as defined in data-raw/_pre_commit_checks.R, such as `CARBAPENEMS`
|
||||
val <- eval(parse(text = paste0("AB_", val)), envir = asNamespace("AMR"))
|
||||
} else if (val %in% AMR_env$AB_lookup$ab) {
|
||||
# separate drugs, such as `AMX`
|
||||
|
@ -611,7 +611,7 @@ ab_select_exec <- function(function_name,
|
||||
} else if (isTRUE(function_name == "antimycobacterials")) {
|
||||
abx <- AMR_env$AB_lookup$ab[which(AMR_env$AB_lookup$group == "Antimycobacterials")]
|
||||
} else {
|
||||
# their upper case equivalent are vectors with class 'ab', created in data-raw/_pre_commit_hook.R
|
||||
# their upper case equivalent are vectors with class 'ab', created in data-raw/_pre_commit_checks.R
|
||||
# carbapenems() gets its codes from AMR:::AB_CARBAPENEMS
|
||||
abx <- get(paste0("AB_", toupper(function_name)), envir = asNamespace("AMR"))
|
||||
# manually added codes from add_custom_antimicrobials() must also be supported
|
||||
|
@ -590,7 +590,7 @@ eucast_rules <- function(x,
|
||||
# this allows: eucast_rules(x, eucast_rules_df = AMR:::EUCAST_RULES_DF %>% filter(is.na(have_these_values)))
|
||||
eucast_rules_df <- list(...)$eucast_rules_df
|
||||
} else {
|
||||
# otherwise internal data file, created in data-raw/_pre_commit_hook.R
|
||||
# otherwise internal data file, created in data-raw/_pre_commit_checks.R
|
||||
eucast_rules_df <- EUCAST_RULES_DF
|
||||
}
|
||||
|
||||
|
@ -335,7 +335,7 @@ get_ab_from_namespace <- function(x, cols_ab) {
|
||||
x_new <- character()
|
||||
for (val in x) {
|
||||
if (paste0("AB_", val) %in% ls(envir = asNamespace("AMR"))) {
|
||||
# antibiotic group names, as defined in data-raw/_pre_commit_hook.R, such as `AB_CARBAPENEMS`
|
||||
# antibiotic group names, as defined in data-raw/_pre_commit_checks.R, such as `AB_CARBAPENEMS`
|
||||
val <- eval(parse(text = paste0("AB_", val)), envir = asNamespace("AMR"))
|
||||
} else if (val %in% AMR_env$AB_lookup$ab) {
|
||||
# separate drugs, such as `AMX`
|
||||
|
2
R/mo.R
2
R/mo.R
@ -460,7 +460,7 @@ as.mo <- function(x,
|
||||
}
|
||||
}
|
||||
|
||||
# 'MO_CONS' and 'MO_COPS' are 'mo' vectors created in R/_pre_commit_hook.R
|
||||
# 'MO_CONS' and 'MO_COPS' are 'mo' vectors created in R/_pre_commit_checks.R
|
||||
out[out %in% MO_CONS] <- "B_STPHY_CONS"
|
||||
out[out %in% MO_COPS] <- "B_STPHY_COPS"
|
||||
if (Becker == "all") {
|
||||
|
Reference in New Issue
Block a user