Skip to content

Introducing Dandiset DOIs #2350

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

asmacdo
Copy link
Member

@asmacdo asmacdo commented Apr 22, 2025

POC Implementation for #2012
Relies on changes in dandi/dandi-schema#297

  • Adds a new field doi to Dandiset model (requires migration)
  • Upon creation of a Dandiset, mint a DOI for the whole project
    • Dandiset DOI will initially refer to draft
    • Example: 10.80507/dandi.000004 -> /dandiset/000004/draft
  • Upon publication of a Dandiset
    • mint a Version DOI (internal changes only)
    • update Dandiset DOI to refer to the latest published version
    • Example 10.80507/dandi.000004 -> /dandiset/000004/0.250422.1754/

Tested with following procedure:

  • use dandi-schema 0.11.0 + modifications in PR above
  • configure DOI variables for test site
  • login (so user has a name)
  • makemigrations and migrate
  • use create_dev_dandiset management command (https://doi.test.datacite.org/repositories/dartlib.dandi/dois should now include a dandiset DOI that points to draft)
  • publish the dandiset (the published version will have a version doi, and the previous dandiset doi will be updated so it refers to the new version url)

Remaining TODOs:

  • Update Initial draft of a design document for the Zenodo like DOI per dandiset #2012, which should be merged before this comes out of "draft PR"
  • Use DJANGO_DANDI_DOI_PUBLISH to determine whether DOIs are Findable
  • Handle Datacite validation failures (if not enough to make findable, revert to draft)
  • On update, if draft doi, "publish" to Findable
  • Commit migration
  • Reduce repetition in Datacite API usage, probably create a minimal client?
  • add tests

- Adds a new field `doi` to Dandiset model (requires migration)
- Upon creation of a Dandiset, mint a DOI for the whole project
    - Dandiset DOI will initially refer to draft
    - Example: 10.80507/dandi.000004 -> <base>/dandiset/000004/draft
- Upon publication of a Dandiset
    - mint a Version DOI (internal changes only)
    - update Dandiset DOI to refer to the latest published version
    - Example 10.80507/dandi.000004 -> <base>/dandiset/000004/0.250422.1754/
datacite_body = to_datacite(metadata, version_doi=version_doi)
return (doi, datacite_body)

def update_dandiset_doi(version: Version) -> str:
Copy link
Member Author

@asmacdo asmacdo Apr 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this whole chunk is unnecessary? #1709 (comment)

If we can just point to the Dandiset DOI to the DLP, rather than the latest version then we dont need to update. But we dont choose the url in dandi-archive, so this would require a change in dandi-schema

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

Successfully merging this pull request may close these issues.

1 participant