Open source - Kunnskapsbasen
This page contains information about where and how you can publish and share source code, things to consider before you do, and how to license source code.
Why publish source code?
Source code and software developed in research projects and other academic activities, should be included as a part of published research results. Together with publication of research data, this facilitates testing and validation of analyses and models, and enables reuse and further development of the code or software. Many aspects of best practice for research data management are applicable to source code. This includes versioning, documentation and metadata ensuring research output that is as FAIR, open and reproducible as possible. Nevertheless, there are some considerations and practicalities that are specific for source code, including licensing.
How to publish source code?
Several of the useful software development tools and services used for version control and collaboration, can also be used to make code and software openly available. Some commonly used examples include GitHub, GitLab and Bitbucket.
In addition to make code/software available through services like these, it is also recommended to publish in a suitable repository. This makes the code citable, possible to reuse and ensures long term preservation.
- For projects using GitHub the integration with Zenodo is a good option. Zenodo is a general repository for research results, operated by CERN/EU.
- Many general research data repositories can also be used to archive and publish source code and software, see more information on the page Research data repository.
Licensing source code
Open licences for source code and software are distinct from the licences usually recommended for academic publications or data, and there are numerous open or free licences to choose from. It is recommended to use one of the dedicated software licences, as these are made specifically considering source code and how this can be altered and distributed. Some software license also include patent rights in addition to copyright. See also the Creative Commons FAQ about why CC-licences are not recommended for software.
The Policy for Open Science at NTNU includes guidelines for licensing of academic results. Where no other overriding obligations exist, NTNU-produces software should be licensed under the European Union Public Licence (EUPL). For software projects in disciplines with specific requirements, also other licences satisfying the requirements from the Open Source Intitiative can be used (for example the MIT licence, the Apache license or GNU GPLv3).
- Choosealicence.com has advice on open source licences depending on your situation. They also have a nice overview to compare the most important conditions and permissions for several of the well known licences.
- EUDAT License Selector is a small tool that guide you through how to choose a licence, both for data and source code. This tool is helpful to see what licences are compatible when reusing others source code (but has a somewhat limited selection of licences, for example EUPL is missing).
- CodeRefinery shares a lot of their lesson materials, including one on "Social coding".
- More information is also available on openscience.no, for example the article Åpen kildekode (Open Source) where NTNU has contributed. Note that not all of the pages on openscience.no are in english yet.
If you have questions, feedback or need help publishing source code, contact Research Data @NTNU through NTNU Hjelp. External users can send an email to firstname.lastname@example.org (if you have an NTNU user account your request will be handled in the NTNU Hjelp portal).