7. Licensing
¶Objectives
- Explain why adding licensing information to a repository is important.
- Choose a proper license.
- Explain differences in licensing and social expectations.
As an open source project, KIR training material includes a file named LICENSE or LICENSE.txt file in all public lesson repositories. This file is used to specify that all materials are freely available under the Creative Commons Attribution license. Without a file that clearly states under which license any public source code, manuscript or other creative works is being made available, the default copyright laws apply. To learn more about licensing and open source, you can read more about Github’s description of license and the legal grounds for open source licensing.
Choosing a license that is in common use makes life easier for contributors and users, because they are more likely to already be familiar with the license and don’t have to wade through a bunch of jargon to decide if they’re ok with it. The Open Source Initiative and Free Software Foundation both maintain lists of licenses which are good choices.
This article provides an excellent overview of licensing and licensing options from the perspective of scientists who also write code.
At the end of the day what matters is that there is a clear statement as to what the license is. Also, the license is best chosen from the get-go, even if for a repository that is not public. Pushing off the decision only makes it more complicated later, because each time a new collaborator starts contributing, they, too, hold copyright and will thus need to be asked for approval once a license is chosen.
More on what happens when we don't inlcude a LICENSE file¶
If you don’t add a LICENSE file to a public GitHub repo, legally no one has clear permission to use, modify, or redistribute your code, so by default you retain all rights and others are very restricted in what they can safely do with it. Practically, this ambiguity tends to discourage serious use and contributions, because potential users, companies, and downstream projects generally avoid code without an explicit license.
Legal implications¶
By default copyright law applies to your code if you publish it without a license, meaning: others can view the code on GitHub, but they do not automatically have permission to copy, modify, or redistribute it in their own projects. Anyone who wants to use it beyond just reading would need your explicit permission, typically via a license or a separate agreement.
Practical and community effects¶
Many developers and organizations have policies not to depend on repositories that lack a clear license, so they may avoid using or contributing to your project. Some people might also assume (incorrectly) that “no license” means “do anything you want”, which can create legal risk and confusion for everyone involved.
