Publishing code and software
Reproducible science requires not just sharing the paper and the data, but the methods as well. When those methods are partly or entirely captured by computer code, sharing that code is a powerful step towards making your work fully reproducible. Not only does this allow verification and detailed exploration of your findings, but it also facilitates further research; well-written code can be re-used and even built upon, as a scientific product in and of itself.
If you want to publish your code and software in a way that allows them to be used optimally, there are some things to think about:
- What is the best platform to publish my code or software?
- How do I license my code or software?
- How do I facilitate citation of my code or software?
Code and software can be shared in a variety of formats, that each will lead to a different set of answers to these questions. Roughly speaking, your code can be shared as part of a reproducible document, bundled with the paper and data in a research compendium, or packaged as stand-alone software.
Reproducible/dynamic document
Some journals support a paper format that integrates the figures in the paper with their source code. The paper in this case is written as a notebook (e.g. Jupyter notebooks, or R markdown), and includes the code to generate each figure from the data. Such formats may allow a reader to change and run the code in the paper, and thus to fully investigate the data in the context of the publication.
In this format, the code is part of the paper, so it is licensed and cited as such.
A platform offering this type of publication is, for example, eLife.
Research compendium
If your code is too elaborate to include in a notebook, or you cannot find an appropriate venue to publish it, you may opt to share your code in the form of a research compendium. A research compendium bundles the paper’s text and figures with the underlying data and code. It can be published as a whole, often on an external platform, and as accompaniment to a classically published paper (or pre-print).
Licensing: open source license
Publication platforms: Zenodo, OSF
Software packages
Software is often accompanied by a paper, in many cases because this allows the software to be cited in an academic context. However, a software package can be a publishable (and citable) unit on its own. It is crucial to license your software appropriately; without a license, your software is under copyright by default, which does not allow anyone to use or build upon it.
Licensing: open source license
Publication platform: Zenodo
More information
If you have any questions regarding code and software licensing and publication platforms, please contact us.