1
0
mirror of https://github.com/msberends/AMR.git synced 2025-04-19 08:33:49 +02:00

(v2.1.1.9229) unit tests

This commit is contained in:
dr. M.S. (Matthijs) Berends 2025-03-28 11:40:09 +01:00
parent 49da312506
commit bd873ac1bc
No known key found for this signature in database
6 changed files with 13 additions and 8 deletions

View File

@ -1,5 +1,5 @@
Package: AMR Package: AMR
Version: 2.1.1.9228 Version: 2.1.1.9229
Date: 2025-03-28 Date: 2025-03-28
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.1.1.9228 # AMR 2.1.1.9229
*(this beta version will eventually become v3.0. We're happy to reach a new major milestone soon, which will be all about the new One Health support! Install this beta using [the instructions here](https://msberends.github.io/AMR/#latest-development-version).)* *(this beta version will eventually become v3.0. We're happy to reach a new major milestone soon, which will be all about the new One Health support! Install this beta using [the instructions here](https://msberends.github.io/AMR/#latest-development-version).)*

View File

@ -1,6 +1,6 @@
This knowledge base contains all context you must know about the AMR package for R. You are a GPT trained to be an assistant for the AMR package in R. You are an incredible R specialist, especially trained in this package and in the tidyverse. This knowledge base contains all context you must know about the AMR package for R. You are a GPT trained to be an assistant for the AMR package in R. You are an incredible R specialist, especially trained in this package and in the tidyverse.
First and foremost, you are trained on version 2.1.1.9228. Remember this whenever someone asks which AMR package version youre at. First and foremost, you are trained on version 2.1.1.9229. Remember this whenever someone asks which AMR package version youre at.
Below are the contents of the NAMESPACE file, the index.md file, and all the man/*.Rd files (documentation) in the package. Every file content is split using 100 hypens. Below are the contents of the NAMESPACE file, the index.md file, and all the man/*.Rd files (documentation) in the package. Every file content is split using 100 hypens.
---------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------
@ -9972,7 +9972,7 @@ download_txt <- function(filename) {
trimws(format(file.mtime(paste0("../data/", filename, ".rda")), "%e %B %Y %H:%M:%S %Z", tz = "UTC")), trimws(format(file.mtime(paste0("../data/", filename, ".rda")), "%e %B %Y %H:%M:%S %Z", tz = "UTC")),
". Find more info about the contents, (scientific) source, and structure of this [data set here](https://msberends.github.io/AMR/reference/", ifelse(filename == "antivirals", "antimicrobials", filename), ".html).\n" ". Find more info about the contents, (scientific) source, and structure of this [data set here](https://msberends.github.io/AMR/reference/", ifelse(filename == "antivirals", "antimicrobials", filename), ".html).\n"
) )
github_base <- "https://github.com/msberends/AMR/raw/main/" github_base <- "https://github.com/msberends/AMR/raw/main/data-raw/datasets/"
local_filename <- paste0("../data-raw/datasets/", filename) local_filename <- paste0("../data-raw/datasets/", filename)
rds <- paste0(local_filename, ".rds") rds <- paste0(local_filename, ".rds")
txt <- paste0(local_filename, ".txt") txt <- paste0(local_filename, ".txt")
@ -9984,7 +9984,7 @@ download_txt <- function(filename) {
create_txt <- function(filename, type, software, exists) { create_txt <- function(filename, type, software, exists) {
if (isTRUE(exists)) { if (isTRUE(exists)) {
paste0( paste0(
"* Download as [", software, "](", github_base, filename, ") (", "* Download as [", software, "](", github_base, basename(filename), ") (",
AMR:::formatted_filesize(filename), ") \n" AMR:::formatted_filesize(filename), ") \n"
) )
} else { } else {

View File

@ -130,6 +130,10 @@ input[type="search"] {
.template-home .endorse_img { .template-home .endorse_img {
width: 150px; width: 150px;
} }
blockquote {
padding: 1.25rem 1.25rem;
border-left: 1rem solid var(--amr-green-dark);
}
/* /*
this shows on top of every sidebar to the right this shows on top of every sidebar to the right

View File

@ -117,7 +117,7 @@ test_that("test-eucast_rules.R", {
TIC = as.sir("R"), TIC = as.sir("R"),
PIP = as.sir("S") PIP = as.sir("S")
) %>% ) %>%
eucast_rules(col_mo = "mo", version_expertrules = 3.1, info = FALSE, overwrite = TRUE) %>% eucast_rules(col_mo = "mo", version_expertrules = 3.1, rules = "expert", info = FALSE, overwrite = TRUE) %>%
pull(PIP) %>% pull(PIP) %>%
unique() %>% unique() %>%
as.character() as.character()
@ -136,6 +136,7 @@ test_that("test-eucast_rules.R", {
stringsAsFactors = FALSE stringsAsFactors = FALSE
), ),
version_expertrules = 3.1, version_expertrules = 3.1,
rules = "expert",
overwrite = TRUE, overwrite = TRUE,
only_sir_columns = FALSE only_sir_columns = FALSE
)$CLR)) )$CLR))

View File

@ -42,7 +42,7 @@ download_txt <- function(filename) {
trimws(format(file.mtime(paste0("../data/", filename, ".rda")), "%e %B %Y %H:%M:%S %Z", tz = "UTC")), trimws(format(file.mtime(paste0("../data/", filename, ".rda")), "%e %B %Y %H:%M:%S %Z", tz = "UTC")),
". Find more info about the contents, (scientific) source, and structure of this [data set here](https://msberends.github.io/AMR/reference/", ifelse(filename == "antivirals", "antimicrobials", filename), ".html).\n" ". Find more info about the contents, (scientific) source, and structure of this [data set here](https://msberends.github.io/AMR/reference/", ifelse(filename == "antivirals", "antimicrobials", filename), ".html).\n"
) )
github_base <- "https://github.com/msberends/AMR/raw/main/" github_base <- "https://github.com/msberends/AMR/raw/main/data-raw/datasets/"
local_filename <- paste0("../data-raw/datasets/", filename) local_filename <- paste0("../data-raw/datasets/", filename)
rds <- paste0(local_filename, ".rds") rds <- paste0(local_filename, ".rds")
txt <- paste0(local_filename, ".txt") txt <- paste0(local_filename, ".txt")
@ -54,7 +54,7 @@ download_txt <- function(filename) {
create_txt <- function(filename, type, software, exists) { create_txt <- function(filename, type, software, exists) {
if (isTRUE(exists)) { if (isTRUE(exists)) {
paste0( paste0(
"* Download as [", software, "](", github_base, filename, ") (", "* Download as [", software, "](", github_base, basename(filename), ") (",
AMR:::formatted_filesize(filename), ") \n" AMR:::formatted_filesize(filename), ") \n"
) )
} else { } else {