diff --git a/DESCRIPTION b/DESCRIPTION index f74b02082..b2aa134d9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: AMR -Version: 3.0.1.9037 +Version: 3.0.1.9038 Date: 2026-03-22 Title: Antimicrobial Resistance Data Analysis Description: Functions to simplify and standardise antimicrobial resistance (AMR) diff --git a/NEWS.md b/NEWS.md index d9410f675..fecd537ce 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# AMR 3.0.1.9037 +# AMR 3.0.1.9038 ### New * Integration with the **tidymodels** framework to allow seamless use of SIR, MIC and disk data in modelling pipelines via `recipes` diff --git a/R/aa_helper_functions.R b/R/aa_helper_functions.R index e22c9d8bb..9fc9210da 100644 --- a/R/aa_helper_functions.R +++ b/R/aa_helper_functions.R @@ -423,6 +423,9 @@ highlight_code <- function(code) { format_inline_ <- function(...) { msg <- paste0(c(...), collapse = "") if (pkg_is_available("cli", min_version = "3.0.0")) { + if (!cli::ansi_has_hyperlink_support()) { + msg <- simplify_help_markup(msg) + } cli::format_inline(msg) } else { cli_to_plain(msg, envir = parent.frame()) diff --git a/R/mo_property.R b/R/mo_property.R index 54bc9ca3d..414da0608 100755 --- a/R/mo_property.R +++ b/R/mo_property.R @@ -270,7 +270,6 @@ mo_shortname <- function(x, language = get_AMR_locale(), keep_synonyms = getOpti } - #' @rdname mo_property #' @export mo_subspecies <- function(x, language = get_AMR_locale(), keep_synonyms = getOption("AMR_keep_synonyms", FALSE), ...) { diff --git a/R/sysdata.rda b/R/sysdata.rda index d7eacd65f..16c789c52 100755 Binary files a/R/sysdata.rda and b/R/sysdata.rda differ diff --git a/R/tidymodels.R b/R/tidymodels.R index 7b2500dbf..ea00c7a55 100644 --- a/R/tidymodels.R +++ b/R/tidymodels.R @@ -122,13 +122,14 @@ all_disk_predictors <- function() { #' @rdname amr-tidymodels #' @export step_mic_log2 <- function( - recipe, - ..., - role = NA, - trained = FALSE, - columns = NULL, - skip = FALSE, - id = recipes::rand_id("mic_log2")) { + recipe, + ..., + role = NA, + trained = FALSE, + columns = NULL, + skip = FALSE, + id = recipes::rand_id("mic_log2") +) { recipes::add_step( recipe, step_mic_log2_new( @@ -197,13 +198,14 @@ tidy.step_mic_log2 <- function(x, ...) { #' @rdname amr-tidymodels #' @export step_sir_numeric <- function( - recipe, - ..., - role = NA, - trained = FALSE, - columns = NULL, - skip = FALSE, - id = recipes::rand_id("sir_numeric")) { + recipe, + ..., + role = NA, + trained = FALSE, + columns = NULL, + skip = FALSE, + id = recipes::rand_id("sir_numeric") +) { recipes::add_step( recipe, step_sir_numeric_new( diff --git a/data/antibiotics.rda b/data/antibiotics.rda index 9a9e74d3d..875812b50 100644 Binary files a/data/antibiotics.rda and b/data/antibiotics.rda differ diff --git a/data/antimicrobials.rda b/data/antimicrobials.rda index f5953720f..acdce7c9f 100644 Binary files a/data/antimicrobials.rda and b/data/antimicrobials.rda differ diff --git a/tests/testthat/test-eucast_rules.R b/tests/testthat/test-eucast_rules.R index 8f4a55bb7..84a70f0b6 100755 --- a/tests/testthat/test-eucast_rules.R +++ b/tests/testthat/test-eucast_rules.R @@ -219,7 +219,6 @@ test_that("test-eucast_rules.R", { expect_inherits(eucast_dosage(c("tobra", "genta", "cipro")), "data.frame") - x <- custom_eucast_rules( AMC == "R" & genus == "Klebsiella" ~ aminopenicillins == "R", AMC == "I" & genus == "Klebsiella" ~ aminopenicillins == "I",