mirror of
https://github.com/msberends/AMR.git
synced 2025-01-15 22:41:38 +01:00
fixes
This commit is contained in:
parent
729eff0a9d
commit
f8b21cdf72
16
.github/prehooks/pre-commit
vendored
16
.github/prehooks/pre-commit
vendored
@ -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:
|
# get tags from remote, and remove tags not on remote:
|
||||||
git fetch origin --prune --prune-tags --quiet
|
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//'`
|
currenttag=`git describe --tags --abbrev=0 | sed 's/v//'`
|
||||||
if [ "$currenttag" = "" ]; then
|
if [ "$currenttag" = "" ]; then
|
||||||
# there is no tag, so set tag to 0.0.1 and commit index to current count
|
# 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"
|
currenttag="0.0.1"
|
||||||
currentcommit=`git rev-list --count HEAD`
|
currentcommit=`git rev-list --count HEAD`
|
||||||
else
|
else
|
||||||
@ -41,18 +41,18 @@ else
|
|||||||
# tag is new, so this must become the version number
|
# tag is new, so this must become the version number
|
||||||
currentversion="$currenttag"
|
currentversion="$currenttag"
|
||||||
fi
|
fi
|
||||||
echo ">> - latest tag is '${currenttagfull}', with ${currentcommit} previous commits"
|
echo "- latest tag is '${currenttagfull}', with ${currentcommit} previous commits"
|
||||||
fi
|
fi
|
||||||
if [ "$currentversion" = "" ]; then
|
if [ "$currentversion" = "" ]; then
|
||||||
# combine tag (e.g. 1.2.3) and commit number (like 5) increased by 9000 to indicate beta version
|
# 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
|
currentversion="$currenttag.$((currentcommit + 9001))" # results in e.g. 1.2.3.9005
|
||||||
fi
|
fi
|
||||||
echo ">> - ${currentpkg} pkg version set to ${currentversion}"
|
echo "- ${currentpkg} pkg version set to ${currentversion}"
|
||||||
|
|
||||||
# set version number and date to DESCRIPTION file
|
# set version number and date to DESCRIPTION file
|
||||||
sed -i -- "s/^Version: .*/Version: ${currentversion}/" DESCRIPTION
|
sed -i -- "s/^Version: .*/Version: ${currentversion}/" DESCRIPTION
|
||||||
sed -i -- "s/^Date: .*/Date: $(date '+%Y-%m-%d')/" DESCRIPTION
|
sed -i -- "s/^Date: .*/Date: $(date '+%Y-%m-%d')/" DESCRIPTION
|
||||||
echo ">> - updated DESCRIPTION"
|
echo "- updated DESCRIPTION"
|
||||||
# remove leftover on macOS
|
# remove leftover on macOS
|
||||||
rm -f DESCRIPTION--
|
rm -f DESCRIPTION--
|
||||||
# add to commit
|
# add to commit
|
||||||
@ -64,12 +64,12 @@ if [ -e "NEWS.md" ]; then
|
|||||||
currentpkg=""
|
currentpkg=""
|
||||||
fi
|
fi
|
||||||
sed -i -- "1s/.*/# ${currentpkg} ${currentversion}/" NEWS.md
|
sed -i -- "1s/.*/# ${currentpkg} ${currentversion}/" NEWS.md
|
||||||
echo ">> - updated NEWS.md"
|
echo "- updated NEWS.md"
|
||||||
# remove leftover on macOS
|
# remove leftover on macOS
|
||||||
rm -f NEWS.md--
|
rm -f NEWS.md--
|
||||||
# add to commit
|
# add to commit
|
||||||
git add NEWS.md
|
git add NEWS.md
|
||||||
else
|
else
|
||||||
echo ">> - no NEWS.md found!"
|
echo "- no NEWS.md found!"
|
||||||
fi
|
fi
|
||||||
echo ">> "
|
echo ""
|
||||||
|
2
.github/workflows/check-pr.yaml
vendored
2
.github/workflows/check-pr.yaml
vendored
@ -33,7 +33,7 @@ name: R-code-check-PR
|
|||||||
jobs:
|
jobs:
|
||||||
R-code-check-PR:
|
R-code-check-PR:
|
||||||
# do not run if we are the authors - the other checks will already run
|
# 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 }}
|
runs-on: ${{ matrix.config.os }}
|
||||||
|
|
||||||
|
10
.github/workflows/check.yaml
vendored
10
.github/workflows/check.yaml
vendored
@ -159,15 +159,7 @@ jobs:
|
|||||||
echo "---"
|
echo "---"
|
||||||
ls ${GITHUB_WORKSPACE}
|
ls ${GITHUB_WORKSPACE}
|
||||||
echo "---"
|
echo "---"
|
||||||
ls ../${GITHUB_WORKSPACE}
|
ls ${GITHUB_WORKSPACE}.Rcheck
|
||||||
echo "---"
|
|
||||||
ls ../${GITHUB_WORKSPACE}/AMR
|
|
||||||
echo "---"
|
|
||||||
ls ../${GITHUB_WORKSPACE}/AMR.Rcheck
|
|
||||||
echo "---"
|
|
||||||
ls ${GITHUB_WORKSPACE}/AMR
|
|
||||||
echo "---"
|
|
||||||
ls ${GITHUB_WORKSPACE}/AMR.Rcheck
|
|
||||||
|
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
if: always()
|
if: always()
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
Package: AMR
|
Package: AMR
|
||||||
Version: 1.8.1.9063
|
Version: 1.8.1.9064
|
||||||
Date: 2022-09-23
|
Date: 2022-09-23
|
||||||
Title: Antimicrobial Resistance Data Analysis
|
Title: Antimicrobial Resistance Data Analysis
|
||||||
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
||||||
|
2
NEWS.md
2
NEWS.md
@ -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!
|
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.
@ -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.
@ -103,9 +103,13 @@ expect_identical(
|
|||||||
mo_species("Escherichia coli")
|
mo_species("Escherichia coli")
|
||||||
)
|
)
|
||||||
expect_identical(
|
expect_identical(
|
||||||
mo_property("Escherichia coli", property = "species_id"),
|
mo_property("Escherichia coli", property = "lpsn"),
|
||||||
mo_lpsn("Escherichia coli")
|
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("Chlamydia psittaci"), "Garcia-Lopez et al., 2019")
|
||||||
expect_identical(mo_ref("Chlamydophila psittaci", keep_synonyms = TRUE), "Everett et al., 1999")
|
expect_identical(mo_ref("Chlamydophila psittaci", keep_synonyms = TRUE), "Everett et al., 1999")
|
||||||
|
@ -36,7 +36,10 @@ if (identical(Sys.getenv("R_RUN_TINYTEST"), "true")) {
|
|||||||
library(AMR)
|
library(AMR)
|
||||||
# set language
|
# set language
|
||||||
set_AMR_locale("English")
|
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") {
|
if (getRversion() < "3.3.0") {
|
||||||
trimws <- AMR:::trimws
|
trimws <- AMR:::trimws
|
||||||
strrep <- AMR:::strrep
|
strrep <- AMR:::strrep
|
||||||
|
Loading…
Reference in New Issue
Block a user