Skip to content

feat: attach a DOI to a dataset - #3735

Merged
ThibaudDauce merged 16 commits into
mainfrom
feat/doi
Oct 1, 2026
Merged

ThibaudDauce merged 16 commits into
mainfrom
feat/doi

Conversation

@Pierlou

@Pierlou Pierlou commented Apr 21, 2026 •

Copy link
Copy Markdown
Contributor

See datagouv/data.gouv.fr#1983

Mints a DOI for a dataset, stores it, and pushes the metadata back to DataCite when the title or the organization changes.

The two open questions are settled:

  • the DOI is a readonly doi field on the dataset, not an extra
  • no retraction: a dataset carrying a DOI can no longer be deleted, only archived (in the API and in purge_datasets)

Minting is POST /datasets/{id}/doi, sysadmin only. The citation block and the "request a DOI" button are not here.

Checked against the sandbox instead of guessed: PUT /dois/{doi} upserts, so creation is idempotent and the 422 special case is gone, and a PUT without event keeps the DOI findable. The recorded URL is the permalink, not the slug, which follows the title.

New settings to set on deploy:

  • DOI_PREFIX
  • DOI_REPO_USER
  • DOI_REPO_PASSWORD
  • DOI_PLATFORM_URI, https://api.test.datacite.org outside production

@geoffreyaldebert

Copy link
Copy Markdown
Contributor

👏 pour moi pas de rétractation

@ThibaudDauce
ThibaudDauce marked this pull request as ready for review September 16, 2026 13:09
@ThibaudDauce ThibaudDauce changed the title Attach a DOI to a dataset feat: attach a DOI to a dataset Sep 28, 2026
Comment thread udata/core/dataset/api.py Outdated
Comment thread udata/core/dataset/doi.py
_put_doi(dataset.doi, _doi_metadata(dataset))


@task(route="high.dataset")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do me want a retry policy here to handle a downtime from DataCite ? Otherwise I guess the doi update is postponed to the next dataset title / org update or org name update.

Something like autoretry_for=(requests.RequestException,),retry_backoff=60, max_retries=3

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We do not have any autoretry in udata so I was reticent to add it but maybe it's worth it for this task in particular…

Co-authored-by: Nicolas KEMPF <nicolas@conciergerie.dev>
@ThibaudDauce
ThibaudDauce merged commit 005ac3d into main Oct 1, 2026
6 checks passed
@ThibaudDauce
ThibaudDauce deleted the feat/doi branch October 1, 2026 14:25
ThibaudDauce added a commit to datagouv/cdata that referenced this pull request Oct 7, 2026
…st one (#1238)

- Require opendatateam/udata#3735
- Part of datagouv/data.gouv.fr#1983
(affichage et demande de DOI ; les formats de citation restent à faire)
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.

4 participants