Publishing code

Publishing code relates to creating a retrievable and referenceable version of your data analysis or simulation scripts, according to the FAIR principles. This ensures that others can both find your code and use the code as intended. 

When publishing your code, consider:

  • Findability: You can refer to your specific versions of your code, either by URL and (git) commit of the repository, or by a unique DOI.
  • Accessibility: Your code is openly available to the target audience (e.g. in public code repositories).
  • Interoperability: Your code is clearly documented and refers to the DOIs/URIs of your other relevant outputs (data, publications).
  • Reusability: Your code is published with a clear licence, clarifying the conditions for (re)use.

Library recommendation: Whenever possible, use your institutional git server (Gitlab, Gitea) to create a repository for your code, and include a license with the code (consult choosealicense.com). We recommend using a permissive licence (e.g. MIT, GNU GPLv3) if possible. Note, however, that if the code/software itself is the product of your project, the appropriate licence may need to be discussed with your institution’s Technology Transfer office (listed below) for guidance on appropriate licensing under institutional regulations (see below). You can then refer to the specific version (commit) of your code on Gitlab/Gitea repository, to link it to your data/publication.

Alternatively, if you want your code to be published with a DOI, you can either publish the code in a repository (e.g. institutional data repository, or general repository such as Zenodo), or publish your code on a personal GitHub account (provided there are no privacy/security concerns), and create a DOI using the GitHub-Zenodo integration. To consult whether these alternative solutions are suited, please contact the Lib4RI Data Management team.

Institutional Technology Transfer contacts

Consultation

Still unsure about the best approach for publishing your code? Book a consultation!