Skip to content
This repository has been archived by the owner on Nov 18, 2020. It is now read-only.

Upload to SHARE Notify

Adam Wead edited this page Apr 6, 2018 · 16 revisions

Upload to SHARE Notify

Note: Not working due to share API change no need to test

Upload an eligible file to Scholarsphere

  1. Login using the Log In button at the top right of the page (you should be redirected to your dashboard)
  2. Click ‘Upload’ at the top left of the page
  3. From the ‘My Computer’ tab, agree to the ScholarSphere’s Deposit Agreement and click ‘Select files…’
  4. Choose a file for upload, type or format does not matter, and click ‘Start Upload’
  5. When redirected to the 'Apply Metadata' screen, enter a descriptive title for the file such as "SHARE Notify upload test, [current date]"
  6. Under Resource Type, choose 'Disstertation'
  7. Add a keyword and ensure your name is listed under Creator
  8. Rights can remain at its default option
  9. Verify that Visibility is set to 'Open Access'
  10. Click 'Save'
  11. After you are redirected to the dashboard files page, click on the file you just uploaded
  12. Verify that file characterization successfully executed and the file is set for 'Open Access' visibility; otherwise reload the page until complete
  13. Under User Activity, verify that you can see 'File was successfully sent to SHARE Notify'

Verify the file is in SHARE

  1. Go to SHARE's Push API holding are on staging
  • you may need to obtain credentials from one of the Scholarsphere devs
  1. Go to the last page of results using the pagination browser at the top right of the screen
  2. Scroll to the very bottom of the last page of results and verify that your uploaded document is present
  3. Verify the metadata of the SHARE document:
  • docID is the complete link to the file in Scholarsphere
  • source is "scholarsphere"
  • updated is the date the file was created in Scholarsphere, in iso8601 format
  • jsonData should contain the following additional fields:
    • canonicalUri same as docID
    • providerUris same as docID
    • name your name as it appears in the "Creator" field of Scholarsphere
    • email your email
    • title the descriptive title you entered when you uploaded the file

Test rake task

  1. Log into the server via SSH
  2. As the deploy user, cd ~/scholarsphere/current
  3. RAILS_ENV=production bundle exec rake share:files
  • this takes up to an hour to run
  1. Verify task runs and check output against SHARE staging area above

Notes

The document's metadata is stored in JSON and contains long lines that do not wrap:

        {
            "id": 150,
            "updated": "2016-01-11T15:05:46.032607Z",
            "docID": "https://scholarsphere-qa.dlt.psu.edu/files/f1881k89j",
            "source": "scholarsphere",
            "jsonData": "{\"providerUpdatedDateTime\": \"2016-01-11T15:00:03Z\", \"shareProperties\": {\"source\": \"scholarsphere\", \"docID\": \"https://scholarsphere-qa.dlt.psu.edu/files/f1881k89j\"}, \"uris\": {\"canonicalUri\": \"https://scholarsphere-qa.dlt.psu.edu/files/f1881k89j\", \"providerUris\": [\"https://scholarsphere-qa.dlt.psu.edu/files/f1881k89j\"]}, \"contributors\": [{\"name\": \"Wead, Adam Garner\", \"email\": \"[email protected]\"}], \"title\": \"SHARE Notify QA test, Jan. 11, 2016\"}",
            "status": "created"
        }

Known Issues

Last Tested

  • 01/11/16 - Adam Wead
  • 01/12/16 - Adam Wead (staging)
  • 01/25/16 - Adam Wead (staging)
  • 01/27/2016 - Nick Yingling
  • 02/24/2016 - Adam Wead
  • 04/06/2016 - Nick Yingling
  • 05/24/2016 - Carolyn Cole

Return to Testing Scripts

Clone this wiki locally