Guidance for Creators of Open Source Software [pdf]

Imperial College London’s (also referred to as “Imperial” or “The College”) preferred open source software (OSS) licence is the BSD licence (3-Clause).  Under an open source software (OSS) licence, the source code and, where relevant, object code are released to the licensee allowing developers to analyse, modify and enhance the software. 

Open source release may not be the best mode to maximise the impact of your software.  Software creators who wish to make compiled versions of their software (i.e. binaries) available for free, but not the source code itself, do not require an OSS licence and should contact Research Services for a bespoke software licence.  For advice on societal impact of your software contact Enterprise.

Flowchart Indicating which open source software licence to use

A formal flowchart is available to view in the licensing guidance document: Guidance for Creators of Open Source Software [pdf] 

OSS licences can fall under two categories; permissive and restrictive.  Permissive licences include the BSD, MIT-style and Apache licences. Their permissiveness allows for modified or enhanced software to be released under any new form of licence including a commercial licence.  As such, OSS code can be combined with proprietary code to form a software product that can be sold under a commercial licence.  

Restrictive licences comprise the GNU family of licences promoted by the Free Software Foundation. They are constructed around the ‘Copyleft’ principle which requires derivative software to be distributed under the same OSS licence terms.  It is a method for making software available and enabling them to be modified provided that all modified and extended versions of the program are made available under the same terms.

GNU licences can be covered by ‘strong conditions’: e.g. GPL (General Public Licence). The goal of the GPL is to grant everyone the freedom to copy, redistribute, understand, and modify a program.  If the modified software is distributed; all software must be covered by the same original GPL licence.  This includes releasing the source code of any modification or additions. GPL-licensed software cannot be incorporated into a commercial system and then re-released under a commercial licence.

Alternatively, there are less restrictive licences for ‘weak conditions’: e.g. LGPL (Lesser General Public Licence).  With this licence, it is allowable to have a variation of parts released under different licences e.g. some parts of code must be distributed under original licence; other parts may be distributed under different licences.  Precise areas of code need to be defined and attributed to a particular licence. GNU LGPL is commonly used for software libraries.

College preferences

Use of a permissive BSD 3-clause licence is the preferred suggestion (see example below).

Copyright notice must be included. This should refer to “Copyright © 2022, Imperial College, London. All rights reserved.” only.  This is to ensure a consistent branding message is maintained.

 A copy of the licence terms and conditions must be placed or linked prominently on the webpage.

A copy of the licence must be distributed alongside the code on any open source software repository where the code is released, and also placed or linked prominently on any webpage associated with the software.

Note that code repositories such as GitHub provide licence templates and also support for detecting licence files provided with code and highlighting the licence and terms in a clear and easy to read manner.

An example of the 3-clause BSD licence template is below:

Copyright (c) 2022, Imperial College London
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of Imperial College London nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

The copyright notice “© 2022, Imperial College, London. All rights reserved” at the start of the BSD-3 licence (above), should include each year content was added to the copyrighted material, not just the current year.  For example, if additional code is added over a period of several years the copyright notice should include the entire period of code writing i.e. “© 2020 - 2023, Imperial College, London. All rights reserved.” The copyright notice can either use the word “copyright” or the © symbol. 

Derivative software

Modification of software code may result in the creation of derivative software that can be licensed under a different type of licence.  The licence for the derivative software is dependent on the type of licence the original software was released under.  Modifications or derivatives can be released as follows:

Original Software Licence

New Software Licence

GPL

GPL

LGPL

GPL or LGPL

MIT / BSD 3-clause etc.

Same or another licence

Areas for consideration when selecting a suitable OSS licence

 Complying with one software licence can result in inconsistencies between and when complying with other software licences.  Follow the guidance below when choosing an appropriate OSS licence:

  • Step 1: Obtain written permission to include third party code in an open source software release if the software includes code from your work at a previous institution or company, or from work with a collaborator, then publish the code in accordance with the terms of the written permission. 
  • Step 2: Follow a funder’s terms and conditions if the they stipulate how the software should be released. 
  • Step 3: If your software requires the use of any libraries or other software to work then release your software in accordance with the terms of the dependent libraries or software.
  • Step 4: If you would like to ensure all the derivatives of your software are released under an open source licence then release the software under a GNU GPL style licence. 
  • Step 5: If you have a patent associated with the software that is being commercialised by the College, contact Enterprise for advice on releasing the software. 
  • Finally, step 6: If you wish to release the software with a simple, commonly-used licence that has a disclaimer then release under a 3-clause BSD licence. 

Sharing research software

The College has guidance on sharing research software and making use of an online source code repository service that supports version control and other software development tools such as file hosting, bug tracking and issue tracking. Popular code repositories include GitHubBitBucket and GitLab.  Hosted services are especially useful for working with collaborators across more than one institution.

Imperial College London has a licence with GitHub that allows anyone writing software in the Imperial community to create both public and private code repositories at no cost, within the Imperial College GitHub “organisation”.  For further information see Working with GitHub.com. Creators of open-source software are encouraged to add their projects to the Imperial College Research Software Directory.  

If your project requires extra security beyond that provided by private repositories in GitHub.com you should consider using the College-hosted GitHub Enterprise service. GitHub Enterprise offers similar functionality to GitHub.com, but all code is stored on-premise and a College user account is required to access the service. See Working with GitHub Enterprise for more information.