1
0
mirror of https://github.com/msberends/AMR.git synced 2024-12-26 18:06:11 +01:00

unit testing R4.3

This commit is contained in:
dr. M.S. (Matthijs) Berends 2023-05-26 20:37:00 +02:00
parent 766db4e21f
commit e1966503ee
10 changed files with 20 additions and 17 deletions

View File

@ -48,7 +48,8 @@ jobs:
config: config:
# Test all old versions of R >= 3.0, we support them all! # Test all old versions of R >= 3.0, we support them all!
# For these old versions, dependencies and vignettes will not be checked. # For these old versions, dependencies and vignettes will not be checked.
# For recent R versions, see check-recent.yaml (r-lib and tidyverse support the latest 5 major R versions). # For recent R versions, see check-recent.yaml (r-lib and tidyverse support the latest 5 major R releases).
- {os: ubuntu-latest, r: '3.5', allowfail: false}
- {os: ubuntu-latest, r: '3.4', allowfail: false} - {os: ubuntu-latest, r: '3.4', allowfail: false}
- {os: ubuntu-latest, r: '3.3', allowfail: false} - {os: ubuntu-latest, r: '3.3', allowfail: false}
- {os: ubuntu-latest, r: '3.2', allowfail: false} - {os: ubuntu-latest, r: '3.2', allowfail: false}

View File

@ -52,21 +52,21 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
config: config:
# current development version: # current development version, check all major OSes:
- {os: macOS-latest, r: 'devel', allowfail: false} - {os: macOS-latest, r: 'devel', allowfail: false}
- {os: windows-latest, r: 'devel', allowfail: false} - {os: windows-latest, r: 'devel', allowfail: false}
- {os: ubuntu-latest, r: 'devel', allowfail: false} - {os: ubuntu-latest, r: 'devel', allowfail: false}
# current 'release' version: # current 'release' version, check all major OSes:
- {os: macOS-latest, r: '4.2', allowfail: false} - {os: macOS-latest, r: '4.3', allowfail: false}
- {os: windows-latest, r: '4.2', allowfail: false} - {os: windows-latest, r: '4.3', allowfail: false}
- {os: ubuntu-latest, r: '4.2', allowfail: false} - {os: ubuntu-latest, r: '4.3', allowfail: false}
# older versions (see also check-old.yaml for even older versions): # older versions (see also check-old.yaml for even older versions):
- {os: ubuntu-latest, r: '4.2', allowfail: false}
- {os: ubuntu-latest, r: '4.1', allowfail: false} - {os: ubuntu-latest, r: '4.1', allowfail: false}
- {os: ubuntu-latest, r: '4.0', allowfail: false} - {os: ubuntu-latest, r: '4.0', allowfail: false}
- {os: ubuntu-latest, r: '3.6', allowfail: false} - {os: ubuntu-latest, r: '3.6', allowfail: false} # when a new R releases, this one has to move to check-old.yaml
- {os: ubuntu-latest, r: '3.5', allowfail: false} # when a new R releases, this one has to move to check-old.yaml
env: env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,5 +1,5 @@
Package: AMR Package: AMR
Version: 2.0.0.9021 Version: 2.0.0.9022
Date: 2023-05-26 Date: 2023-05-26
Title: Antimicrobial Resistance Data Analysis Title: Antimicrobial Resistance Data Analysis
Description: Functions to simplify and standardise antimicrobial resistance (AMR) Description: Functions to simplify and standardise antimicrobial resistance (AMR)

View File

@ -1,4 +1,4 @@
# AMR 2.0.0.9021 # AMR 2.0.0.9022
## Changed ## Changed
* Added oxygen tolerance from BacDive to over 25,000 bacteria in the `microorganisms` data set * Added oxygen tolerance from BacDive to over 25,000 bacteria in the `microorganisms` data set

View File

