diff --git a/.github/prehooks/pre-commit b/.github/prehooks/pre-commit index d31c54b43..a425076f7 100755 --- a/.github/prehooks/pre-commit +++ b/.github/prehooks/pre-commit @@ -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 "" diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml index f91b8bca9..2299ac1e8 100644 --- a/.github/workflows/check-pr.yaml +++ b/.github/workflows/check-pr.yaml @@ -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 }} diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index c9cf4b5cc..0d9fcb586 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -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() diff --git a/DESCRIPTION b/DESCRIPTION index 84d47ee6c..9d70bf382 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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) diff --git a/NEWS.md b/NEWS.md index 5b60a01cf..fcd4ab27e 100755 --- a/NEWS.md +++ b/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! diff --git a/data-raw/microorganisms.dta b/data-raw/microorganisms.dta index cd4c76c70..66b99c62d 100644 Binary files a/data-raw/microorganisms.dta and b/data-raw/microorganisms.dta differ diff --git a/data-raw/microorganisms.feather b/data-raw/microorganisms.feather index 81275fd74..31d3eadf0 100644 Binary files a/data-raw/microorganisms.feather and b/data-raw/microorganisms.feather differ diff --git a/data-raw/microorganisms.md5 b/data-raw/microorganisms.md5 index 203fbe5b6..09e4889d0 100644 --- a/data-raw/microorganisms.md5 +++ b/data-raw/microorganisms.md5 @@ -1 +1 @@ -004b36b27ef78bc03cd12cca3794126e +5ac1152c166d5d4f5763547d948fce79 diff --git a/data-raw/microorganisms.parquet b/data-raw/microorganisms.parquet index 841a8a769..091829c35 100644 Binary files a/data-raw/microorganisms.parquet and b/data-raw/microorganisms.parquet differ diff --git a/data-raw/microorganisms.rds b/data-raw/microorganisms.rds index 42cdf0906..adf66b4af 100644 Binary files a/data-raw/microorganisms.rds and b/data-raw/microorganisms.rds differ diff --git a/data-raw/microorganisms.sas b/data-raw/microorganisms.sas index 35ac9c7bc..6ba3fcd97 100644 Binary files a/data-raw/microorganisms.sas and b/data-raw/microorganisms.sas differ diff --git a/data-raw/microorganisms.sav b/data-raw/microorganisms.sav index f22a90ceb..1d0d9e2a1 100644 Binary files a/data-raw/microorganisms.sav and b/data-raw/microorganisms.sav differ diff --git a/data-raw/microorganisms.xlsx b/data-raw/microorganisms.xlsx index a5a528e44..4320adf5b 100644 Binary files a/data-raw/microorganisms.xlsx and b/data-raw/microorganisms.xlsx differ diff --git a/data/microorganisms.rda b/data/microorganisms.rda index 35b21591f..3d01763a8 100644 Binary files a/data/microorganisms.rda and b/data/microorganisms.rda differ diff --git a/inst/tinytest/test-mo_property.R b/inst/tinytest/test-mo_property.R index a337dc8a1..b51187331 100644 --- a/inst/tinytest/test-mo_property.R +++ b/inst/tinytest/test-mo_property.R @@ -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") diff --git a/tests/tinytest.R b/tests/tinytest.R index 291912bfb..c425a9461 100644 --- a/tests/tinytest.R +++ b/tests/tinytest.R @@ -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