https://github.com/cjabradshaw/assigndoi

Assign a digital object identifier (DOI) to your Github repository

https://github.com/cjabradshaw/assigndoi

Science Score: 10.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.3%) to scientific vocabulary

Keywords

digital-object-identifier doi permalink zenodo
Last synced: 6 months ago · JSON representation

Repository

Assign a digital object identifier (DOI) to your Github repository

Basic Info
  • Host: GitHub
  • Owner: cjabradshaw
  • License: apache-2.0
  • Default Branch: main
  • Homepage:
  • Size: 0 Bytes
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • Open Issues: 0
  • Releases: 0
Fork of CABAH/assignDOI
Topics
digital-object-identifier doi permalink zenodo
Created over 4 years ago · Last pushed over 4 years ago

https://github.com/cjabradshaw/assignDOI/blob/main/

# Assign a permanent DOI to your data and code

Github + Zenodo = DOI

(originally published on ConservationBytes.com)

These days with data and code often required to be designated as open-source, licenced, and fully trackable for most manuscript submissions to a peer-reviewed journal, its easy to get lost in the multitude of platforms and options available. In most cases, we no longer have much of a choice to do so, even if you are reticent (although the benefits of posting your data and code online immediately far outweigh any potential disadvantages).

But do you post your data and code on the Open Science Framework (free), Github (free), Figshare (free), Zenodo (free, but donations encouraged), Dryad ($), or Harvard Dataverse (free) (and so on, and so on, )? Pick your favourite. Another issue that arises is that even if you have solved the first dilemma, how do you obtain a digital object identifier (DOI) for your data and/or code?

Again, there are many ways to do this, and some methods are more automated than other. That said, I do have a preference that is rather easy to implement that Id thought Id share with you here.

## Step 1
The first requirement is getting yourself a (free) Github account. Once you create an account, you can start creating repositories, which are essentially just sections of your account dedicated to specific code (and data). I mostly code in R, so I upload my R code text files and associated datasets to these repositories, and spend a good deal of effort on making the Readme.md file highly explanatory and easy to follow. You can check out some of mine here.

Ok. So, you have a repository with some code and data, youve explained whats going on and how the code works in the Readme file, and now you want a permanent DOI that will point to the repository (and any updates) for all time.

Github doesnt do this by itself, but it integrates seamlessly with another platform  Zenodo  that does. Oh no! Not another platform! Yes, Im afraid so, but its not as painful as you might expect.

## Step 2
Head on over to Zenodo, but dont create a new account there. Instead, click the Log in button on the top right of the page and then choose the option that allows you to login with your Github credentials.

Once you enter this option, youll be taken to your Github account to authorise the login through Zenodo. This also authorises what are known as webhooks  algorithms that alter the behaviour of a web page with custom callbacks. This essentially means that youll allow single identifier (in this case, a DOI) to point to a particular repository in your Github account.

## Step 3
Now click on your account name (upper right) back in Zenodo and choose the Github option. This will show a list of all your Github repositories in the linked account. Youll notice that each repository has a little OFF button to to the right of it. Click this to ON for the repository for which you want to assign a DOI.

## Step 4
Head back to Github and click on the repository in question. Click Settings on the upper right, and then Webhooks in the left-side menu. If everything has worked properly, there should be an API (application programming interface) link to Zenodo here.

Back on the main repository view page, find the Releases section on the right-hand menu, and click Create a new release.

This will give you the option to name your release, which is usually something along the lines of v1.0.1 (v2.0, etc., etc.). Add a little release description in the box below that, and finally a little release note below that (optional). Now click the Publish release button. Youre almost finished.

## Step 5
Go back to your Zenodo GitHub page, and there should be a cute, little badge next to your repository showing the new DOI. And yes, if you type doi.org/YOURNEWDOI into any browser, it will now point to a zipped (tarballed) version of your Github repository.

An added bonus is that you can click on the badge itself in Zenodo, and it will provide HTML code that you can place in your Github repositorys Readme file  this will display the badge there too (see one of mine here for an example)!

When youre ready to submit your manuscript to a journal, all you need to do is provide the DOI and it will point permanently to your Github repository. Lemon squeezie!

CJA Bradshaw

Owner

  • Name: Corey Bradshaw
  • Login: cjabradshaw
  • Kind: user
  • Location: Adelaide, South Australia
  • Company: Flinders University

Matthew Flinders Professor of Global Ecology @GlobalEcologyFlinders @CABAH

GitHub Events

Total
Last Year