Open Sourcing Code
Authors: Sheyenne Kirkland (UAH), Brian Freitag (MSFC), Alex Mandel (DevSeed)
Date: December 12, 2023
Description: A document to provide guidelines for MAAP users on sharing code based on NASA’s Open-Source Science Initiative (OSSI). General references are provided on repositories, how to create a DOI (Digital Object Identifier) and choosing a license. For more general information on MAAP and open-source science, please see the General OSS document.
In addition, NASA has recently released theirOpen Science 101 curriculum. The course helps provide a more thorough understanding of open science, enabling participants to actively participate in open science. We recommend users complete the course and begin to align their work with the teachings of the course.
Per the Science Mission Directorate (SMD) Policy Document SPD-41a under III.D, software that has been developed under NASA funding should be:
“… made available in a publicly accessible repository that is widely recognized by the community.”
“… citable using a persistent identifier” (i.e. a DOI)
“… released under a permissive license that has broad acceptance in the community.”
Disclaimer: There can be some exceptions (like restricted software). It is best to familiarize yourself with policy documentation (the SPD-41a) and reach out to the appropriate contact for advice if an exception could apply to your software. There are also some additional policies that can apply if NASA-funded. This documentation is to help provide some guidance and encourage MAAP users to enagage and comply with open-source science and policies.
Repositories for Archiving and Minting DOIs
Domain-specific repositories are encouraged when possible, and if not possible, an external repository can be used instead. A DOI helps make your code more discoverable and accessible, and can be assigned by the repository.
There are some public repositories for software that are already used within the scientific community, mentioned in the Open-Source Science Guidance:
Note that Zenodo has integration with Github (another acceptable repository for MAAP users), making it easier to create an archived copy.
Some other well-known repositories:
There are other external repositories out there that could also be acceptable. A list is provided by the USGS on criteria to consider when choosing an external repository, which can be found here.
*Notes for MAAP users:
Users can create repositories within the MAAP Gitlab.
**If you are a MAAP user developing code, we recommend submitting your repository to the MAAP Community on Zenodo.*
If you are NASA-Funded:
If NASA-funded, you should follow guidance for how and where to share your code as there may be a specific repository you should submit to. However, if no repository if specified, it is encouraged to choose a NASA Science Data Archive if applicable.
Choosing a License
Open source licenses allow software to be freely used, modified, and shared (Open Science Initiative). There are three permissive and widely accepted licenses that are recommended within the SPD-41a:
Apache 2.0 license
“A permissive license whose main conditions require preservation of copyright and license notices.” Also requires that changes made to the licensed material must be documented. (source: choosealicence.com)
BSD 3-Clause license
A short permissive license similar to the MIT license, but also prevents someone from claiming false endorsement (stated in clause 3 of the BSD 3-Clause license).
“A short and simple permissive license with conditions only requiring preservation of copyright and license notices.” (source: choosealicence.com)