Skip to content
This repository was archived by the owner on Nov 8, 2026. It is now read-only.

Add MIT license - #220

Merged
MaxGhenis merged 6 commits into
mainfrom
license-mit
Nov 8, 2026
Merged

MaxGhenis merged 6 commits into
mainfrom
license-mit

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

This repository had no license, so copyright law reserved all rights in its contents to their authors. With this PR, PolicyEngine releases the code under the MIT License and the repository's original text and figures under CC BY 4.0, in LICENSE and a README section. Closes #197.

On 2026-09-17 we opened license PRs like this one across the PolicyEngine, Thesis Institute, UBI Center and Cosilico repositories, with MIT for code and CC BY 4.0 for original text and figures. We kept AGPL-3.0 for the model packages that derive from OpenFisca.

Neither uv.lock nor any other dependency manifest on the default branch names a package that PolicyEngine licenses under AGPL-3.0. The paper notebook paper/imputing-from-scf-to-cps.ipynb imports two such packages, policyengine-us and policyengine-core.

Before PolicyEngine archives microimpute, I added:

  • changelog.d/license-mit.added.md, so merging publishes a minor version with the license to PyPI.
  • License metadata in pyproject.toml (license = "MIT" and license-files = ["LICENSE"]), with setuptools 77 or later as the build requirement.
  • README sentences noting that the optional matching extra installs rpy2, which its authors license under GPL-2.0-or-later, and that the paper notebook imports AGPL-3.0 packages.
  • An absolute URL for the README's link to LICENSE, so the link also works on PyPI's project page.
  • 2025-2026 as the copyright years in LICENSE.

The README's license section covers paper/ as well, so I left the manuscript without a license line of its own.

Contributors who object to these terms for their contributions can email hello@policyengine.org.

🤖 Generated with Claude Code

Code: MIT. Original text and figures: CC BY 4.0 (README).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
microimpute-dashboard Ready Ready Preview Nov 8, 2026 5:43am UTC

@vahid-ahmadi

Copy link
Copy Markdown
Contributor

Reviewed this with a fresh pass, checking the licence-compatibility question independently rather than taking the scan on trust — it is the one thing here with consequences for the five downstream repos.

The core claim holds. MIT is correct. I scanned the whole dependency closure, not just the direct list: everything resolves to BSD / MIT / Apache-2.0 apart from rpy2 (GPL-2.0-or-later), and MPL-2.0 for certifi, tqdm and pathspec, which is file-level copyleft and imposes nothing here. No policyengine-* package appears in the lock file at all, so the AGPL claim is confirmed. pytorch-tabular is MIT and quantile-forest Apache-2.0, so the mdn extra raises nothing.

The LICENSE text is verbatim OSI MIT, and the CC BY 4.0 split in the README is clean — disjoint subject matter, MIT scoped to "the Software", with a sensible third-party carve-out.

To do

Before merging

Worth doing in the same PR

  • Note the GPL implication of the matching extra in the README. microimpute neither bundles nor links rpy2, the import is guarded, and the default install contains no GPL code — so MIT is right and this is not a violation. But a user who installs microimpute[matching] and redistributes that environment is bound by GPL-2+ for the combined work. One sentence pre-empts a JOSS reviewer asking.
  • Add changelog.d/197.added.md and merge normally. The premise in the description does not hold: main has no branch protection (gh api .../branches/main/protection → 404), so the red changelog check is advisory and the merge button stays enabled. has-functional-changes.sh also lists LICENSE* and README.md in IGNORE_DIFF_ON, so this is classified as no functional change. An added fragment gives a minor bump, 3.1.1 → 3.2.0, which is right — and a release is needed anyway to push the metadata above onto PyPI.

Optional

  • Copyright year 2025-2026 rather than 2025 — first commit is 2025-02-25 and work continues into 2026. (microdf uses an individual holder, but "PolicyEngine" is the better choice here with four authors and org ownership.)
  • A licence line in paper/ — grep -rni "licen\|copyright" paper/ returns nothing, so a reader of the manuscript alone has no signal.
  • license: MIT in CITATION.cff once this lands (that file arrives in Add JOSS paper for submission #201).

Not caused by this PR

The red Lint check is pre-existing. I checked the base commit rather than assuming: ruff format --check reports the same five files on main as on this branch, and none of them are touched here. Worth not letting "CI is red anyway" obscure the changelog point above.

MaxGhenis and others added 2 commits November 6, 2026 19:01
Set license = "MIT" and license-files = ["LICENSE"] (PEP 639), so the
wheel carries License-Expression: MIT and the LICENSE file. setuptools
reads license expressions from version 77, so require it; it also
rejects "License ::" classifiers beside an expression, so the
classifiers list leaves the license out.

Extend the copyright years to 2025-2026, note that the matching extra
installs rpy2 under GPL-2.0-or-later, and add the changelog fragment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The paper notebook imports policyengine-us and policyengine-core, which
carry AGPL-3.0, so the license section says so beside the rpy2 note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PyPI's project page shows the README, and a relative link to LICENSE
there would point into pypi.org instead of at the file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis merged commit d6f9ce4 into main Nov 8, 2026
7 checks passed
@MaxGhenis
MaxGhenis deleted the license-mit branch November 8, 2026 06:28

This branch was successfully deployed

1 active deployment
Preview — 696caec5 Deployed Nov 8, 2026 by vercel[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

microimpute has no licence, so all rights are reserved

2 participants