Academics have published work for centuries. Over the past couple of decades the type of work academics do has been changing. Our output is no longer constrained to peer reviewed articles, but includes reports, data, code, infographics, book chapters and many more. Some of these outputs are easy to share, but we also need to be able to demonstrate where they’ve come from: to help science be reproducible and as a measure of our own work.
This blog article is an explanation of sharing research code. It focuses on using the version control website Github and academic repository Zenodo. Github uses Git to help manage your code development and collaborate with others, you can learn more about using it in this article from Jenny Bryan. Zenodo is a repository hosted at Cern, it is a way of getting a digital object identifier (DOI) for your work. A DOI is a persistent handle standardised by the ISO, in short it is a link which will always end up in the right place.
Once you have code in Github (help yourself and attend a software/data carpentry course), then you are ready to link Zenodo to Github.
- Sign into Zenodo, you can use your Github credentials.
- In your account settings you can link Github to Zenodo.
- Choose the Github repository you want to link and follow the instructions at the top of the Zenodo page about Github releases.
- Fill in your metadata on Zenodo.
You can add a json file to your Github repo which Zenodo will use to populate metadata, if you don’t do this Zenodo will overwrite your metadata each time your make a new release. Thankfully you have made a template of this json file.
- Back in your Zenodo Github settings click on the enabled repository.
- Click on a release (green text)
- Copy json metadata into a .zenodo.json file in your Github repo, this will be used to populate metadata on your next release.
You can view the output of this process here, which includes the metadata json: Michael Spencer. (2019, September 3). Hill farming study – analysis code (Version v1.02). Zenodo. http://doi.org/10.5281/zenodo.3385022