Sharing (licensing and publishing)

Objectives

  • Add a license to your project.

  • Understand why software licenses matter.

  • Learn how to make a code project persistent and citable.

  • Understand that publishing a code on GitHub is not enough to make it persistent and findable 10 years from now.

Why software licenses matter

  • We often want or need to make changes to other people’s code, or we want other people to be able to make changes to our code.

  • Without a license the derivative work cannot be distributed or published.

  • Maybe you want to be able to use and change your own code in your next job?

Taxonomy of software licenses

If you don’t have a license, your code is in the red area in this picture and others cannot mix it with their code. Arrows represent compatibility (A -> B: B can reuse A).

European Union Public Licence (EUPL): guidelines July 2021

European Commission, Directorate-General for Informatics, Schmitz, P., European Union Public Licence (EUPL): guidelines July 2021, Publications Office, 2021, https://data.europa.eu/doi/10.2799/77160.

Choose a standard license. Don’t design your own otherwise compatibility won’t be clear.

Great resources:

Demonstration

  1. Choose a license and add a LICENSE file to your repository.

  2. Add a CITATION.cff file to your repository:

    cff-version: 1.2.0
    message: "If you use this software, please cite it as below."
    authors:
      - family-names: Doe
        given-names: Jane
        orcid: https://orcid.org/1234-5678-9101-1121
    title: "My Research Software"
    version: 2.0.4
    doi: 10.5281/zenodo.1234
    date-released: 2021-08-11
    

    More about CITATION.cff files:

  3. We can make our code persistent and citable following these steps.

Where to explore more

Exercises

Exercise Sharing-1: Add a license file to your project

You can use the Joinup Licensing Assistant.

Exercise Sharing-2: CITATION.cff and Zenodo sandbox

In this exercise you can practice adding a CITATION.cff file to your own project.

We will then practice getting a DOI using the Zenodo sandbox. We use here the Zenodo sandbox and not the “real” Zenodo, since we are only practicing. On the “real” Zenodo a record with a DOI cannot be deleted (this is the point of making it persistent).

How to get a DOI using the Zenodo sandbox:

Exercise Sharing-3: What constitutes derivative work?

Which of these are derivative works? Also reflect/discuss how this affects the choice of license.

  • A. Download some code from a website and add on to it

  • B. Download some code and use one of the functions in your code

  • C. Changing code you got from somewhere

  • D. Extending code you got from somewhere

  • E. Completely rewriting code you got from somewhere

  • F. Rewriting code to a different programming language

  • G. Linking to libraries (static or dynamic), plug-ins, and drivers

  • H. Clean room design (somebody explains you the code but you have never seen it)

  • I. You read a paper, understand algorithm, write own code

Exercise Sharing-4: Licensing situations

Consider some common licensing situations. If you are part of an exercise group, discuss these with others:

  1. What is the StackOverflow license for code you copy and paste?

  2. A journal requests that you release your software during publication. You have copied a portion of the code from another package, which you have forgotten. Can you satisfy the journal’s request?

  3. You want to fix a bug in a project someone else has released, but there is no license. What risks are there?

  4. How would you ask someone to add a license?

  5. You incorporate MIT, GPL, and BSD3 licensed code into your project. What possible licenses can you pick for your project?

  6. You do the same as above but add in another license that looks strong copyleft. What possible licenses can you use now?

  7. Do licenses apply if you don’t distribute your code? Why or why not?

  8. Which licenses are most/least attractive for companies with proprietary software?