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

(v1.7.1.9001) unit tests

This commit is contained in:
dr. M.S. (Matthijs) Berends 2021-06-05 15:12:01 +02:00
parent 1908e7cc7a
commit 683a0e748a
21 changed files with 45 additions and 31 deletions

View File

@ -23,6 +23,8 @@
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ # # how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
# ==================================================================== # # ==================================================================== #
# This GitHub Actions file runs without ANY dependency, so works on all versions of R since R-3.0.
on: on:
push: push:
branches: branches:
@ -96,12 +98,18 @@ jobs:
run: | run: |
sudo apt install -y libssl-dev pandoc pandoc-citeproc libxml2-dev libicu-dev libcurl4-openssl-dev libpng-dev sudo apt install -y libssl-dev pandoc pandoc-citeproc libxml2-dev libicu-dev libcurl4-openssl-dev libpng-dev
- name: Query dependencies
# this will change once a week, so it will cache dependency updates
run: |
writeLines(paste(format(Sys.Date(), "week %V %Y"), sprintf("R-%i.%i", getRversion()$major, getRversion()$minor)), ".github/week-R-version")
shell: Rscript {0}
- name: Restore cached R packages - name: Restore cached R packages
# this step will add the step 'Post Restore cached R packages' on a succesful run # this step will add the step 'Post Restore cached R packages' on a succesful run
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: ${{ env.R_LIBS_USER }} path: ${{ env.R_LIBS_USER }}
key: ${{ matrix.config.os }}-r-${{ matrix.config.r }}-v4 key: ${{ matrix.config.os }}-${{ hashFiles('.github/week-R-version') }}-v4
- name: Unpack AMR and install R dependencies - name: Unpack AMR and install R dependencies
if: always() if: always()

View File

@ -48,12 +48,18 @@ jobs:
- uses: r-lib/actions/setup-pandoc@master - uses: r-lib/actions/setup-pandoc@master
- name: Query dependencies
# this will change once a week, so it will cache dependency updates
run: |
writeLines(paste(format(Sys.Date(), "week %V %Y"), sprintf("R-%i.%i", getRversion()$major, getRversion()$minor)), ".github/week-R-version")
shell: Rscript {0}
- name: Restore cached R packages - name: Restore cached R packages
# this step will add the step 'Post Restore cached R packages' on a succesful run # this step will add the step 'Post Restore cached R packages' on a succesful run
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: ${{ env.R_LIBS_USER }} path: ${{ env.R_LIBS_USER }}
key: macOS-latest-r-release-v5-codecovr key: ${{ matrix.config.os }}-${{ hashFiles('.github/week-R-version') }}-v4
- name: Unpack AMR and install R dependencies - name: Unpack AMR and install R dependencies
run: | run: |
@ -73,6 +79,7 @@ jobs:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
R_RUN_TINYTEST: true R_RUN_TINYTEST: true
run: | run: |
install.packages("covr", repos = "https://cran.rstudio.com/")
library(AMR) library(AMR)
library(tinytest) library(tinytest)
x <- covr::codecov(line_exclusions = list("R/atc_online.R", "R/mo_source.R", "R/translate.R", "R/resistance_predict.R", "R/aa_helper_functions.R", "R/aa_helper_pm_functions.R", "R/zzz.R")) x <- covr::codecov(line_exclusions = list("R/atc_online.R", "R/mo_source.R", "R/translate.R", "R/resistance_predict.R", "R/aa_helper_functions.R", "R/aa_helper_pm_functions.R", "R/zzz.R"))

View File

