This commit is contained in:
dr. M.S. (Matthijs) Berends 2022-09-23 15:18:55 +02:00
parent 729eff0a9d
commit f8b21cdf72
16 changed files with 22 additions and 23 deletions

View File

@ -23,7 +23,7 @@ echo ""
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo ">> Updating semantic versioning and date..."
echo "Updating semantic versioning and date..."
# get tags from remote, and remove tags not on remote:
git fetch origin --prune --prune-tags --quiet
@ -31,7 +31,7 @@ currenttagfull=`git describe --tags --abbrev=0`
currenttag=`git describe --tags --abbrev=0 | sed 's/v//'`
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)'!"
echo "- no git tags found, create one in this format: 'v(x).(y).(z)'!"
currenttag="0.0.1"
currentcommit=`git rev-list --count HEAD`
else
@ -41,18 +41,18 @@ else
# 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"
fi
if [ "$currentversion" = "" ]; then
# combine tag (e.g. 1.2.3) and commit number (like 5) increased by 9000 to indicate beta version
currentversion="$currenttag.$((currentcommit + 9001))" # results in e.g. 1.2.3.9005
fi
echo ">> - ${currentpkg} pkg version set to ${currentversion}"
echo "- ${currentpkg} pkg version set to ${currentversion}"
# set version number and date to DESCRIPTION file
sed -i -- "s/^Version: .*/Version: ${currentversion}/" DESCRIPTION
sed -i -- "s/^Date: .*/Date: $(date '+%Y-%m-%d')/" DESCRIPTION
echo ">> - updated DESCRIPTION"
echo "- updated DESCRIPTION"
# remove leftover on macOS
rm -f DESCRIPTION--
# add to commit
@ -64,12 +64,12 @@ if [ -e "NEWS.md" ]; then
currentpkg=""
fi
sed -i -- "1s/.*/# ${currentpkg} ${currentversion}/" NEWS.md
echo ">> - updated NEWS.md"
echo "- updated NEWS.md"
# remove leftover on macOS
rm -f NEWS.md--
# add to commit
git add NEWS.md
else
echo ">> - no NEWS.md found!"
echo "- no NEWS.md found!"
fi
echo ">> "
echo ""

View File

@ -33,7 +33,7 @@ name: R-code-check-PR
jobs:
R-code-check-PR:
# do not run if we are the authors - the other checks will already run
if: ${{ github.event.comment.author_association != 'MEMBER' && github.event.comment.author_association != 'OWNER' }}
if: ${{ github.event.comment.author_association }} != 'MEMBER' && ${{ github.event.comment.author_association }} != 'OWNER'
runs-on: ${{ matrix.config.os }}

View File

@ -159,15 +159,7 @@ jobs:
echo "---"
ls ${GITHUB_WORKSPACE}
echo "---"
ls ../${GITHUB_WORKSPACE}
echo "---"
ls ../${GITHUB_WORKSPACE}/AMR
echo "---"
ls ../${GITHUB_WORKSPACE}/AMR.Rcheck
echo "---"
ls ${GITHUB_WORKSPACE}/AMR
echo "---"
ls ${GITHUB_WORKSPACE}/AMR.Rcheck
ls ${GITHUB_WORKSPACE}.Rcheck
- name: Upload artifacts
if: always()

View File

@ -1,5 +1,5 @@
Package: AMR
Version: 1.8.1.9063
Version: 1.8.1.9064
Date: 2022-09-23
Title: Antimicrobial Resistance Data Analysis
Description: Functions to simplify and standardise antimicrobial resistance (AMR)

View File

@ -1,4 +1,4 @@
# AMR 1.8.1.9063
# AMR 1.8.1.9064
This version will eventually become v2.0! We're happy to reach a new major milestone soon!

Binary file not shown.

Binary file not shown.

View File

@ -1 +1 @@
004b36b27ef78bc03cd12cca3794126e
5ac1152c166d5d4f5763547d948fce79

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -103,9 +103,13 @@ expect_identical(
mo_species("Escherichia coli")
)
expect_identical(
mo_property("Escherichia coli", property = "species_id"),
mo_property("Escherichia coli", property = "lpsn"),
mo_lpsn("Escherichia coli")
)
expect_identical(
mo_property("Escherichia coli", property = "gbif"),
mo_gbif("Escherichia coli")
)
expect_identical(mo_ref("Chlamydia psittaci"), "Garcia-Lopez et al., 2019")
expect_identical(mo_ref("Chlamydophila psittaci", keep_synonyms = TRUE), "Everett et al., 1999")

View File

@ -36,7 +36,10 @@ if (identical(Sys.getenv("R_RUN_TINYTEST"), "true")) {
library(AMR)
# set language
set_AMR_locale("English")
# get trimws() and strrep() if on old R
# get dir.exists(), trimws() and strrep() if on old R
if (getRversion() < "3.2.0") {
dir.exists <- AMR:::dir.exists
}
if (getRversion() < "3.3.0") {
trimws <- AMR:::trimws
strrep <- AMR:::strrep