Skip to content

Commit

Permalink
Release version 4.0.0 (#653)
Browse files Browse the repository at this point in the history
Includes:

* Established code as a standalone package
* Align variables (column names) with Darwin Core, Dublin Core, and the Ecological Trait-data Standard
* Allowing more metadata to be associated with individual trait measurements instead of traits or the dataset (e.g. life stage, replicates, entity type)
* Rework context, so that multiple context properties can be read in
* Reworked identifiers, including 5 separate context property identifiers and location id
* Add source_id, such that individual rows of data can be attributed to a specific source
* Merge different date fields into `collection_date`
* Work from two separate vocabulary workshops merged in (`Seed Traits` & `Whole Plant and Leaf Vegetative Traits`). Also some work realigning traits related to fire response.
* Rename other traits to have more consistent naming 
* Added entity_type, reflecting the entity being measured
* Added scraped data from online floras for 7 traits related to plant growth form. For `plant_growth_form` and `woodiness` manually gap-filled from the taxonomic literature to have complete data coverage
* Reworked how taxonomic names are processed, such that submitted taxon names are now aligning to the most specific taxon name possible, with separate columns for `family`; `genus`; `binomial`; `trinomial`, filled in as appropriate.
* New taxonomic updates added, based on updated algorithms that do a much better job of capturing phrase names and submitted taxon names that include notes. In addition, algorithms automatically identify names that can only be aligned to genus.
* Removed taxon matching code from austraits.build (to become part of a separate package)
* Add database metadata into the build process
  • Loading branch information
dfalster authored Nov 27, 2022
1 parent 08b89e5 commit 442206a
Show file tree
Hide file tree
Showing 678 changed files with 306,739 additions and 122,884 deletions.
19 changes: 16 additions & 3 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
^\.github$
^\.rstudio$
^\.remake$
^.*\.remake$
^remake.yml$
^_targets$
^\.local$
^\.cache$
^\.config$
^README\.Rmd$
^data$
^docs$
Expand All @@ -9,7 +14,15 @@
^todo$
^export$
^config$
^.rstudio$
^remake.yml$
^.*ignore$
^docs$
^.*\.Rproj$
^\.Rproj\.user$
Dockerfile$
_pkgdown.yml$
^codecov\.yml$
^.*code-.*$
^tmp.*$
^tests/build$
^doc$
^Meta$
44 changes: 34 additions & 10 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
# https://github.com/r-lib/actions/tree/v2-branch/check-r-package

on:
push:
branches: [main, master, develop]

pull_request:
branches: [main, master, develop]

Expand All @@ -28,23 +30,24 @@ jobs:
steps:
- uses: actions/checkout@v2

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

- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v1
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: rcmdcheck
extra-packages: local::., any::rcmdcheck, any::covr
needs: check

- name: Run tests
run: testthat::test_dir("tests/testthat")
shell: Rscript {0}

- uses: r-lib/actions/check-r-package@v1
- uses: r-lib/actions/check-r-package@v2
with:
args: 'c("--no-manual", "--as-cran")'
error-on: '"error"'
check-dir: '"check"'

- name: Show testthat output
if: always()
Expand All @@ -57,3 +60,24 @@ jobs:
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check

- name: Test build infrastructure
run: |
library(austraits.build)
source("scripts/custom.R")
testthat::test_dir("tests/build/")
shell: Rscript {0}

- name: Benchmark
run: |
library(austraits.build)
source("scripts/custom.R")
source("scripts/benchmark.R")
run_benchmark()
shell: Rscript {0}

- name: Test coverage
run: |
library(austraits.build)
covr::codecov(quiet=FALSE, type = "all")
shell: Rscript {0}
52 changes: 0 additions & 52 deletions .github/workflows/benchmarks.yml

This file was deleted.

41 changes: 15 additions & 26 deletions .github/workflows/check-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,36 +22,25 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@master

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

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}
- uses: r-lib/actions/setup-r@v2

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

- name: Restore R package cache
uses: actions/cache@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- uses: r-lib/actions/setup-r-dependencies@v1
extra-packages: local::.

- name: Test build infrastructure
run: testthat::test_dir("tests/build/")
- name: check sources
run: |
library(austraits.build)
source("scripts/custom.R")
dataset_test(dir("data"))
shell: Rscript {0}

- name: build austraits
run: remake::make()
run: |
library(austraits.build)
source("scripts/custom.R")
remake::make()
shell: Rscript {0}

- name: Archive artifacts
uses: actions/upload-artifact@v2
with:
name: austraits
path: export/data/curr/austraits.rds

