Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add licensing guidelines to ReadtheDocs #21

Merged
merged 8 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ build:
os: "ubuntu-22.04"
tools:
python: "3.10"
jobs:
post_create_environment:
# Install poetry
# https://python-poetry.org/docs/#installing-manually
- python -m pip install poetry
post_install:
# Install dependencies with 'docs' dependency group
# https://python-poetry.org/docs/managing-dependencies/#dependency-groups
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install

sphinx:
configuration: docs/source/conf.py
Binary file added docs/source/_static/licenses.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 11 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,24 @@
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = []
extensions = [
'myst_parser',
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
]

templates_path = ['_templates']
exclude_patterns = []
source_suffix = {
'.rst': 'restructuredtext',
'.md': 'markdown',
}
Comment on lines +26 to +29
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was super happy to see how easy it was to enable both restructuredtext and markdown! Yay sphinx!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay! This is awesome




# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'alabaster'
html_theme = 'sphinx_rtd_theme'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going with this for now, but definitely open to ideas for other themes we might want to use.

html_static_path = ['_static']
21 changes: 5 additions & 16 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
.. developer-guide documentation master file, created by
sphinx-quickstart on Fri Apr 26 14:06:50 2024.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
LASP Developer's Guide
======================

Welcome to developer-guide's documentation!
===========================================
Welcome to the LASP Developer's Guide!

.. toctree::
:maxdepth: 2
:caption: Contents:
:maxdepth: 1



Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
licensing
90 changes: 90 additions & 0 deletions docs/source/licensing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Licensing

Licenses provide legally binding guidelines for the use and distribution of software and data. Licenses can be
proprietary or free and open source.

## Purpose for this guideline
In Data Systems, many of our code repositories are open source. An open source license gives others explicit permission
to use any part of the code legally. This guide provides options for choosing the right license for your project.


## Options for this guideline

### Software

To avoid copyright concerns, it is recommended that:
1. Any software created by LASP is properly licensed to provide sufficient guidance on their usage
2. Any software used by LASP are licensed and used accordingly to protect against potential legal action from the owner
of that intellectual property

The following table is taken from [The Turing Way](https://the-turing-way.netlify.app/reproducible-research/licensing)
and shows the different categories of licenses available and the types of licenses that support their respective
requirements.

![The different categories of licenses](_static/licenses.png)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was having lots of trouble trying to get HTML to render in sphinx/ReadtheDocs, so I decided to just show a static image of the table instead 🤷🏻 . Maybe we can get embedded HTML working in a future PR?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the table caption is above the table again. We might want to re-make that png and add the caption in the .md file below the image at some point


Free Licenses are classified as Copyleft or Permissive. Copyleft licenses (GPL-style) say that all derivative works must
preserve the same rights as the original work. So, if it is an open-source program currently, you can NOT use that code
in your closed-source program. Because of this, many people don’t consider this as “open” as the more permissive
licenses that would allow someone else to use their code in a commercial closed-source product.

In general, choose a permissive license for your project in Data Systems.

Some fairly common options:

* [BSD-3](https://opensource.org/license/BSD-3-Clause) - Commonly used in the Python scientific community
* [MIT](https://opensource.org/license/MIT) - Short and sweet, very similar to BSD-3
* [Apache-2](https://opensource.org/license/apache-2-0) - Commonly used in the Java/Scala communities


Some examples from groups at LASP:

* MIT: <https://github.com/SWxTREC/enlilviz>
* Apache-2: <https://github.com/latis-data/latis3/>


*NOTE: There is a NASA Open Source License: <https://opensource.gsfc.nasa.gov/nosa.php>; However, it DOES NOT satisfy
the Free Software Foundation’s definition of open source.*

### Data
A creative commons license can be used to restrict who can use data and how they use it.

Creative Commons: <https://creativecommons.org/choose/>

Data rights qualifiers
* BY – Credit must be given to you, the creator.
* NC – Only noncommercial use of your work is permitted.
* ND – No derivatives or adaptations of your work are permitted.
* SA – Adaptations must be shared under the same terms.


You can mix and match the qualifiers on the data rights depending on what limitations you want to enact on the data
you’re distributing/producing.

* CC0 1.0 - dedicate your work to the public domain, no copyright
* CC BY 4.0 - Anyone can use the data/work, even for commercial purposes, but credit must be given to you
* CC BY-NC 4.0 – Anyone can use the data/work, but NOT for commercial purposes (i.e. others can’t use your work to sell
their software or product)
* CC BY-NC-ND 4.0 – Anyone can use the data/work, but NOT for commercial purposes and NO derivate works (adaptations).
* CC BY-NC-SA 4.0 – Anyone can use the data/work, but NOT for commercial purposes and the work must be shared alike
(SA), meaning it must have the same terms of use.


## How to apply this guideline

### Software
1. CU Venture Partners (CU lawyers) recommend using BSD-3 license.
2. Make sure that you put the license file in the root directory and call it `LICENSE` or `LICENSE.md` so that the code
repository (GitHub, GitLab, Bitbucket) can immediately identify what license your code is released under and let
contributors know.
3. Fill out the copyright, noting that it is NOT LASP, but *Regents of CU. Copyright (c) YYYY, Regents of the University
of Colorado*


## Useful Links

* [Public license selector](https://ufal.github.io/public-license-selector/)
* [Choose a license](https://choosealicense.com/)
* [Open Source Initiative (OSI)](https://opensource.org/licenses)
* [The Turing Way overview of licensing](https://the-turing-way.netlify.app/reproducible-research/licensing)
* [Free and Open Source License Comparison chart](https://en.wikipedia.org/wiki/Comparison_of_free_and_open-source_software_licenses)
115 changes: 0 additions & 115 deletions guidelines/licensing.md

This file was deleted.

Loading
Loading