Skip to content

Develop script to update metadata locally #4

@theamarks

Description

@theamarks

Descripton

Current workflow for submitting data and metatdata to KNB is a hacky hybrid approach. We created the data package via website GUI and then pull down the package locally to change public viewing options. Moving forward we would like to provided more detailed and compressive information via scripts about the 2 KNB dataset we now maintain (doi:10.5063/F1CZ35N7 & doi:10.5063/F1862DXT). This would include:

  • build EML locally
  • link existing knb_submit.R script to use locally build EML file to update datapackage
  • document object provenance
  • Provide unzipped files for further transparency and building provenance - .parquet probably
  • Transfer data in a more efficient way (not sure on the categories laid out here)

Considerations

  • Where do we want this EML build script to live? Do we include metadata generation in the artis-model pipeline? Would make sense if we are working towards automating more and more of the pipeline.
  • Can we feed the EML build script model configuration values from 00-* scripts? These might eventually be in a configuration YAML, can we use that in conjunction with the EML script to avoid duplicating definitions? Possibly like this:
# Load configuration from YAML file
config <- yaml::read_yaml("config.yaml")

# Set project directory and metadata file destination
project_dir <- config$paths$project_dir
output_dir <- file.path(project_dir, "metadata")
dir.create(output_dir, showWarnings = FALSE, recursive = TRUE)

# Extract metadata information from config
artis_version <- config$artis_version
prod_data_type <- config$prod_data_type
estimate_data_type <- config$estimate_data_type

# Define basic metadata information
title <- glue::glue("ARTIS {artis_version}: Aquatic Resource Trade in Species Model Data")

# Create a person object for the creator - you could have these in the config too
creator <- eml_person(
  givenName = config$metadata$creator$given_name,
  surName = config$metadata$creator$surname,
  email = config$metadata$creator$email,
  organizationName = config$metadata$creator$organization,
  userId = list(directory = "https://orcid.org", userId = config$metadata$creator$orcid)
)

Resources

Metadata

Metadata

Assignees

Labels

📖 documentationImprovements or additions to documentation🏛️ Organizefile, folder, directory, architecture🪄 enhancementNew functionality or feature request

Projects

Status

🏷 Ready

Relationships

None yet

Development

No branches or pull requests

Issue actions