diff --git a/.github/workflows/check-old-tinytest.yaml b/.github/workflows/check-old-tinytest.yaml index d2a9de12d..eb2f0e6c7 100644 --- a/.github/workflows/check-old-tinytest.yaml +++ b/.github/workflows/check-old-tinytest.yaml @@ -57,7 +57,8 @@ jobs: # - {os: ubuntu-latest, r: '3.3', allowfail: false} # - {os: ubuntu-latest, r: '3.2', allowfail: false} # - {os: ubuntu-latest, r: '3.1', allowfail: false} - - {os: ubuntu-latest, r: '3.0', allowfail: false} + # R 3.0 cannot be resolved for ubuntu-latest (Ubuntu 26.04), so use Ubuntu 24.04 + - {os: ubuntu-24.04, r: '3.0', allowfail: false} env: R_REMOTES_NO_ERRORS_FROM_WARNINGS: true diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 71c46511c..56975edbd 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -48,7 +48,8 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.9' + # Python 3.9 is not available for ubuntu-latest (Ubuntu 26.04) + python-version: '3.12' - name: Install build dependencies run: | diff --git a/DESCRIPTION b/DESCRIPTION index 87b0d87c0..5efd865cc 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: AMR -Version: 3.1.0.9013 +Version: 3.1.0.9014 Date: 2026-10-30 Title: Antimicrobial Resistance Data Analysis Description: Functions to simplify and standardise antimicrobial resistance (AMR) diff --git a/NEWS.md b/NEWS.md index 31d4a08fa..c2c9c35d3 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# AMR 3.1.0.9013 +# AMR 3.1.0.9014 This version fixes a critical bug in WISCA that biased all coverage estimates of `wisca()` and `antibiogram(..., wisca = TRUE)` downwards since AMR 3.0.0. Users are strongly advised to re-run their WISCA analyses. diff --git a/tests/testthat/test-antibiogram.R b/tests/testthat/test-antibiogram.R index 7010ef1e0..f57374e7f 100644 --- a/tests/testthat/test-antibiogram.R +++ b/tests/testthat/test-antibiogram.R @@ -75,7 +75,16 @@ test_that("test-antibiogram.R", { expect_false("B_BRCLL_MLTN" %in% retrieve_wisca_parameters(wisca_with)$mo) # warning for a large prior weight of rare pathogens expect_warning(wisca(wisca_data, antimicrobials = "MEM", syndromic_group = "grp", simulations = 100, info = FALSE), "prior weight") - expect_warning(wisca(example_isolates, antimicrobials = "MEM", simulations = 100, info = FALSE), NA) + # (expect_warning(..., NA) is not supported by tinytest) + wisca_warnings <- character(0) + withCallingHandlers( + wisca(example_isolates, antimicrobials = "MEM", simulations = 100, info = FALSE), + warning = function(w) { + wisca_warnings <<- c(wisca_warnings, conditionMessage(w)) + invokeRestart("muffleWarning") + } + ) + expect_false(any(grepl("prior weight", wisca_warnings))) if (AMR:::pkg_is_available("dplyr", min_version = "1.0.0", also_load = TRUE)) { ab_grouped <- tryCatch( # pathogen names are translated, so test in English, which must also hold on systems in another language