mirror of
https://github.com/msberends/AMR.git
synced 2025-02-22 19:10:03 +01:00
(v2.1.1.9142) unit test fix
This commit is contained in:
parent
8ba2e4ed94
commit
cc2bb151ab
@ -86,7 +86,7 @@ jobs:
|
|||||||
|
|
||||||
- uses: r-lib/actions/setup-r-dependencies@v2
|
- uses: r-lib/actions/setup-r-dependencies@v2
|
||||||
with:
|
with:
|
||||||
extra-packages: any::rcmdcheck, any::pkgload
|
extra-packages: any::rcmdcheck
|
||||||
needs: check
|
needs: check
|
||||||
upgrade: 'TRUE'
|
upgrade: 'TRUE'
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
Package: AMR
|
Package: AMR
|
||||||
Version: 2.1.1.9141
|
Version: 2.1.1.9142
|
||||||
Date: 2025-02-07
|
Date: 2025-02-07
|
||||||
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)
|
||||||
|
2
NEWS.md
2
NEWS.md
@ -1,4 +1,4 @@
|
|||||||
# AMR 2.1.1.9141
|
# AMR 2.1.1.9142
|
||||||
|
|
||||||
*(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).)*
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Metadata-Version: 2.2
|
Metadata-Version: 2.2
|
||||||
Name: AMR
|
Name: AMR
|
||||||
Version: 2.1.1.9141
|
Version: 2.1.1.9142
|
||||||
Summary: A Python wrapper for the AMR R package
|
Summary: A Python wrapper for the AMR R package
|
||||||
Home-page: https://github.com/msberends/AMR
|
Home-page: https://github.com/msberends/AMR
|
||||||
Author: Matthijs Berends
|
Author: Matthijs Berends
|
||||||
|
Binary file not shown.
BIN
PythonPackage/AMR/dist/amr-2.1.1.9141.tar.gz
vendored
BIN
PythonPackage/AMR/dist/amr-2.1.1.9141.tar.gz
vendored
Binary file not shown.
BIN
PythonPackage/AMR/dist/amr-2.1.1.9142.tar.gz
vendored
Normal file
BIN
PythonPackage/AMR/dist/amr-2.1.1.9142.tar.gz
vendored
Normal file
Binary file not shown.
@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='AMR',
|
name='AMR',
|
||||||
version='2.1.1.9141',
|
version='2.1.1.9142',
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'rpy2',
|
'rpy2',
|
||||||
|
@ -460,16 +460,14 @@ eucast_rules <- function(x,
|
|||||||
# >>> Apply Other rules: enzyme inhibitors <<< ------------------------------------------
|
# >>> Apply Other rules: enzyme inhibitors <<< ------------------------------------------
|
||||||
if (any(c("all", "other") %in% rules)) {
|
if (any(c("all", "other") %in% rules)) {
|
||||||
if (isTRUE(info)) {
|
if (isTRUE(info)) {
|
||||||
cat("\n")
|
cat(paste0("\n", font_grey(strrep("-", 0.95 * getOption("width", 100))), "\n"))
|
||||||
cat(word_wrap(
|
cat(word_wrap(
|
||||||
font_bold(paste0(
|
paste0("Rules by the ",
|
||||||
"Rules by this AMR package (",
|
font_bold(paste0("AMR package v", utils::packageDescription("AMR")$Version)),
|
||||||
font_red(paste0(
|
" (", format(as.Date(utils::packageDescription("AMR")$Date), format = "%Y"),
|
||||||
"v", utils::packageDescription("AMR")$Version, ", ",
|
"), see `?eucast_rules`\n")
|
||||||
format(as.Date(utils::packageDescription("AMR")$Date), format = "%Y")
|
|
||||||
)), "), see `?eucast_rules`\n"
|
|
||||||
))
|
|
||||||
))
|
))
|
||||||
|
cat("\n\n")
|
||||||
}
|
}
|
||||||
ab_enzyme <- subset(AMR::antibiotics, name %like% "/")[, c("ab", "name"), drop = FALSE]
|
ab_enzyme <- subset(AMR::antibiotics, name %like% "/")[, c("ab", "name"), drop = FALSE]
|
||||||
colnames(ab_enzyme) <- c("enzyme_ab", "enzyme_name")
|
colnames(ab_enzyme) <- c("enzyme_ab", "enzyme_name")
|
||||||
@ -495,8 +493,8 @@ eucast_rules <- function(x,
|
|||||||
|
|
||||||
## Set base to R where base + enzyme inhibitor is R ----
|
## Set base to R where base + enzyme inhibitor is R ----
|
||||||
rule_current <- paste0(
|
rule_current <- paste0(
|
||||||
ab_enzyme$base_name[i], " ('", font_bold(col_base), "') = R if ",
|
ab_enzyme$base_name[i], " (`", col_base, "`) = R if ",
|
||||||
tolower(ab_enzyme$enzyme_name[i]), " ('", font_bold(col_enzyme), "') = R"
|
tolower(ab_enzyme$enzyme_name[i]), " (`", col_enzyme, "`) = R"
|
||||||
)
|
)
|
||||||
if (isTRUE(info)) {
|
if (isTRUE(info)) {
|
||||||
cat(word_wrap(rule_current,
|
cat(word_wrap(rule_current,
|
||||||
@ -536,8 +534,8 @@ eucast_rules <- function(x,
|
|||||||
|
|
||||||
## Set base + enzyme inhibitor to S where base is S ----
|
## Set base + enzyme inhibitor to S where base is S ----
|
||||||
rule_current <- paste0(
|
rule_current <- paste0(
|
||||||
ab_enzyme$enzyme_name[i], " ('", font_bold(col_enzyme), "') = S if ",
|
ab_enzyme$enzyme_name[i], " (`", col_enzyme, "`) = S if ",
|
||||||
tolower(ab_enzyme$base_name[i]), " ('", font_bold(col_base), "') = S"
|
tolower(ab_enzyme$base_name[i]), " (`", col_base, "`) = S"
|
||||||
)
|
)
|
||||||
|
|
||||||
if (isTRUE(info)) {
|
if (isTRUE(info)) {
|
||||||
@ -559,7 +557,8 @@ eucast_rules <- function(x,
|
|||||||
original_data = x.bak,
|
original_data = x.bak,
|
||||||
warned = warned,
|
warned = warned,
|
||||||
info = info,
|
info = info,
|
||||||
verbose = verbose
|
verbose = verbose,
|
||||||
|
overwrite = overwrite
|
||||||
)
|
)
|
||||||
n_added <- n_added + run_changes$added
|
n_added <- n_added + run_changes$added
|
||||||
n_changed <- n_changed + run_changes$changed
|
n_changed <- n_changed + run_changes$changed
|
||||||
@ -1037,9 +1036,9 @@ eucast_rules <- function(x,
|
|||||||
cat(paste0(font_grey(strrep("-", 0.95 * getOption("width", 100))), "\n"))
|
cat(paste0(font_grey(strrep("-", 0.95 * getOption("width", 100))), "\n"))
|
||||||
|
|
||||||
if (isFALSE(verbose) && total_n_added + total_n_changed > 0) {
|
if (isFALSE(verbose) && total_n_added + total_n_changed > 0) {
|
||||||
cat("\n", word_wrap("Use ", font_bold("eucast_rules(..., verbose = TRUE)"), " (on your original data) to get a data.frame with all specified edits instead."), "\n\n", sep = "")
|
cat("\n", word_wrap("Use `eucast_rules(..., verbose = TRUE)` (on your original data) to get a data.frame with all specified edits instead."), "\n\n", sep = "")
|
||||||
} else if (isTRUE(verbose)) {
|
} else if (isTRUE(verbose)) {
|
||||||
cat("\n", word_wrap("Used 'Verbose mode' (", font_bold("verbose = TRUE"), "), which returns a data.frame with all specified edits.\nUse ", font_bold("verbose = FALSE"), " to apply the rules on your data."), "\n\n", sep = "")
|
cat("\n", word_wrap("Used 'Verbose mode' (`verbose = TRUE`), which returns a data.frame with all specified edits.\nUse `verbose = FALSE` to apply the rules on your data."), "\n\n", sep = "")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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.9141. Remember this whenever someone asks which AMR package version you’re at.
|
First and foremost, you are trained on version 2.1.1.9142. Remember this whenever someone asks which AMR package version you’re at.
|
||||||
|
|
||||||
Below are the contents of the file, the file, and all the files (documentation) in the package. Every file content is split using 100 hypens.
|
Below are the contents of the file, the file, and all the files (documentation) in the package. Every file content is split using 100 hypens.
|
||||||
----------------------------------------------------------------------------------------------------
|
----------------------------------------------------------------------------------------------------
|
@ -141,8 +141,7 @@ call_functions <- c(
|
|||||||
|
|
||||||
import_functions <- c(import_functions, call_functions)
|
import_functions <- c(import_functions, call_functions)
|
||||||
|
|
||||||
suggests <- tryCatch(strsplit(pkgload::pkg_desc()$get_field("Suggests"), "[,\n ]+")[[1]],
|
suggests <- strsplit(utils::packageDescription("AMR")$Suggests, "[,\n ]+")[[1]]
|
||||||
error = function(e) unname(import_functions))
|
|
||||||
for (i in seq_len(length(import_functions))) {
|
for (i in seq_len(length(import_functions))) {
|
||||||
fn <- names(import_functions)[i]
|
fn <- names(import_functions)[i]
|
||||||
pkg <- unname(import_functions[i])
|
pkg <- unname(import_functions[i])
|
||||||
|
Loading…
Reference in New Issue
Block a user