NCEAS / datateam-training

Training and reference materials for ADC and SASAP data team members
https://nceas.github.io/datateam-training/training/
Apache License 2.0
7 stars 22 forks source link

Convert trainings to use datapack and dataone #237

Closed laijasmine closed 3 years ago

laijasmine commented 3 years ago

Convert the datateam workflow to use datapack and dataone

Essential usage changes

Other


packageId <- "resource_map_urn:uuid:14908960-856a-4511-b4a0-8b596a31a3b8"
dp <- getDataPackage(d1c, identifier=packageId, lazyLoad=TRUE, quiet=FALSE)

#remove the zip files
zipId <- selectMember(dp, name="sysmeta@formatId", value="application/vnd.shp+zip")
removeMember(dp, zipId, removeRelationships = T)
metadataId <- selectMember(dp, name="sysmeta@formatId", value="https://eml.ecoinformatics.org/eml-2.2.0")

#add an existing data object
dataObj <- getDataObject(d1c, id="urn:uuid:48d36037-5fbb-4191-951e-4035f8f07cd1", lazyLoad=T, limit="1TB")
dp <- addMember(dp, dataObj, mo=metadataId)
myAccessRules <- data.frame(subject="http://orcid.org/0000-0001-8888-547X", permission="changePermission") 
packageId <- uploadDataPackage(d1c, dp, public=TRUE, accessRules=myAccessRules, quiet=FALSE)
laijasmine commented 3 years ago

To do before the datapack dataone workflow can be fully implemented:

laijasmine commented 3 years ago
laijasmine commented 3 years ago
laijasmine commented 3 years ago

update sections that have the node argument (mainly in arcticdatautils and dataone functions)

d1c@mn is equivalent to using adc; for example:

doc <- read_eml(getObject(d1c@mn, metadataId))
laijasmine commented 3 years ago

For the workflow to be used in the trainings

laijasmine commented 3 years ago
laijasmine commented 3 years ago

make sure datafiles are public after publishing the dataset? seems to not happen in some cases... need to investigate further. Seems to be related to uploading data files through R first.