Skip to content

Commit

Permalink
Version 1.0.0 (#227)
Browse files Browse the repository at this point in the history
First major release of APCalign. A preprint is available at
https://www.biorxiv.org/content/10.1101/2024.02.02.578715v1.
Article has been accepted for publication at Australian Journal of Botany.

Following review, a number of changes have been implemented. These have sped &
streamlined the package.

* Update function documentation
* Speed up `extract_genus`
* Write a replacement function for `stringr::word` that is much faster.
* Additional speed up and accuracy of `fuzzy_match` function by
  - Restricting reference list to names with the same first letter as input string.
  - Switch from using `utils::adist` to `stringdist:stringdist(method = "dl")`
* Rework `standardise_names` to remove punctuation from the start of the string
* Rework `strip_names_extra` (previously `strip_names_2`) to just perform
additional functions to `strip_names`, rather than repeating those performed by `strip_names`.
* Avoid importing entire packages by using package::function format throughout
and removing functions from @import
* Add fuzzy match arguments to `create_taxonomic_update_lookup`
* Add 3 additional family-level APC matches to `match_taxa`.
* Refine tests
* Make messages to console optional
* Fix issue with fails when github is down (#205)

---------

Co-authored-by: Elizabeth Wenk <ehwenk@gmail.com>
Co-authored-by: Fonti Kar <f.kar@unsw.edu.au>
Co-authored-by: Daniel Falster <daniel.falster@unsw.edu.au>
Co-authored-by: Will Cornwell <w.cornwell@unsw.edu.au>
  • Loading branch information
4 people committed May 6, 2024
2 parents 1cfcf37 + 809b11c commit 731e197
Show file tree
Hide file tree
Showing 57 changed files with 2,617 additions and 1,103 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
branches: [main, master, develop]
pull_request:
branches: [main, master, develop]

Expand All @@ -18,17 +18,16 @@ jobs:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

Expand All @@ -45,4 +44,5 @@ jobs:

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
2 changes: 1 addition & 1 deletion .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

Expand Down
27 changes: 23 additions & 4 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
branches: [main, master, develop]
pull_request:
branches: [main, master]
branches: [main, master, develop]

name: test-coverage

Expand All @@ -15,7 +15,7 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
Expand All @@ -27,5 +27,24 @@ jobs:
needs: coverage

- name: Test coverage
run: covr::codecov(quiet = FALSE)
run: |
covr::codecov(
quiet = FALSE,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
shell: Rscript {0}

- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
8 changes: 3 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: APCalign
Title: Resolving Plant Taxon Names Using the Australian Plant Census
Version: 0.1.4
Version: 1.0.0
Authors@R: c(
person(given = "Daniel", family = "Falster", role = c("aut", "cre", "cph"), email = "daniel.falster@unsw.edu.au", comment = c(ORCID = "0000-0002-9814-092X")),
person(given = "Elizabeth", family = "Wenk", role = c("aut", "ctb"), email = "e.wenk@unsw.edu.au", comment = c(ORCID = "0000-0001-5640-5910")),
Expand All @@ -18,11 +18,10 @@ Depends:
Imports:
readr,
purrr,
forcats,
tibble,
dplyr,
stringr,
stringi,
stringdist,
crayon,
httr,
jsonlite,
Expand All @@ -38,9 +37,8 @@ Suggests:
kableExtra,
here,
testthat (>= 3.0.0)
Remotes: apache/arrow/r
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
Config/testthat/edition: 3
VignetteBuilder: knitr
URL: https://traitecoevo.github.io/APCalign/, https://github.com/traitecoevo/APCalign
Expand Down
18 changes: 4 additions & 14 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,13 @@
export(align_taxa)
export(create_species_state_origin_matrix)
export(create_taxonomic_update_lookup)
export(default_version)
export(load_taxonomic_resources)
export(native_anywhere_in_australia)
export(standardise_names)
export(standardise_taxon_rank)
export(state_diversity_counts)
export(strip_names)
export(strip_names_2)
export(strip_names_extra)
export(update_taxonomy)
import(dplyr)
import(stringr)
importFrom(crayon,red)
importFrom(dplyr,arrange)
importFrom(dplyr,distinct)
importFrom(dplyr,filter)
importFrom(dplyr,mutate)
importFrom(dplyr,select)
importFrom(readr,col_character)
importFrom(readr,col_logical)
importFrom(readr,cols)
importFrom(readr,read_csv)
importFrom(tibble,tibble)
importFrom(dplyr,"%>%")
34 changes: 31 additions & 3 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,37 @@
# APCalign 0.1.4
# APCalign 1.0.0

First major release of APCalign. A preprint is available at
https://www.biorxiv.org/content/10.1101/2024.02.02.578715v1.
Article has been accepted for publication at Australian journal of Botany.

* Better handling of errors when API/network connection is down for `load_taxonomic_resources`
Following review, a number of changes have been implemented. These have sped &
streamlined the package.

* Refined testing for `load_taxonomic_resources`
* Update function documentation
* Speed up `extract_genus`
* Write a replacement function for `stringr::word` that is much faster.
* Additional speed up and accuracy of fuzzy_match function by
- Restricting reference list to names with the same first letter as input string.
- Switch from using `utils::adist` to `stringdist:stringdist(method = "dl")`
* Rework `standardise_names` to remove punctuation from the start of the string
* Rework `strip_names_extra` (previously `strip_names_2`) to just perform
additional functions to `strip_names`, rather than repeating those performed by `strip_names`.
* Avoid importing entire packages by using package::function format throughout
and removing functions from @import
* Add fuzzy match arguments to `create_taxonomic_update_lookup`
* Add 3 additional family-level APC matches to `match_taxa`.
* Refine tests
* Make messages to console optional
* Fix issue with fails when github is down (https://github.com/traitecoevo/APCalign/issues/205)

# APCalign 0.1.5


* Update installation instructions
* Added how to cite and version APCalign as an article
* Exported `default_version`
* Add citing method for R package
* Update GitHub Actions
* Improved family alignments
* Added `standardise_taxon_rank`
* Improved messaging during alignment
8 changes: 7 additions & 1 deletion R/APCalign-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
#' @name APCalign
#' @docType package
#' @references If you have any questions, comments or suggestions, please
#' submit an issue at our [GitHub repository](https://github.com/traitecoevo/APCalign/issues)
#' submit an issue at our
#' [GitHub repository](https://github.com/traitecoevo/APCalign/issues)
#' @keywords internal
#' @section Functions:
#' **Standarise taxon names**
Expand Down Expand Up @@ -51,9 +52,12 @@ utils::globalVariables(
"checked",
"cleaned_name",
"family",
"family_accepted",
"fuzzy_match_genus",
"fuzzy_match_genus_APNI",
"fuzzy_match_genus_synonym",
"fuzzy_match_family",
"fuzzy_match_family_synonym",
"genus",
"genus_accepted",
"known",
Expand All @@ -75,6 +79,8 @@ utils::globalVariables(
"taxon_ID",
"taxon_ID_aligned",
"taxon_rank",
"txtProgressBar",
"setTxtProgressBar",
"taxonomic_status",
"taxonomic_status_aligned",
"taxonomic_status_genus",
Expand Down
Loading

0 comments on commit 731e197

Please sign in to comment.