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

(v0.7.0.9014) unit tests

This commit is contained in:
dr. M.S. (Matthijs) Berends 2019-06-22 20:14:06 +02:00
parent c9156c004a
commit b94638d53e
12 changed files with 21 additions and 29 deletions

View File

@ -1,5 +1,5 @@
Package: AMR Package: AMR
Version: 0.7.0.9013 Version: 0.7.0.9014
Date: 2019-06-22 Date: 2019-06-22
Title: Antimicrobial Resistance Analysis Title: Antimicrobial Resistance Analysis
Authors@R: c( Authors@R: c(

View File

@ -1,4 +1,4 @@
# AMR 0.7.0.9013 # AMR 0.7.0.9014
#### New #### New
* Function `rsi_df()` to transform a `data.frame` to a data set containing only the microbial interpretation (S, I, R), the antibiotic, the percentage of S/I/R and the number of available isolates. This is a convenient combination of the existing functions `count_df()` and `portion_df()` to immediately show resistance percentages and number of available isolates: * Function `rsi_df()` to transform a `data.frame` to a data set containing only the microbial interpretation (S, I, R), the antibiotic, the percentage of S/I/R and the number of available isolates. This is a convenient combination of the existing functions `count_df()` and `portion_df()` to immediately show resistance percentages and number of available isolates:

View File

@ -78,7 +78,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a> <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">0.7.0.9013</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.0.9014</span>
</span> </span>
</div> </div>

View File

@ -78,7 +78,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <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">0.7.0.9013</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.0.9014</span>
</span> </span>
</div> </div>
@ -241,10 +241,8 @@
<li><a href="MDR.html">How to determine multi-drug resistance (MDR)</a></li> <li><a href="MDR.html">How to determine multi-drug resistance (MDR)</a></li>
<li><a href="SPSS.html">How to import data from SPSS / SAS / Stata</a></li> <li><a href="SPSS.html">How to import data from SPSS / SAS / Stata</a></li>
<li><a href="WHONET.html">How to work with WHONET data</a></li> <li><a href="WHONET.html">How to work with WHONET data</a></li>
<li><a href="ab_property.html">How to get properties of an antibiotic</a></li>
<li><a href="benchmarks.html">Benchmarks</a></li> <li><a href="benchmarks.html">Benchmarks</a></li>
<li><a href="freq.html">How to create frequency tables</a></li> <li><a href="freq.html">How to create frequency tables</a></li>
<li><a href="mo_property.html">How to get properties of a microorganism</a></li>
<li><a href="resistance_predict.html">How to predict antimicrobial resistance</a></li> <li><a href="resistance_predict.html">How to predict antimicrobial resistance</a></li>
</ul> </ul>
</div> </div>

View File

@ -78,7 +78,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a> <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">0.7.0.9013</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.0.9014</span>
</span> </span>
</div> </div>

View File

@ -42,7 +42,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a> <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">0.7.0.9013</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.0.9014</span>
</span> </span>
</div> </div>

View File

@ -78,7 +78,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <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">0.7.0.9012</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.0.9014</span>
</span> </span>
</div> </div>
@ -232,9 +232,9 @@
</div> </div>
<div id="amr-0709012" class="section level1"> <div id="amr-0709014" class="section level1">
<h1 class="page-header"> <h1 class="page-header">
<a href="#amr-0709012" class="anchor"></a>AMR 0.7.0.9012<small> Unreleased </small> <a href="#amr-0709014" class="anchor"></a>AMR 0.7.0.9014<small> Unreleased </small>
</h1> </h1>
<div id="new" class="section level4"> <div id="new" class="section level4">
<h4 class="hasAnchor"> <h4 class="hasAnchor">
@ -252,7 +252,7 @@
<a class="sourceLine" id="cb1-8" title="8"><span class="co"># 4 Ciprofloxacin R 0.1618169 228</span></a></code></pre></div> <a class="sourceLine" id="cb1-8" title="8"><span class="co"># 4 Ciprofloxacin R 0.1618169 228</span></a></code></pre></div>
</li> </li>
<li> <li>
<p>Support for all scientifically published pathotypes of <em>E. coli</em> to date. Supported are:</p> <p>Support for all scientifically published pathotypes of <em>E. coli</em> to date (that we could find). Supported are:</p>
<ul> <ul>
<li>AIEC (Adherent-Invasive <em>E. coli</em>)</li> <li>AIEC (Adherent-Invasive <em>E. coli</em>)</li>
<li>ATEC (Atypical Entero-pathogenic <em>E. coli</em>)</li> <li>ATEC (Atypical Entero-pathogenic <em>E. coli</em>)</li>
@ -297,10 +297,12 @@
<li>Removed <code>latest_annual_release</code> from the <code><a href="../reference/catalogue_of_life_version.html">catalogue_of_life_version()</a></code> function</li> <li>Removed <code>latest_annual_release</code> from the <code><a href="../reference/catalogue_of_life_version.html">catalogue_of_life_version()</a></code> function</li>
<li>Removed antibiotic code <code>PVM1</code> from the <code>antibiotics</code> data set as this was a duplicate of <code>PME</code> <li>Removed antibiotic code <code>PVM1</code> from the <code>antibiotics</code> data set as this was a duplicate of <code>PME</code>
</li> </li>
<li>Fixed bug where not all old taxonomic named would not be printed when using a vector as input for <code><a href="../reference/as.mo.html">as.mo()</a></code> <li>Fixed bug where not all old taxonomic names would be printed, when using a vector as input for <code><a href="../reference/as.mo.html">as.mo()</a></code>
</li> </li>
<li>Manually added <em>Trichomonas vaginalis</em> from the kingdom of Protozoa, which is missing from the Catalogue of Life</li> <li>Manually added <em>Trichomonas vaginalis</em> from the kingdom of Protozoa, which is missing from the Catalogue of Life</li>
<li>Small improvements to <code><a href="https://www.rdocumentation.org/packages/graphics/topics/plot">plot()</a></code> and <code><a href="https://www.rdocumentation.org/packages/graphics/topics/barplot">barplot()</a></code> for MIC and RSI classes</li> <li>Small improvements to <code><a href="https://www.rdocumentation.org/packages/graphics/topics/plot">plot()</a></code> and <code><a href="https://www.rdocumentation.org/packages/graphics/topics/barplot">barplot()</a></code> for MIC and RSI classes</li>
<li>Allow Catalogue of Life IDs to be coerced by <code><a href="../reference/as.mo.html">as.mo()</a></code>
</li>
</ul> </ul>
</div> </div>
<div id="other" class="section level4"> <div id="other" class="section level4">
@ -1139,7 +1141,7 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
<div id="tocnav"> <div id="tocnav">
<h2>Contents</h2> <h2>Contents</h2>
<ul class="nav nav-pills nav-stacked"> <ul class="nav nav-pills nav-stacked">
<li><a href="#amr-0709012">0.7.0.9012</a></li> <li><a href="#amr-0709014">0.7.0.9014</a></li>
<li><a href="#amr-070">0.7.0</a></li> <li><a href="#amr-070">0.7.0</a></li>
<li><a href="#amr-061">0.6.1</a></li> <li><a href="#amr-061">0.6.1</a></li>
<li><a href="#amr-060">0.6.0</a></li> <li><a href="#amr-060">0.6.0</a></li>

View File

@ -7,10 +7,8 @@ articles:
MDR: MDR.html MDR: MDR.html
SPSS: SPSS.html SPSS: SPSS.html
WHONET: WHONET.html WHONET: WHONET.html
ab_property: ab_property.html
benchmarks: benchmarks.html benchmarks: benchmarks.html
freq: freq.html freq: freq.html
mo_property: mo_property.html
resistance_predict: resistance_predict.html resistance_predict: resistance_predict.html
urls: urls:
reference: https://msberends.gitlab.io/AMR/reference reference: https://msberends.gitlab.io/AMR/reference

View File

@ -78,7 +78,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <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">0.7.0.9013</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.7.0.9014</span>
</span> </span>
</div> </div>

View File

@ -153,18 +153,12 @@
<url> <url>
<loc>https://msberends.gitlab.io/AMR/articles/WHONET.html</loc> <loc>https://msberends.gitlab.io/AMR/articles/WHONET.html</loc>
</url> </url>
<url>
<loc>https://msberends.gitlab.io/AMR/articles/ab_property.html</loc>
</url>
<url> <url>
<loc>https://msberends.gitlab.io/AMR/articles/benchmarks.html</loc> <loc>https://msberends.gitlab.io/AMR/articles/benchmarks.html</loc>
</url> </url>
<url> <url>
<loc>https://msberends.gitlab.io/AMR/articles/freq.html</loc> <loc>https://msberends.gitlab.io/AMR/articles/freq.html</loc>
</url> </url>
<url>
<loc>https://msberends.gitlab.io/AMR/articles/mo_property.html</loc>
</url>
<url> <url>
<loc>https://msberends.gitlab.io/AMR/articles/resistance_predict.html</loc> <loc>https://msberends.gitlab.io/AMR/articles/resistance_predict.html</loc>
</url> </url>

View File

@ -66,8 +66,7 @@ echo "• List of changed files •"
echo "•••••••••••••••••••••••••" echo "•••••••••••••••••••••••••"
git status --short git status --short
echo echo
read -p "Uploading version ${new_version}. Continue (Y/n)? " choice
read -p "Pushing version ${new_version}. Continue (Y/n)? " choice
case "$choice" in case "$choice" in
n|N ) exit 1;; n|N ) exit 1;;
* ) ;; * ) ;;
@ -82,6 +81,7 @@ git commit -a -m "(v$new_version) $1" --quiet
git push --quiet git push --quiet
echo "Comparison:" echo "Comparison:"
echo "https://gitlab.com/msberends/AMR/compare/master...premaster?view=inline" echo "https://gitlab.com/msberends/AMR/compare/master...premaster?view=inline"
echo "Check for all CRAN tests:"
echo "rhub::check_for_cran(devtools::build(args = c('--no-build-vignettes')))"
echo echo
echo "Done." echo "Done."

View File

@ -260,9 +260,9 @@ test_that("as.mo works", {
expect_null(mo_failures()) expect_null(mo_failures())
expect_true(septic_patients %>% pull(mo) %>% is.mo()) expect_true(septic_patients %>% pull(mo) %>% is.mo())
expect_equal(get_mo_code("test", "mo"), "test") # expect_equal(get_mo_code("test", "mo"), "test")
expect_equal(length(get_mo_code("Escherichia", "genus")), # expect_equal(length(get_mo_code("Escherichia", "genus")),
nrow(AMR::microorganisms[base::which(AMR::microorganisms[, "genus"] %in% "Escherichia"),])) # nrow(AMR::microorganisms[base::which(AMR::microorganisms[, "genus"] %in% "Escherichia"),]))
expect_error(translate_allow_uncertain(5)) expect_error(translate_allow_uncertain(5))