6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ temp
*.zip
*.rds
*.rda
man/*
.RData
.Rhistory
.cache/
.local/
.config/
*.Rproj
tmp*
reports
Expand All @@ -27,3 +29,5 @@ doc
Meta
config/APC/*
config/NSL/*
/doc/
/Meta/
81 changes: 34 additions & 47 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,76 +1,63 @@
Type: Compendium
Type: Package
Package: austraits.build
Title: Raw data and code used to build the AusTraits compilation
Version: 3.0.2
Title: Package used to build an AusTraits data resource
Version: 0.9.0
Maintainer: Daniel Falster <[email protected]>
Authors@R: c(
person(given = "Daniel", family = "Falster", role = c("cre", "aut"), email = "[email protected]", comment = c(ORCID = "0000-0002-9814-092X")),
person(given = "Elizabeth", family = "Wenk", role = c("cur", "aut"), comment = c(ORCID = "0000-0001-5640-5910")),
person(given = "Rachael", family = "Gallagher", role = c("aut", "cur"), comment = c(ORCID = "0000-0002-4680-8115")),
person(given = "Elizabeth", family = "Wenk", role = c("cur", "aut")),
person(given = "Ian", family = "Wright", role = c("aut")),
person(given = "Sam", family = "Andrew", role = c("aut")),
person(given = "Gary", family = "Truong", role = c("ctb")),
person(given = "Caitlin", family = "Baxter", role = c("aut")),
person(given = "Stuart", family = "Allen", role = c("ctb")),
person(given = "James", family = "Lawson", role = c("ctb")),
person("ARDC", role = c("fnd")),
person("ARC", role = c("fnd"))
)
Description: AusTraits is an open-source platform for
ongoing compilation and distribution of data on the traits of Australian
plant species. Data have been assembled from diverse sources, describing
more than 300 plant traits and over 25k taxa. This repository contains all
the information needed to build the resource from different sources, i.e.
harmonise the different datasets into a common structure,
with common variable names, units and structure. Also included are the functions
we use to help with adding new studies. For mroe information on the project
https://austraits.org
Description: This package enbales harmonising of data from diverse sources. The code was originally built to support AusTraits, an open-source compilation of data on the traits of Australian plant species. For more information on AusTraits go to https://austraits.org.
BugReports: https://github.com/traitecoevo/austraits.build/issues
URL: http://traitecoevo.github.io/austraits.build/
License: BSD2 + file LICENSE
Depends:
R (>= 3.6.1),
License: BSD_2_clause + file LICENCE
Depends:
R (>= 3.6.0),
base,
stringr,
tidyr,
dplyr,
readr,
purrr,
lubridate,
testthat
readr,
stringr,
tidyr
Imports:
magrittr,
crayon,
RefManageR,
rmarkdown,
knitr,
remake,
desc,
git2r,
yaml,
storr,
kableExtra,
rprojroot,
forcats,
ggplot2,
ggbeeswarm,
gridExtra,
leaflet,
scales,
testthat
magrittr,
purrr,
RefManageR,
remake,
rlang,
rmarkdown,
stringi,
styler,
testthat,
tibble,
whisker,
yaml
Suggests:
austraits,
leaflet,
ggbeeswarm,
bibtex,
knitr,
bench,
devtools,
pkgdown,
whisker,
markdown,
googledrive,
rprojroot,
pkgdown,
rcrossref,
zip,
bench
covr
Remotes:
traitecoevo/austraits@develop,
richfitz/remake
Encoding: UTF-8
LazyData: true
VignetteBuilder: knitr
RoxygenNote: 7.1.1
RoxygenNote: 7.2.1
Config/testthat/edition: 3
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rocker/verse:3.6.1
FROM rocker/verse:4.1.2
LABEL maintainer="Daniel Falster"
LABEL email="[email protected]"

Expand Down Expand Up @@ -38,7 +38,7 @@ COPY ./DESCRIPTION ${HOME}

RUN chown -R ${NB_USER} ${HOME}

RUN R --quiet -e "options(repos = list(CRAN = 'http://mran.revolutionanalytics.com/snapshot/2020-01-01/')); devtools::install_deps(upgrade = 'never')"
RUN R --quiet -e "options(repos = list(CRAN = 'http://mran.revolutionanalytics.com/snapshot/2022-05-01/')); devtools::install_deps(upgrade = 'never')"

RUN echo "options(remake.verbose.noop=FALSE)" >> /usr/local/lib/R/etc/Rprofile.site

Loading

0 comments on commit 442206a

Please sign in to comment.