@ -1,6 +1,6 @@
Package: AMR Package: AMR
Version: 1.7.1.9000 Version: 1.7.1.9001
Date: 2021-06-04 Date: 2021-06-05
Title: Antimicrobial Resistance Data Analysis Title: Antimicrobial Resistance Data Analysis
Authors@R: c( Authors@R: c(
person(role = c("aut", "cre"), person(role = c("aut", "cre"),

View File

@ -1,5 +1,5 @@
# `AMR` 1.7.1.9000 # `AMR` 1.7.1.9001
## <small>Last updated: 4 June 2021</small> ## <small>Last updated: 5 June 2021</small>
### Changed ### Changed
* Added more antibiotic class selectors, such as `lincosamides()` and `lipoglycopeptides()` * Added more antibiotic class selectors, such as `lincosamides()` and `lipoglycopeptides()`
@ -8,7 +8,6 @@
# `AMR` 1.7.1 # `AMR` 1.7.1
### Breaking change ### Breaking change
* Support for CLSI 2020 guideline for interpreting MICs and disk diffusion values (using `as.rsi()`)
* All antibiotic class selectors (such as `carbapenems()`, `aminoglycosides()`) can now be used for filtering as well, making all their accompanying `filter_*()` functions redundant (such as `filter_carbapenems()`, `filter_aminoglycosides()`). These functions are now deprecated and will be removed in a next release. Examples of how the selectors can be used for filtering: * All antibiotic class selectors (such as `carbapenems()`, `aminoglycosides()`) can now be used for filtering as well, making all their accompanying `filter_*()` functions redundant (such as `filter_carbapenems()`, `filter_aminoglycosides()`). These functions are now deprecated and will be removed in a next release. Examples of how the selectors can be used for filtering:
```r ```r
# select columns with results for carbapenems # select columns with results for carbapenems
@ -28,6 +27,7 @@
``` ```
### New ### New
* Support for CLSI 2020 guideline for interpreting MICs and disk diffusion values (using `as.rsi()`)
* Function `custom_eucast_rules()` that brings support for custom AMR rules in `eucast_rules()` * Function `custom_eucast_rules()` that brings support for custom AMR rules in `eucast_rules()`
* Function `italicise_taxonomy()` to make taxonomic names within a string italic, with support for markdown and ANSI * Function `italicise_taxonomy()` to make taxonomic names within a string italic, with support for markdown and ANSI
* Support for all four methods to determine first isolates as summarised by Hindler *et al.* (doi: [10.1086/511864](https://doi.org/10.1086/511864)): isolate-based, patient-based, episode-based and phenotype-based. The last method is now the default. * Support for all four methods to determine first isolates as summarised by Hindler *et al.* (doi: [10.1086/511864](https://doi.org/10.1086/511864)): isolate-based, patient-based, episode-based and phenotype-based. The last method is now the default.

View File

@ -61,7 +61,7 @@
#' Matthijs S. Berends \cr #' Matthijs S. Berends \cr
#' m.s.berends \[at\] umcg \[dot\] nl \cr #' m.s.berends \[at\] umcg \[dot\] nl \cr
#' University of Groningen #' University of Groningen
#' Department of Medical Microbiology and Infection Prevention #' Department of Medical Microbiology and Infection Prevention \cr
#' University Medical Center Groningen \cr #' University Medical Center Groningen \cr
#' Post Office Box 30001 \cr #' Post Office Box 30001 \cr
#' 9700 RB Groningen \cr #' 9700 RB Groningen \cr

Binary file not shown.

View File

@ -26,7 +26,6 @@
# some old R instances have trouble installing tinytest, so we ship it too # some old R instances have trouble installing tinytest, so we ship it too
install.packages("data-raw/tinytest_1.2.4.10.tar.gz") install.packages("data-raw/tinytest_1.2.4.10.tar.gz")
install.packages("data-raw/AMR_latest.tar.gz", dependencies = FALSE) install.packages("data-raw/AMR_latest.tar.gz", dependencies = FALSE)
install.packages("covr", repos = "https://cran.rstudio.com/")
pkg_suggests <- gsub("[^a-zA-Z0-9]+", "", unlist(strsplit(packageDescription("AMR", fields = "Suggests"), ", ?"))) pkg_suggests <- gsub("[^a-zA-Z0-9]+", "", unlist(strsplit(packageDescription("AMR", fields = "Suggests"), ", ?")))
cat("Packages listed in Suggests:", paste(pkg_suggests, collapse = ", "), "\n") cat("Packages listed in Suggests:", paste(pkg_suggests, collapse = ", "), "\n")

View File

@ -81,7 +81,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="https://msberends.github.io/AMR//index.html">AMR (for R)</a> <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.7.1.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9001</span>
</span> </span>
</div> </div>

View File

@ -81,7 +81,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">1.7.1.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9001</span>
</span> </span>
</div> </div>

View File

@ -39,7 +39,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">1.7.1.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9001</span>
</span> </span>
</div> </div>
@ -192,7 +192,7 @@
<div class="page-header toc-ignore"> <div class="page-header toc-ignore">
<h1 data-toc-skip>Data sets for download / own use</h1> <h1 data-toc-skip>Data sets for download / own use</h1>
<h4 class="date">04 June 2021</h4> <h4 class="date">05 June 2021</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/master/vignettes/datasets.Rmd"><code>vignettes/datasets.Rmd</code></a></small> <small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/master/vignettes/datasets.Rmd"><code>vignettes/datasets.Rmd</code></a></small>
<div class="hidden name"><code>datasets.Rmd</code></div> <div class="hidden name"><code>datasets.Rmd</code></div>

View File

@ -81,7 +81,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">1.7.1.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9001</span>
</span> </span>
</div> </div>

View File

@ -81,7 +81,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">1.7.1.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9001</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">1.7.1.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9001</span>
</span> </span>
</div> </div>

View File

@ -81,7 +81,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">1.7.1.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9001</span>
</span> </span>
</div> </div>
@ -236,12 +236,12 @@
<small>Source: <a href='https://github.com/msberends/AMR/blob/master/NEWS.md'><code>NEWS.md</code></a></small> <small>Source: <a href='https://github.com/msberends/AMR/blob/master/NEWS.md'><code>NEWS.md</code></a></small>
</div> </div>
<div id="amr-1719000" class="section level1"> <div id="amr-1719001" class="section level1">
<h1 class="page-header" data-toc-text="1.7.1.9000"> <h1 class="page-header" data-toc-text="1.7.1.9001">
<a href="#amr-1719000" class="anchor"></a><small> Unreleased </small><code>AMR</code> 1.7.1.9000</h1> <a href="#amr-1719001" class="anchor"></a><small> Unreleased </small><code>AMR</code> 1.7.1.9001</h1>
<div id="last-updated-4-june-2021" class="section level2"> <div id="last-updated-5-june-2021" class="section level2">
<h2 class="hasAnchor"> <h2 class="hasAnchor">
<a href="#last-updated-4-june-2021" class="anchor"></a><small>Last updated: 4 June 2021</small> <a href="#last-updated-5-june-2021" class="anchor"></a><small>Last updated: 5 June 2021</small>
</h2> </h2>
<div id="changed" class="section level3"> <div id="changed" class="section level3">
<h3 class="hasAnchor"> <h3 class="hasAnchor">
@ -260,7 +260,6 @@
<h3 class="hasAnchor"> <h3 class="hasAnchor">
<a href="#breaking-change" class="anchor"></a>Breaking change</h3> <a href="#breaking-change" class="anchor"></a>Breaking change</h3>
<ul> <ul>
<li><p>Support for CLSI 2020 guideline for interpreting MICs and disk diffusion values (using <code><a href="../reference/as.rsi.html">as.rsi()</a></code>)</p></li>
<li> <li>
<p>All antibiotic class selectors (such as <code><a href="../reference/antibiotic_class_selectors.html">carbapenems()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">aminoglycosides()</a></code>) can now be used for filtering as well, making all their accompanying <code>filter_*()</code> functions redundant (such as <code><a href="../reference/AMR-deprecated.html">filter_carbapenems()</a></code>, <code><a href="../reference/AMR-deprecated.html">filter_aminoglycosides()</a></code>). These functions are now deprecated and will be removed in a next release. Examples of how the selectors can be used for filtering:</p> <p>All antibiotic class selectors (such as <code><a href="../reference/antibiotic_class_selectors.html">carbapenems()</a></code>, <code><a href="../reference/antibiotic_class_selectors.html">aminoglycosides()</a></code>) can now be used for filtering as well, making all their accompanying <code>filter_*()</code> functions redundant (such as <code><a href="../reference/AMR-deprecated.html">filter_carbapenems()</a></code>, <code><a href="../reference/AMR-deprecated.html">filter_aminoglycosides()</a></code>). These functions are now deprecated and will be removed in a next release. Examples of how the selectors can be used for filtering:</p>
<div class="sourceCode" id="cb1"><pre class="downlit sourceCode r"> <div class="sourceCode" id="cb1"><pre class="downlit sourceCode r">
@ -286,6 +285,7 @@
<h3 class="hasAnchor"> <h3 class="hasAnchor">
<a href="#new" class="anchor"></a>New</h3> <a href="#new" class="anchor"></a>New</h3>
<ul> <ul>
<li>Support for CLSI 2020 guideline for interpreting MICs and disk diffusion values (using <code><a href="../reference/as.rsi.html">as.rsi()</a></code>)</li>
<li>Function <code><a href="../reference/custom_eucast_rules.html">custom_eucast_rules()</a></code> that brings support for custom AMR rules in <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code> <li>Function <code><a href="../reference/custom_eucast_rules.html">custom_eucast_rules()</a></code> that brings support for custom AMR rules in <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code>
</li> </li>
<li>Function <code><a href="../reference/italicise_taxonomy.html">italicise_taxonomy()</a></code> to make taxonomic names within a string italic, with support for markdown and ANSI</li> <li>Function <code><a href="../reference/italicise_taxonomy.html">italicise_taxonomy()</a></code> to make taxonomic names within a string italic, with support for markdown and ANSI</li>

View File

@ -12,7 +12,7 @@ articles:
datasets: datasets.html datasets: datasets.html
resistance_predict: resistance_predict.html resistance_predict: resistance_predict.html
welcome_to_AMR: welcome_to_AMR.html welcome_to_AMR: welcome_to_AMR.html
last_built: 2021-06-04T19:07Z last_built: 2021-06-05T13:10Z
urls: urls:
reference: https://msberends.github.io/AMR//reference reference: https://msberends.github.io/AMR//reference
article: https://msberends.github.io/AMR//articles article: https://msberends.github.io/AMR//articles

View File

@ -82,7 +82,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">1.7.1</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9001</span>
</span> </span>
</div> </div>
@ -286,7 +286,7 @@
<p>Matthijs S. Berends <br /> <p>Matthijs S. Berends <br />
m.s.berends [at] umcg [dot] nl <br /> m.s.berends [at] umcg [dot] nl <br />
University of Groningen University of Groningen
Department of Medical Microbiology and Infection Prevention Department of Medical Microbiology and Infection Prevention <br />
University Medical Center Groningen <br /> University Medical Center Groningen <br />
Post Office Box 30001 <br /> Post Office Box 30001 <br />
9700 RB Groningen <br /> 9700 RB Groningen <br />

View File

@ -83,7 +83,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">1.7.1.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9001</span>
</span> </span>
</div> </div>

View File

@ -82,7 +82,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">1.7.1.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9001</span>
</span> </span>
</div> </div>

View File

@ -81,7 +81,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">1.7.1.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9001</span>
</span> </span>
</div> </div>

View File

@ -81,7 +81,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">1.7.1.9000</span> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1.9001</span>
</span> </span>
</div> </div>

View File

@ -50,7 +50,7 @@ For suggestions, comments or questions, please contact us at:
Matthijs S. Berends \cr Matthijs S. Berends \cr
m.s.berends [at] umcg [dot] nl \cr m.s.berends [at] umcg [dot] nl \cr
University of Groningen University of Groningen
Department of Medical Microbiology and Infection Prevention Department of Medical Microbiology and Infection Prevention \cr
University Medical Center Groningen \cr University Medical Center Groningen \cr
Post Office Box 30001 \cr Post Office Box 30001 \cr
9700 RB Groningen \cr 9700 RB Groningen \cr