25 Copyright and licenses
25.1 Learning objectives:
By the end of this lecture, students should be able to: - Explain who owns the copyright of code they write in a give situation, and why - Choose an appropriate license for software (i.e., packages or analysis code) - Choose an appropriate license for your non-software materials
25.2 FULL DISCLOSURE - I AM NOT A LAWYER!
25.3 Software falls under copyright law 🇨🇦🇺🇸
In both the US and Canada, software code falls under copyright law
knowing who owns the copyright of software code is critical because the owner controls if and how the code may be:
- copied
- distributed
- sold
- modified
- essentially, made profitable
Copyright protects only the language and words used to express ideas, concepts and themes, not the ideas, concepts or themes themselves.
25.4 Canadian copyright law rights for software code 🇨🇦
In Canada, the copyright owner is afforded the following rights:
- Economic rights:
- the right to produce, reproduce, publish, translate, authorize & convert a work
- Moral rights:
- the right to claim authorship, the right to remain anonymous, or the right to use a pseudonym or pen name
- the right to integrity
- the right of association
Economic rights can be transferred to entities that are not the author, whereas moral rights cannot, they can however, be waived.
25.5 US copyright law rights for software code 🇺🇸
In the US, the copyright owner is afforded four rights:
- The right to reproduce the code
- The right to create “derivative works” based on the code
- The right to distribute copies of the code
- The right to “display” the code
25.6 Who has copyright ownership? 🇨🇦🇺🇸
This is a complicated question, and the answer starts with it depends…
So let’s start with the simplest case, you author the code and you are doing this for yourself (i.e., not for your employer, not for a client, etc).
In such a case, you (the person who typed the code) automatically become the copyright owner.
In both Canada and the USA, you do not need to need to affix the copyright symbol © to your work (some other countries do require this however).
Although the copyright symbol © is not required, it is often used in copyrighted works (along with the name of the copyright owner and the year of first publication) to clearly identify that the code is protected by copyright.
In both Canada and the US, it is possible (and advisable) to register your copyright as evidence that a copyright exists and who the owner is.
25.6.1 Who owns the code in the case of “work made in the course of employment”?
In both Canada and the US, if you write code for work as an employee the copyright ownership is typically assigned to the employer.
The specifics differ a little for Canada and the US, and so we’ll discuss each separately.
25.6.2 Who owns the code in the case of “work made in the course of employment”? 🇨🇦
In the Canada, software code is defined as “work made in the course of employment” (and therefore the copyright ownership is assigned to the employer) if:
- The author of the code was in the employment of some other entity under a contract of service or apprenticeship and the code was written in the course of their employment by that entity. And there exists no agreement (written, or otherwise, and even potentially even presumed) that the employee retains ownership of copyright for the code written during the term of their employment.
Note the bolding of the “of” in the sentence above. This is an important distinction from a contract for services (in which the author of the code acts more like an independent consultant, and in such a case it does not appear that “work made in the course of employment” would apply). In this case, the default position is usually that the contractor retains copyright ownership of the work they create, unless the contract specifically assigns copyright to the client. However, usually such a contract is asked for.
25.6.3 Who owns the code in the case of “work-made-for-hire”? 🇺🇸
In the US, software code is defined as “work-made-for-hire” (and therefore the copyright ownership is assigned to the employer) if either:
The writing of the code is done by an employee in the scope of their employment
The writing of the code was specially ordered or commissioned for use in one of ten defined categories (listed here). There must be a written agreement signed by the developer that explicitly states the work is “work-made-for-hire”.
25.6.4 Implications when you forgoe copyright ownership
When you forgoe copyright ownership, such as in a “work-made-for-hire” situation, if you want to use any of the code that you wrote for that piece of work again in another project, you would need to negotiate a licence to use the code you wrote, the same way any other third-party would…
Are there things one we can do to mitigate this? Possibly, some things include:
(in a consulting position) negotiating that the client purchase a license to the code you write, as opposed to hiring you to write the code
At the beginning of the project, negotiating which code is core to the work, and thus should fall under “work-made-for-hire” and what (pre-built) code (e.g., packages, scripts) are outside the core work and should not.
25.7 Why do I need a license?
As mentioned above, creative works (like software code) are automatically eligible for intellectual property (and thus copyright) protection
Reusing creative works without a license is dangerous, because the copyright holders could sue you for copyright infringement
Thus, if you publicly share your creative work (i.e., software code), you should let others know if and how they can reuse it
This is done via the inclusion of a
LICENSE
orLICENSE.txt
file in the base directory of the repository that clearly states under which license the content is being made available
25.8 Why do I need a license? (cont’d)
Unless you include a license that specifies otherwise, nobody else can copy, distribute, or modify your work without being at risk of take-downs, shake-downs, or litigation.
Once the work has other contributors (each a copyright holder), “nobody” starts including you!
25.9 How do licenses work?
A license solves this problem by granting rights to others (the licensees) that they would otherwise not have. What rights are being granted under which conditions differs, often only slightly, from one license to another.
Note: licenses are legal documents and written by legal experts. Most of you do not have the legal expertise to write your own license, so DO NOT do this. Instead, choose an already written one that best suits your situation.
25.10 How to choose a license
In practice, a few licenses are by far the most popular, and choosealicense.com will help you find a common license that suits your needs. Important considerations include:
Whether you require people distributing derivative works to also require others to distribute their derivative works in the same way.
Whether the content you are licensing is source code, and if it is, whether you want to require that derivatives of your work to share the source code
25.11 How to choose a license (cont’d)
Choose a license that is in common use
this 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
25.12 Choosing a software license
Let’s visit https://choosealicense.com/
25.13 Open source software is used in business
25.13.1 An Ethical License for Open Source Projects
25.14 How do I cite the code I used from another project that was openly licensed?
If you substantially use licensed code in your project, you need to ensure you satisfy the license the code was shared under. For example, for the MIT license, you should include the original copyright notice and the MIT License text. This requirement is part of the license terms, ensuring that the original authors receive credit for their work and that the recipients of the software are aware of the terms under which it is provided.
Below is an example of how a LICENSE
file might look when incorporating MIT-licensed code into a new project that is also distributed under the MIT License. This example includes both the original copyright notice for the incorporated code and a copyright notice for the new project.
MIT License
Copyright (c) [year of new project's creation] [New Project's Author or Organization]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
---
For the portions of the project that are derived from [Original Project Name] (https://github.com/original/project/url):
MIT License
Copyright (c) [year of original project's creation] [Original Author or Organization]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
25.15 But not all my creative Data Science work is code, how do I license it?
As you all know, code is only one part of what Data Scientists do. We also create visualizations, write reports, create and give presentations, write tutorials, et cetera.
The licenses we have explored so far do not really fit these kinds of work, is there something that does?
Yes! The Creative Commons licences were created for such works and they are now widely used in academia and the publishing industry.
25.15.1 Creative Commons licences
Source: “How to License Poster” by Creative Commons is licensed under CC BY 4.0
25.16 Explore some licenses:
25.17 Resources:
25.18 Attribution:
- materials on licenses have been borrowed and derived from the Software Carpentry Version Control with Git - Licensing lesson (licensed with the Creative Commons Attribution 4.0 International) and https://choosealicense.com/ (licensed with the Creative Commons Attribution 3.0 Unported License).