科学的Pythonオープンソースソフトウェアのライセンスファイル#

Want to learn how to add a license file to your GitHub repository? Check out this lesson.

オープンソースライセンスファイルとは何ですか?#

LICENSEファイルというのは、GitHubやGitLabのリポジトリにあるファイルのことです。このファイルには、あなたのパッケージをユーザーが合法的に使う(あるいは使わない)方法が書かれています。

ライセンスが重要な理由#

ライセンスファイルは、メンテナであるあなたとユーザの両方を保護するため、すべてのオープンソースプロジェクトにとって重要です。 ライセンスファイルは、あなたのユーザとコミュニティの理解を助けます:

  1. ソフトウェアの利用方法

  2. ソフトウェアの再利用や他の目的への転用が可能かどうか

  3. プロジェクトに貢献する方法

などなど。

科学的なPythonオープンソースパッケージのメンテナであるあなたとユーザの両方を保護するために、ライセンスファイルが重要である理由についてもっと読む

ライセンスの保管場所#

LICENSE ファイルは GitHub / GitLab リポジトリのルートに保存してください。

特定の理由からライセンスファイルの言葉をカスタマイズするメンテナもいます。 しかし、これから始めるのであれば、寛容なライセンスを選択し、GitHubや choosealicense.com のウェブサイトで提供されている法的な言語テンプレートを使うことをお勧めします。

ライセンスには法的拘束力があるため、法律顧問の指導がない限り、独自のライセンスを作成しようとするのは避けるべきです。

可能な限りオープンパーミッシブライセンスを使用する#

一般的に、 Open Software Initiative (OSI) approvedの寛容なライセンスを使用することを推奨します。 もしあなたが査読のためにpyOpenSciにパッケージを提出する のであれば、OSIが承認したライセンスが必要です。

Copyleft licenses

The other major category of licenses are "copyleft" licenses. Copyleft licenses require people that use your work to redistribute it with the same (or greater) rights to modify, copy, share, and redistribute it. In other words, copyleft licenses prohibit someone taking your work, making a proprietary version of it, and redistributing it without providing the source code so others can do the same. Copyleft licenses are "sticky" in that they are designed to ensure that more free software is created.

The difference between copyleft and permissive licenses is an important cultural divide in free and open source software (e.g., see [1], [2], [3]). It is important to understand this difference when choosing your license. Copyleft licenses represents the "free" part of "free and open source software". Free and open source software is intrinsically political, and it is important to be aware of power dynamics in computing as well as the practical problems of license compatibility (discussed below).

ライセンスの選び方#

To select your license, we suggest that you use GitHub's Choose a License tool.

GitHub リポジトリの新規作成時にライセンスを選択すると、自動的にライセンスファイルのテキストコピーを取得してリポジトリに追加することもできます。 しかし、オンラインプロセスでは希望のライセンスが取得できないこともあります。

SciPyパッケージからのライセンス勧告

The SciPy documentation has an excellent overview of licenses.. One of the key elements that these docs recommend is ensuring that the license that you select is compatible with licenses used in many parts of the scientific Python ecosystem. Below is a highlight of this text which outlines license that are compatible with the modified BSD license that SciPy uses.

SciPyが使用している修正BSDライセンスと互換性のある他のライセンスは、2-clause BSD、MIT、PSFです。 Licenses are legally binding, as such you should avoid trying to create your own license unless you have the guidance of legal council.互換性のないライセンスは、GPL、Apache、および帰属表示/引用を必要とする、または商用目的での使用を禁止するカスタムライセンスです。

If your primary goal is for your code to be used by other, major packages in the scientific ecosystem, we also recommend that you consider using either BSD or MIT as your license. If you are unsure, the MIT license tends to be a simpler easier-to-understand option.

重要:選択したライセンスのガイドラインに忠実に従うこと#

どのライセンスも、あなたがパッケージの中でどのようなコードを使うことができるか、また、他の人があなたのパッケージの中のコードをどのように使うことができるか(あるいは使うことができないか)という点で、異なるガイドラインを持っています。

他のツールやオンラインソースからコードを借用する場合は、使用するコードのライセンスが、あなたがパッケージに選択したライセンスにも準拠していることを確認してください。

A useful way to think about license compatibility is the distinction between "inbound" and "outbound" compatibility. "Inbound" licenses are those that cover the software you plan to include in your package. Your package is protected by an "outbound" license.

Permissive licenses like BSD and MIT have few outbound restrictions - they can be used in any way by downstream consumers, including making them proprietary. This is why they are favored by many businesses and large packages that want to be adopted by businesses. Permissive licenses have more inbound restrictions - they can't use software that requires more freedoms to be preserved than they do, like copyleft licenses. A package licensed under MIT needs to take special care when including or modifying a package licensed under the GPL-3.

Copyleft licenses like GPL-3 have more outbound restrictions - they require more of packages that include, use, modify, and reproduce them. This is the purpose of copyleft licenses, to ensure that derivative works remain free and open source. They have fewer inbound restrictions - a GPL-3 licensed package can include any other permissively licensed and most copyleft licensed packages.

Compatible

Dependency
("Inbound")

Your Package

Downstream Package
("Outbound")

Permissive

Permissive

Copyleft

Permissive

Permissive

Permissive

Permissive

Copyleft

Permissive

Copyleft

Copyleft

Copyleft

Copyleft

Permissive

Copyleft

Copyleft

ライセンスがコードの再利用を決定する例

StackOverflowを例に、ライセンスによってコードの使用可否がどのように決まるかを明らかにしましょう。

Stack Overflow uses a Creative Commons Share Alike license.. The sharealike license requires you to use the same sharealike license when you reuse any code from Stack Overflow.

This means that from a legal perspective, if you copy code from the Stack Overflow website and use it in your package that is licensed differently, say with a MIT license, you are violating Stack Overflow's license requirements! This would not be true with a GPL licensed package. GPL-3 packages can include code licensed by CC-BY-SA [4].

🚨 慎重に進め! 🚨

ソフトウェアの引用についてはどうだろうか?#

While many permissive licenses do not require citation we STRONG encourage that you cite all software that you use in papers, blogs and other publications. You tell your users how to cite your package by using a citation.cff file. We will cover this topic when we talk about creating DOI's for your package using Zenodo.

References#