Correct DOI linking

As requested in the packaging guidelines, I’ve uploaded my project to Zenodo to mint a DOI. Currently I’m using the webhook they provide to automatically do this for every release I create.

The problem I see is that the DOI is only generated after the release is created and thus cannot be included in it. Of course I can update my repository afterwards, but that means that the citation information is always lagging behind.

I didn’t find a way to “request” a DOI before I create the release making this a classical hen-egg-problem.

Does anyone know a way to properly handle this?

good point … I don’t know but maybe you could add this to the wiki page of your repo?

Before I add anything to the wiki: how would you handle this?

Hey @pmeier can you say a little bit more about why you need to include the DOI within the release itself? What’s wrong with not having it in the release?

I know intuitively it makes sense to include the DOI within the release yourself, but Zenodo is the one assigning the identifier to the object (in this case at least). Having a DOI refer to a thing that contains the DOI kind of feels like an infinite regress situation.

If you want an up-to-date DOI on the repo README without having to make another commit, Zenodo provides a link to a badge that always resolves to the latest release. It’s the one further down the page that says “cite all versions”.
Like this:
Screen Shot 2020-10-01 at 5.36.47 PM
So you can just add that to the README and it should be correct (barring any weird web hook issues).

Does that help?

1 Like

@NickleDave

can you say a little bit more about why you need to include the DOI within the release itself? What’s wrong with not having it in the release?

The citation info, for example in the README, will always be outdated. For example, if someone looks at the README of tag v0.6.0 the citation info with the DOI will always reference the last release for example v0.5.0. Of course I could manually fix the version string in the citation info, but the DOI can only be fixed after the release.

If you want an up-to-date DOI on the repo README without having to make another commit, Zenodo provides a link to a badge that always resolves to the latest release. It’s the one further down the page that says “cite all versions”.

I understood this part exactly like you, but I feel like this is not working as we expect it too. For example, I’ve always used this auto-resolving DOI, but it is not resolving properly. My current badge links to 10.5281/zenodo.3965785 which does not link to the current version v0.5.0.post1, but rather to v0.5.1.post0. To link to the former one needs to use 10.5281/zenodo.3965784. Note that the only thing changed in the DOIs is the last digit.

I’ll create a test repository to test my suspicion and get back to you.

In my test repository it worked as expected. Although I’m sure that I used the correct link in my actual repository last time, something is off. I’ll fix it again and hope it works this time. Thanks for your input.

1 Like