Skip to content

Commit

Permalink
Add contributors into build
Browse files Browse the repository at this point in the history
  • Loading branch information
dfalster committed Dec 18, 2019
1 parent fe3698e commit 91725e8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
11 changes: 10 additions & 1 deletion R/steps.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,15 @@ load_study <- function(filename_data_raw,
}
sites <- add_all_columns(sites, definitions, "sites")

# record methods on study from metadata
# record contributors
contributors <-
metadata$people %>%
list_to_df() %>%
mutate(dataset_id = dataset_id) %>%
select(dataset_id = dataset_id, everything()) %>%
filter(!is.na(name))

# record methods on study from metadata
source_primary <- convert_list_to_bib(metadata$source$primary)
source_secondary <- convert_list_to_bib(metadata$source$secondary)

Expand Down Expand Up @@ -97,6 +104,7 @@ load_study <- function(filename_data_raw,
excluded_data = traits %>% filter(!is.na(error)) %>% select(error, everything()),
taxonomy = taxonomy,
definitions = definitions,
contributors = contributors,
sources = c(source_primary, source_secondary)
)
}
Expand Down Expand Up @@ -551,6 +559,7 @@ combine_austraits <- function(..., d=list(...), definitions) {
excluded_data = combine("excluded_data", d),
taxonomy=taxonomy,
definitions = definitions,
contributors=combine("contributors", d),
sources = sources,
build_info = list(
version=definitions$austraits$elements$version$value,
Expand Down
8 changes: 8 additions & 0 deletions config/definitions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2167,6 +2167,14 @@ austraits:
sources:
description: Bibtex entries for all primary and secondary sources in the compilation
type: list
contributors:
description: A list of people contributing to each study.
type: table
elements:
dataset_id: *dataset_id
name: Name of contributor
institution: Last known institution or affiliation
role: Their role in the study
build_info:
description: Description of the computing environment used to create this version of the dataset, including version number, git commit and R session_info
type: list
Expand Down

0 comments on commit 91725e8

Please sign in to comment.