-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Update dataone tales #114
Update dataone tales #114
Conversation
43fd56a
to
4d91032
Compare
4d91032
to
6d987f5
Compare
Codecov Report
@@ Coverage Diff @@
## master #114 +/- ##
==========================================
- Coverage 62.51% 61.25% -1.26%
==========================================
Files 9 9
Lines 1163 1226 +63
==========================================
+ Hits 727 751 +24
- Misses 436 475 +39
Continue to review full report at Codecov.
|
6d987f5
to
082fa86
Compare
During step 11 I got:
|
I fix that ^^, but I think it also suggest that it didn't work as expected, since I can't find any 'datacite' in resource_map. FTR these are my packages I've published in order:
NOTE: I didn't make a Tale public and log in as a different account. Instead I called POST /tale/:id/copy using swagger directly. Source for my tale can be found here: https://sandbox.zenodo.org/record/509115. It requires |
Thanks for that fix. I added a commit that aliases 'datacite' all the time in the namespace. In the case of the packages above the relations are in there but namespaced as |
Fixes issue #107. This is a rewrite of a much uglier PR (#111 ). This PR does not include the refactored unit tests, but does give a little more clarity into the Tale updating changes.
The first two commits just pull things into a few classes to make things easier down the road. The next few fix up a few pep issues. The last commit fixed this issue where one except statement was swallowing an exception from a nested try/catch. I flattened the try/catch blocks and things seem to be working fine.
Reviewer Note
#115 should be merged after this PR is merged.
Updating
A Tale is 'updated' when it's published a second time. If a Tale is published to DataONE, and then a copy is made and
subsequently published the
datacite:IsDerivedFrom
relation pointing to the first Tale's doi is added to the resource map of the newly published object (see example below for clarity).When a Tale is published to DataONE two times, the previous system metadata for the EML is retrieved. A new system metadata document is made from it, but with values such for md5 and size updated. This system metadata document is uploaded with the new EML document, and effectively signals DataONE to obsolete the package.
Testing
Create a Tale
Publish it to DataONE
View the landing page for that Tale in a new tab (don't close the tab!)
Publish again
Refresh the URL from step 3, you should see a notification that there is an updated version available
_
Create a Tale
Publish it to DataONE
Make the Tale public
Sign out and # under a new account
Copy the Tale from step 1
Publish it to DataONE
Copy the ID of the resource map (the uuid in the picture below)
Visit https://dev.nceas.ucsb.edu/knb/d1/mn/v2/object/<RESOURCE_MAP_ID>
Search for "datacite"
Check that it references the copied Tale's doi
Example:
I published a Tale here, copied it and republished here. In the new resource map found here, you can see that the datacite:IsDerivedFrom points to the DOI of the first package.