Licensing (MPL-2.0)
The open-source repositories in the entirius GitHub organisation are licensed under the Mozilla Public License
2.0, and Python source files say so in a header.
Why MPL 2.0
Section titled “Why MPL 2.0”MPL instead of MIT or GPL:
- file-level (weak) copyleft: changes to MPL files stay open, but they may be combined with closed code in a larger work;
- lets open and closed code coexist legally: the platform under MPL, and next to it code that stays closed, such as the apps used in the service and client-specific work;
- includes a patent grant; commercial use and resale are allowed.
The LICENSE File
Section titled “The LICENSE File”Every open-source entirius repo has a LICENSE file in the root with the full MPL 2.0 text
(source: https://www.mozilla.org/media/MPL/2.0/index.txt).
The File Header
Section titled “The File Header”Every Python file starts with the MPL header as # comments:
This Source Code Form is subject to the terms of the Mozilla PublicLicense, v. 2.0. If a copy of the MPL was not distributed with thisfile, You can obtain one at https://mozilla.org/MPL/2.0/.- After the shebang (if any), before the docstring.
- Tests and migrations carry it too.
__init__.pyis exempt: the hook skips it. A header there is allowed, not required.- The text lives once per repository, in
.license-header.txt.
Frontend repositories carry no file headers. Their license is stated by the LICENSE file and the license field
of package.json.
Package Metadata
Section titled “Package Metadata”Python packages declare the license in pyproject.toml: license = "MPL-2.0" (SPDX, PEP 639).
Enforcement
Section titled “Enforcement”- Locally: the
insert-licensepre-commit hook adds the header to a.pyfile that lacks it. It is configured in the repository’s.pre-commit-config.yamlfor.pyfiles,__init__.pyexcluded. - In CI: the
lintjob runs the same hook over all files (pre-commit run insert-license --all-files), so a commit made with--no-verifystill fails there. - A repository’s
AGENTS.mdnames the license under its conventions (AGENTS.md Convention).
A repository under a different license says so in its own LICENSE and README.
AGENTS.md Convention: the instruction file every repository carries