mirror of
https://github.com/msberends/AMR.git
synced 2024-12-25 07:26:12 +01:00
(v1.6.0.9030) new unit test flow
This commit is contained in:
parent
c17acbe712
commit
9a381c8d18
4
.github/workflows/check.yaml
vendored
4
.github/workflows/check.yaml
vendored
@ -144,6 +144,7 @@ jobs:
|
||||
_R_CHECK_DEPENDS_ONLY_: true
|
||||
_R_CHECK_LENGTH_1_CONDITION_: verbose
|
||||
_R_CHECK_LENGTH_1_LOGIC2_: verbose
|
||||
R_LIBS_USER: ${{ env.R_LIBS_USER }}
|
||||
run: |
|
||||
tar -xf data-raw/AMR_latest.tar.gz
|
||||
rm -rf AMR/vignettes
|
||||
@ -158,10 +159,11 @@ jobs:
|
||||
_R_CHECK_DEPENDS_ONLY_: true
|
||||
_R_CHECK_LENGTH_1_CONDITION_: verbose
|
||||
_R_CHECK_LENGTH_1_LOGIC2_: verbose
|
||||
R_LIBS_USER: ${{ env.R_LIBS_USER }}
|
||||
run: |
|
||||
tar -xf data-raw/AMR_latest.tar.gz
|
||||
rm -rf AMR/vignettes
|
||||
R CMD check AMR --no-manual --as-cran --no-vignettes --library='/Users/runner/work/_temp/Library'
|
||||
R CMD check AMR --no-manual --no-vignettes
|
||||
shell: bash
|
||||
|
||||
- name: Show testthat output
|
||||
|
@ -1,5 +1,5 @@
|
||||
Package: AMR
|
||||
Version: 1.6.0.9028
|
||||
Version: 1.6.0.9030
|
||||
Date: 2021-05-13
|
||||
Title: Antimicrobial Resistance Data Analysis
|
||||
Authors@R: c(
|
||||
|
2
NEWS.md
2
NEWS.md
@ -1,4 +1,4 @@
|
||||
# `AMR` 1.6.0.9028
|
||||
# `AMR` 1.6.0.9030
|
||||
## <small>Last updated: 13 May 2021</small>
|
||||
|
||||
### New
|
||||
|
Binary file not shown.
@ -81,7 +81,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="https://msberends.github.io/AMR//index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9028</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9030</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -81,7 +81,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9028</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9030</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -81,7 +81,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9028</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9030</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -81,7 +81,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9028</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9030</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9028</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9030</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -81,7 +81,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9028</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9030</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -236,9 +236,9 @@
|
||||
<small>Source: <a href='https://github.com/msberends/AMR/blob/master/NEWS.md'><code>NEWS.md</code></a></small>
|
||||
</div>
|
||||
|
||||
<div id="amr-1609028" class="section level1">
|
||||
<h1 class="page-header" data-toc-text="1.6.0.9028">
|
||||
<a href="#amr-1609028" class="anchor"></a><small> Unreleased </small><code>AMR</code> 1.6.0.9028</h1>
|
||||
<div id="amr-1609030" class="section level1">
|
||||
<h1 class="page-header" data-toc-text="1.6.0.9030">
|
||||
<a href="#amr-1609030" class="anchor"></a><small> Unreleased </small><code>AMR</code> 1.6.0.9030</h1>
|
||||
<div id="last-updated-13-may-2021" class="section level2">
|
||||
<h2 class="hasAnchor">
|
||||
<a href="#last-updated-13-may-2021" class="anchor"></a><small>Last updated: 13 May 2021</small>
|
||||
|
@ -12,7 +12,7 @@ articles:
|
||||
datasets: datasets.html
|
||||
resistance_predict: resistance_predict.html
|
||||
welcome_to_AMR: welcome_to_AMR.html
|
||||
last_built: 2021-05-13T20:43Z
|
||||
last_built: 2021-05-13T21:04Z
|
||||
urls:
|
||||
reference: https://msberends.github.io/AMR//reference
|
||||
article: https://msberends.github.io/AMR//articles
|
||||
|
@ -81,7 +81,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9028</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9030</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -81,7 +81,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9028</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.6.0.9030</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -27,7 +27,10 @@
|
||||
# able to install it. Yet, we want basic R CMD CHECK's in those R versions
|
||||
# as well, so only run unit tests in later R versions:
|
||||
if (require("testthat", warn.conflicts = FALSE)) {
|
||||
library(testthat)
|
||||
library(AMR)
|
||||
# print non-base packages
|
||||
print(as.data.frame(utils::installed.packages())[which(is.na(as.data.frame(utils::installed.packages())$Priority)),
|
||||
"Version",
|
||||
drop = FALSE])
|
||||
test_check("AMR")
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ test_that("mdro works", {
|
||||
pza = sample_rsi(),
|
||||
MFX = sample_rsi(),
|
||||
KAN = sample_rsi())
|
||||
expect_gt(n_distinct(mdr_tb(x)), 2)
|
||||
expect_gt(length(unique(mdr_tb(x))), 2)
|
||||
|
||||
# check the guideline by Magiorakos et al. (2012), the default guideline
|
||||
stau <- data.frame(mo = c("S. aureus", "S. aureus", "S. aureus", "S. aureus"),
|
||||
|
@ -48,9 +48,11 @@ test_that("prediction of rsi works", {
|
||||
info = TRUE)))
|
||||
pdf(NULL) # prevent Rplots.pdf being created
|
||||
expect_silent(plot(x))
|
||||
if (suppressWarnings(require("ggplot2"))) {
|
||||
expect_silent(ggplot_rsi_predict(x))
|
||||
expect_silent(ggplot(x))
|
||||
expect_error(ggplot_rsi_predict(example_isolates))
|
||||
}
|
||||
|
||||
expect_output(rsi_predict(x = subset(example_isolates, mo == "B_ESCHR_COLI"),
|
||||
model = "binomial",
|
||||
|
Loading…
Reference in New Issue
Block a user