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

Update Dataverse API to use persistent File ids instead of db file ids #165

Open
raprasad opened this issue Jul 11, 2018 · 2 comments
Open
Assignees

Comments

@raprasad
Copy link
Contributor

update form and API: http://metadata.2ravens.org/preprocess/dataverse-form

@raprasad
Copy link
Contributor Author

@raprasad
Copy link
Contributor Author

raprasad commented Jul 12, 2018

Make changes to accept the new persistentId for files:

Changes:

  1. DataverseFileInfo model
    • add a persistent_id field
    • set the datafile_id default to -1
    • update Meta
      • unique_together list should also include persistent_id
    • update get_file_access_url
      • Return the url for persistent_id, if that's not available, return the url for datafile_id
    • update get_file_page_url
      • Similar to above, try using persistent_id first
  2. URLHelper (in url_helper.py)
    • add get_persistent_id_from_url method
      • follow the format of URLHelper.get_datafile_id_from_url
  3. DataverseFileRetriever.load_dataverse_info
    • update this to work with persistent_id or file_id
      • May need to make new methods--e.g. if it's persistent_id, do one thing, use another method for file_id
  4. citation_retriever.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants