Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for switching from publish_update to dataone::uploadDataPackage #187

Open
laijasmine opened this issue May 11, 2021 · 0 comments
Open

Comments

@laijasmine
Copy link
Collaborator

We may want to keep some or all of this functionality of publish_update when we switch over to using dataone::uploadDataPackage. We should consider the following:

  1. consider having a function to easily create file names based on the title like arcticdatauitls::reformat_file_name to make sure we have meaningful file names as noted in issue 248 in arctic-data
  2. edits the distribution, system and packageId for the user:

arcticdatautils/R/editing.R

Lines 445 to 474 in eb633eb

# Update the metadata
# Replace packageId
doc$packageId <- metadata_updated_pid
# Add landing page
if (use_doi == T){
doc$dataset$distribution$offline <- NULL
doc$dataset$distribution$online$url <- paste0("http://doi.org/", metadata_updated_pid)
}
else if (use_doi == F & mn@identifier == "urn:node:ARCTIC"){
doc$dataset$distribution$offline <- NULL
doc$dataset$distribution$online$url <- list(url = paste0("http://arcticdata.io/catalog/view/", metadata_updated_pid),
`function` = "information")
}
else if (use_doi == F & mn@identifier == "urn:node:KNB"){
doc$dataset$distribution$offline <- NULL
doc$dataset$distribution$online$url <- list(url = paste0("http://knb.ecoinformatics.org/view/", metadata_updated_pid),
`function` = "information")
}
else if (use_doi == F & mn@identifier == "urn:node:mnTestARCTIC"){
doc$dataset$distribution$offline <- NULL
doc$dataset$distribution$online$url <- list(url = paste0("http://test.arcticdata.io/view/", metadata_updated_pid),
`function` = "information")
}
# Replace system
doc$system <- get_system_uri(doc$packageId)

  1. look into if the above can be generalized to the dataone package instead
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant