From bfca21bd3feae3c05e6f834dd2060b2127569574 Mon Sep 17 00:00:00 2001 From: "Matthijs S. Berends" Date: Fri, 21 Oct 2022 19:31:46 +0200 Subject: [PATCH] precommit update --- .github/prehooks/pre-commit | 10 ++++++---- .github/workflows/check-release.yaml | 2 ++ DESCRIPTION | 2 +- NEWS.md | 6 +++--- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/prehooks/pre-commit b/.github/prehooks/pre-commit index ddbce453..12d23293 100755 --- a/.github/prehooks/pre-commit +++ b/.github/prehooks/pre-commit @@ -59,19 +59,21 @@ echo "Updating semantic versioning and date..." git fetch origin --prune --prune-tags --quiet currenttagfull=`git describe --tags --abbrev=0` currenttag=`git describe --tags --abbrev=0 | sed 's/v//'` +# assume main branch to be 'main' or 'master', pick the right name: +defaultbranch=`git branch | cut -c 3- | grep -E '^master$|^main$'` if [ "$currenttag" = "" ]; then # there is no tag, so set tag to 0.0.1 and commit index to current count - echo "- no git tags found, create one in this format: 'v(x).(y).(z)'!" currenttag="0.0.1" - currentcommit=`git rev-list --count HEAD` + currentcommit=`git rev-list --count ${defaultbranch}` + echo "- no git tags found, create one in format 'v(x).(y).(z)' - curently ${currentcommit} previous commits in ${defaultbranch}" else # there is a tag, so base version number on that - currentcommit=`git rev-list --count ${currenttagfull}..HEAD` + currentcommit=`git rev-list --count ${currenttagfull}..${defaultbranch}` if (( "$currentcommit" == 0 )); then # tag is new, so this must become the version number currentversion="$currenttag" fi - echo "- latest tag is '${currenttagfull}', with ${currentcommit} previous commits" + echo "- latest tag is '${currenttagfull}', with ${currentcommit} previous commits in ${defaultbranch}" fi if [ "$currentversion" = "" ]; then # combine tag (e.g. 1.2.3) and commit number (like 5) increased by 9000 to indicate beta version diff --git a/.github/workflows/check-release.yaml b/.github/workflows/check-release.yaml index bb19f955..791ae362 100644 --- a/.github/workflows/check-release.yaml +++ b/.github/workflows/check-release.yaml @@ -59,6 +59,7 @@ jobs: - {os: ubuntu-22.04, r: '4.1', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"} - {os: ubuntu-22.04, r: '4.0', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"} - {os: ubuntu-22.04, r: '3.6', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"} + # R 3.5 returns a strange GC error when running examples, omit the checks for that # - {os: ubuntu-22.04, r: '3.5', allowfail: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"} - {os: ubuntu-22.04, r: '3.4', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"} - {os: ubuntu-22.04, r: '3.3', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"} @@ -154,6 +155,7 @@ jobs: - name: Upload artifacts if: always() + continue-on-error: true uses: actions/upload-artifact@v3 with: name: artifacts-${{ matrix.config.os }}-r${{ matrix.config.r }} diff --git a/DESCRIPTION b/DESCRIPTION index d2f48e5b..2eaa4bfb 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: AMR -Version: 1.8.2.9029 +Version: 1.8.2.9030 Date: 2022-10-21 Title: Antimicrobial Resistance Data Analysis Description: Functions to simplify and standardise antimicrobial resistance (AMR) diff --git a/NEWS.md b/NEWS.md index 6e1feed7..764dd0d4 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# AMR 1.8.2.9029 +# AMR 1.8.2.9030 This version will eventually become v2.0! We're happy to reach a new major milestone soon! @@ -10,7 +10,7 @@ This version will eventually become v2.0! We're happy to reach a new major miles * The `microorganisms` no longer relies on the Catalogue of Life, but now primarily on the List of Prokaryotic names with Standing in Nomenclature (LPSN) and is supplemented with the Global Biodiversity Information Facility (GBIF). The structure of this data set has changed to include separate LPSN and GBIF identifiers. Almost all previous MO codes were retained. It contains over 1,000 taxonomic names from 2022 already. * The `microorganisms.old` data set was removed, and all previously accepted names are now included in the `microorganisms` data set. A new column `status` contains `"accepted"` for currently accepted names and `"synonym"` for taxonomic synonyms; currently invalid names. All previously accepted names now have a microorganisms ID and - if available - an LPSN, GBIF and SNOMED CT identifier. * The MO matching score algorithm (`mo_matching_score()`) now counts deletions and substitutions as 2 instead of 1, which impacts the outcome of `as.mo()` and any `mo_*()` function -* Argument `combine_IR` has been removed from this package (affecting all `count_df()`, `proportion_df()` and `rsi_all()`), since it was replaced with `combine_SI` three years ago +* Argument `combine_IR` has been removed from this package (affecting functions `count_df()`, `proportion_df()`, and `rsi_df()` and some plotting functions), since it was replaced with `combine_SI` three years ago ### New * EUCAST 2022 and CLSI 2022 guidelines have been added for `as.rsi()`. EUCAST 2022 is now the new default guideline for all MIC and disks diffusion interpretations. @@ -18,6 +18,7 @@ This version will eventually become v2.0! We're happy to reach a new major miles * A new argument `keep_synonyms` allows to *not* correct for updated taxonomy, in favour of the now deleted argument `allow_uncertain` * It has increased tremendously in speed and returns generally more consequent results * Sequential coercion is now extremely fast as results are stored to the package environment, although coercion of unknown values must be run once per session. Previous results can be reset/removed with the new `mo_reset_session()` function. +* Function `rsi_confidence_interval()` to add confidence intervals in AMR calculation. This is also included in `rsi_df()` and `proportion_df()` * Function `mean_amr_distance()` to calculate the mean AMR distance. The mean AMR distance is a normalised numeric value to compare AMR test results and can help to identify similar isolates, without comparing antibiograms by hand. * Function `rsi_interpretation_history()` to view the history of previous runs of `as.rsi()`. This returns a 'logbook' with the selected guideline, reference table and specific interpretation of each row in a data set on which `as.rsi()` was run. * Function `mo_current()` to get the currently valid taxonomic name of a microorganism @@ -26,7 +27,6 @@ This version will eventually become v2.0! We're happy to reach a new major miles * All data sets in this package are now exported as `tibble`, instead of base R `data.frame`s. Older R versions are still supported. * Support for the following languages: Chinese, Greek, Japanese, Polish, Turkish and Ukrainian. We are very grateful for the valuable input by our colleagues from other countries. The `AMR` package is now available in 16 languages. The automatic language determination will give a note at start-up on systems in supported languages. * Our data sets are now also continually exported to Apache Feather and Apache Parquet formats. You can find more info [in this article on our website](https://msberends.github.io/AMR/articles/datasets.html). -* Added confidence intervals in AMR calculation. This is now included in `rsi_df()` and `proportion_df()` and manually available as `rsi_confidence_interval()` * Support for using antibiotic selectors in scoped `dplyr` verbs (with or without `vars()`), such as in: `... %>% summarise_at(aminoglycosides(), resistance)`, see `resistance()` ### Changed