@ -1009,7 +1009,7 @@ get_current_column <- function() {
# cur_column() doesn't always work (only allowed for certain conditions set by dplyr), but it's probably still possible: # cur_column() doesn't always work (only allowed for certain conditions set by dplyr), but it's probably still possible:
frms <- lapply(sys.frames(), function(env) { frms <- lapply(sys.frames(), function(env) {
if (!is.null(env$i)) { if (tryCatch(!is.null(env$i), error = function(e) FALSE)) {
if (!is.null(env$tibble_vars)) { if (!is.null(env$tibble_vars)) {
# for mutate_if() # for mutate_if()
env$tibble_vars[env$i] env$tibble_vars[env$i]

View File

@ -71,7 +71,8 @@
#' @examples #' @examples
#' \donttest{ #' \donttest{
#' # a combination of species is not formal taxonomy, so #' # a combination of species is not formal taxonomy, so
#' # this will result in only "Enterobacter asburiae": #' # this will result in "Enterobacter cloacae cloacae",
#' # since it resembles the input best:
#' mo_name("Enterobacter asburiae/cloacae") #' mo_name("Enterobacter asburiae/cloacae")
#' #'
#' # now add a custom entry - it will be considered by as.mo() and #' # now add a custom entry - it will be considered by as.mo() and
@ -109,7 +110,7 @@
#' mo_name("BACTEROIDES / PARABACTEROIDES") #' mo_name("BACTEROIDES / PARABACTEROIDES")
#' mo_rank("BACTEROIDES / PARABACTEROIDES") #' mo_rank("BACTEROIDES / PARABACTEROIDES")
#' #'
#' # taxonomy still works, although a slashline genus was given as input: #' # taxonomy still works, even though a slashline genus was given as input:
#' mo_family("Bacteroides/Parabacteroides") #' mo_family("Bacteroides/Parabacteroides")
#' #'
#' #'

Binary file not shown.

View File

@ -28,7 +28,7 @@
# ==================================================================== # # ==================================================================== #
expect_identical(as.mo("Enterobacter asburiae/cloacae"), expect_identical(as.mo("Enterobacter asburiae/cloacae"),
as.mo("Enterobacter asburiae")) as.mo("Enterobacter cloacae cloacae"))
suppressMessages( suppressMessages(
add_custom_microorganisms( add_custom_microorganisms(

View File

@ -32,7 +32,7 @@ The \code{AMR} package is a \href{https://msberends.github.io/AMR/#copyright}{fr
This work was published in the Journal of Statistical Software (Volume 104(3); \doi{jss.v104.i03}) and formed the basis of two PhD theses (\doi{10.33612/diss.177417131} and \doi{10.33612/diss.192486375}). This work was published in the Journal of Statistical Software (Volume 104(3); \doi{jss.v104.i03}) and formed the basis of two PhD theses (\doi{10.33612/diss.177417131} and \doi{10.33612/diss.192486375}).
After installing this package, R knows \href{https://msberends.github.io/AMR/reference/microorganisms.html}{\strong{~52 000 microorganisms}} (updated december 2022) and all \href{https://msberends.github.io/AMR/reference/antibiotics.html}{\strong{~600 antibiotic, antimycotic and antiviral drugs}} by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral breakpoint guidelines from CLSI and EUCAST are included from the last 10 years. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). \strong{It was designed to work in any setting, including those with very limited resources}. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the \href{https://www.rug.nl}{University of Groningen}, in collaboration with non-profit organisations \href{https://www.certe.nl}{Certe Medical Diagnostics and Advice Foundation} and \href{https://www.umcg.nl}{University Medical Center Groningen}. After installing this package, R knows \href{https://msberends.github.io/AMR/reference/microorganisms.html}{\strong{~52 000 microorganisms}} (updated December 2022) and all \href{https://msberends.github.io/AMR/reference/antibiotics.html}{\strong{~600 antibiotic, antimycotic and antiviral drugs}} by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral breakpoint guidelines from CLSI and EUCAST are included from the last 10 years. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). \strong{It was designed to work in any setting, including those with very limited resources}. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the \href{https://www.rug.nl}{University of Groningen}, in collaboration with non-profit organisations \href{https://www.certe.nl}{Certe Medical Diagnostics and Advice Foundation} and \href{https://www.umcg.nl}{University Medical Center Groningen}.
The \code{AMR} package is available in English, Chinese, Czech, Danish, Dutch, Finnish, French, German, Greek, Italian, Japanese, Norwegian, Polish, Portuguese, Romanian, Russian, Spanish, Swedish, Turkish, and Ukrainian. Antimicrobial drug (group) names and colloquial microorganism names are provided in these languages. The \code{AMR} package is available in English, Chinese, Czech, Danish, Dutch, Finnish, French, German, Greek, Italian, Japanese, Norwegian, Polish, Portuguese, Romanian, Russian, Spanish, Swedish, Turkish, and Ukrainian. Antimicrobial drug (group) names and colloquial microorganism names are provided in these languages.
} }

View File

@ -52,7 +52,8 @@ Use \code{\link[=clear_custom_microorganisms]{clear_custom_microorganisms()}} to
\examples{ \examples{
\donttest{ \donttest{
# a combination of species is not formal taxonomy, so # a combination of species is not formal taxonomy, so
# this will result in only "Enterobacter asburiae": # this will result in "Enterobacter cloacae cloacae",
# since it resembles the input best:
mo_name("Enterobacter asburiae/cloacae") mo_name("Enterobacter asburiae/cloacae")
# now add a custom entry - it will be considered by as.mo() and # now add a custom entry - it will be considered by as.mo() and
@ -90,7 +91,7 @@ add_custom_microorganisms(
mo_name("BACTEROIDES / PARABACTEROIDES") mo_name("BACTEROIDES / PARABACTEROIDES")
mo_rank("BACTEROIDES / PARABACTEROIDES") mo_rank("BACTEROIDES / PARABACTEROIDES")
# taxonomy still works, although a slashline genus was given as input: # taxonomy still works, even though a slashline genus was given as input:
mo_family("Bacteroides/Parabacteroides") mo_family("Bacteroides/Parabacteroides")