# ADR-0013: irtlib Is BSD-3-Clause and Holds No Translated Outside Code ## Status Accepted 2026-11-29 ## Context irtlib had no license, so its code could be read but not reused, and publishing to PyPI waited for one. The forces behind the choice: - catsim, which builds on irtlib (ADR-0004), NumPy and SciPy (ADR-0002) are under BSD-3-Clause. Copyleft on irtlib would reach every program that ships it, catsim included. - irtlib implements published methods, which anyone may implement again, so copyleft would protect little. - The maintainer holds the copyright of all the code, the code that moved from catsim included. - The parity tests compare irtlib with mirt and catR, both GPL (ADR-0003). Their fixtures record the inputs given to those packages and the outputs they return, and "The output of a program is not, in general, covered by the copyright on the code of the program" (GNU, *Frequently Asked Questions about the GNU Licenses*, https://www.gnu.org/licenses/gpl-faq.html#WhatCaseIsOutputGPL). - Until [#62](https://github.com/douglasrizzo/irtlib/pull/62), the weighted likelihood estimate refined its roots with a line-by-line translation of SciPy's `brentq.c`, which BSD-3-Clause allows only with SciPy's notice. Calling `brentq` itself moved no estimate by more than 1.1e-16 and made batches 2.3 to 8.3 times slower (measured 2026-11-29). ## Decision - irtlib's code, tests and documentation are under the BSD 3-Clause License, with the notice `Copyright (c) 2015-2026, Douglas De Rizzo Meneghetti`. The root `LICENSE` holds the standard text, unchanged, and `pyproject.toml` declares `license = "BSD-3-Clause"`. Files carry no license headers. - The logo, the files in `sphinx/logo/`, is outside that license: all rights reserved, with permission to show it unmodified to refer to irtlib (`sphinx/logo/LICENSE`). - Contributions come in under irtlib's license, as GitHub's Terms of Service set for a repository that shows one (section D.6, https://docs.github.com/en/site-policy/github-terms/github-terms-of-service), with no contributor agreement or sign-off. The notice adds "and the irtlib contributors" with the first substantial outside contribution. - irtlib translates no outside code, whatever its license: it calls a dependency, or writes the method from its published source. Matching another package's behaviour, such as its constants, its defaults or the order of a method's steps, is not translation. - Every runtime dependency and optional extra has a permissive license compatible with BSD-3-Clause. Development tools and the R packages that write the parity fixtures are outside the rule, since irtlib neither ships nor imports them. ## Consequences - Anyone may use, change and redistribute irtlib, in closed products too, as long as the notice stays, and nobody may use the names of its authors to promote what they derive from it. - A contributor keeps the copyright of their contribution, and its notice stays in every copy. - A routine that a dependency offers is called rather than copied, even where a copy would run faster. - A forked documentation site replaces the logo. - Adding a runtime dependency or an extra (ADR-0002) includes checking its license. ## Alternatives Considered - MIT: the same freedoms, without the clause on the authors' names; BSD-3-Clause is what catsim, NumPy and SciPy use. - Apache-2.0: an explicit patent grant, for decades-old published statistics, at the cost of a statement of changes in every file a redistributor modifies. - LGPL-3.0 or MPL-2.0: changes to irtlib itself would stay open, but their terms reach catsim's users, and catsim left LGPL-3.0 for BSD-3-Clause in 2025. - GPL-3.0, mirt's license: every program distributed with irtlib inside would have to be GPL, catsim included. - A contributor agreement or a sign-off on every commit: work for contributors, for rights BSD-3-Clause already gives. - CC-BY-4.0 for the documentation: a second license to state and scope.