Skip to content

armgit / Soup

Public Imported from GitHub
0

Fine-tune LLMs from one YAML. Layer streaming trains an 8B model on a 4 GB laptop GPU.

chore(licence): restore Apache text and consistent notices (#1742)

Alpamys Makazhan2a7c44619fcd
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index 81d5193f..118f2266 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -16,3 +16,4 @@
- [ ] `pytest tests/ -v` passes
- [ ] Updated relevant docs (`README.md` and the matching page under `docs/`) if needed
- [ ] Added a changelog fragment, or this change has no user-visible impact
+- [ ] My contribution is licensed under Apache-2.0, the project's own terms (see `CONTRIBUTING.md`)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 02beb4eb..7215f40b 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -501,6 +501,8 @@ When you open a PR, the GitHub template will show this checklist:
- [ ] New tests added for new functionality
- [ ] No breaking changes (or documented in PR description)
+Contributions are accepted under the Apache License, Version 2.0, the project's own terms (section 5 of the license): by opening a pull request you agree that your contribution is licensed that way and you keep your copyright; there is no CLA and no DCO sign-off for now.
+
## Architecture & Design Decisions
### Lazy Imports for Speed
diff --git a/LICENSE b/LICENSE
index 0ce56bde..d6456956 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,3 +1,4 @@
+
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
@@ -137,8 +138,8 @@
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
- except as required for describing the origin of the Work and
- reproducing the content of the NOTICE file.
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
@@ -162,7 +163,7 @@
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
- 9. Accepting Warranty or Support. While redistributing
+ 9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
@@ -171,7 +172,7 @@
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or support.
+ of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
@@ -186,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
- Copyright 2025 Makazhan Alpamys
+ Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/NOTICE b/NOTICE
index bde5737c..886ed231 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,2 @@
Soup
-Copyright 2026 Makazhan Alpamys
-
-This product includes software developed by Makazhan Alpamys.
+Copyright 2026 Makazhan Alpamys and the Soup contributors
diff --git a/README.ar.md b/README.ar.md
index a2bd3439..57841588 100644
--- a/README.ar.md
+++ b/README.ar.md
@@ -1,4 +1,4 @@
-<!-- synced-from: README.md sha256:fa009c2fcc2c94ea06e25ea8620c2fbed9bfb8ac6611bf71a2669a06f7c50b46 -->
+<!-- synced-from: README.md sha256:7861d55b549aad1c5740d27f2fc72471270ed3011de8cbbf95ef23500e27fa99 -->
<p align="center">🌍 <a href="README.md">English</a> | <a href="README.tr.md">Türkçe</a> | <strong>العربية</strong> | <a href="README.ja.md">日本語</a> | <a href="README.zh.md">中文</a></p>
<p align="center">
@@ -488,4 +488,4 @@ Soup مرخَّص بـ Apache-2.0 ومجاني — وسيبقى كذلك. يُب
## الترخيص
-[Apache-2.0](LICENSE). حقوق النشر © مساهمو Soup.
+[Apache-2.0](LICENSE). Copyright 2026 Makazhan Alpamys and the Soup contributors. إذا أعدتَ توزيع Soup أو نسخة معدَّلة منه، فإن البندين 4 و6 من الترخيص ينطبقان عليك: احتفظ بالملفين `LICENSE` و`NOTICE` مع كل نسخة، وضع علامة على الملفات التي غيّرتها، ولا تستخدم اسم Soup إلا لبيان مصدر العمل.
diff --git a/README.ja.md b/README.ja.md
index 11bdcf38..3d431653 100644
--- a/README.ja.md
+++ b/README.ja.md
@@ -1,4 +1,4 @@
-<!-- synced-from: README.md sha256:fa009c2fcc2c94ea06e25ea8620c2fbed9bfb8ac6611bf71a2669a06f7c50b46 -->
+<!-- synced-from: README.md sha256:7861d55b549aad1c5740d27f2fc72471270ed3011de8cbbf95ef23500e27fa99 -->
<p align="center">🌍 <a href="README.md">English</a> | <a href="README.tr.md">Türkçe</a> | <a href="README.ar.md">العربية</a> | <strong>日本語</strong> | <a href="README.zh.md">中文</a></p>
<p align="center">
@@ -489,4 +489,4 @@ Soup に関するあらゆる件の正しい連絡先です。**makazanalpamys@g
## ライセンス
-[Apache-2.0](LICENSE)。Copyright © Soup コントリビューター。
+[Apache-2.0](LICENSE)。Copyright 2026 Makazhan Alpamys and the Soup contributors。Soup またはその改変コピーを再配布する場合は、ライセンスの第4条と第6条が適用されます。コピーごとに `LICENSE` と `NOTICE` を保持し、変更したファイルにその旨を明記し、作品の出所を述べる範囲を超えて Soup の名称を使用しないでください。
diff --git a/README.md b/README.md
index fc8acbd2..634fa799 100644
--- a/README.md
+++ b/README.md
@@ -497,4 +497,4 @@ were measured and then discarded.
## License
-[Apache-2.0](LICENSE). Copyright © the Soup contributors.
+[Apache-2.0](LICENSE). Copyright 2026 Makazhan Alpamys and the Soup contributors. If you redistribute Soup or a modified copy of it, sections 4 and 6 of the license apply to you: keep `LICENSE` and `NOTICE` with every copy, mark the files you changed, and do not use the Soup name beyond saying where the work comes from.
diff --git a/README.tr.md b/README.tr.md
index cdd1be4a..4198f017 100644
--- a/README.tr.md
+++ b/README.tr.md
@@ -1,4 +1,4 @@
-<!-- synced-from: README.md sha256:fa009c2fcc2c94ea06e25ea8620c2fbed9bfb8ac6611bf71a2669a06f7c50b46 -->
+<!-- synced-from: README.md sha256:7861d55b549aad1c5740d27f2fc72471270ed3011de8cbbf95ef23500e27fa99 -->
<p align="center">🌍 <a href="README.md">English</a> | <strong>Türkçe</strong> | <a href="README.ar.md">العربية</a> | <a href="README.ja.md">日本語</a> | <a href="README.zh.md">中文</a></p>
<p align="center">
@@ -501,4 +501,4 @@ dahil.
## Lisans
-[Apache-2.0](LICENSE). Telif hakkı © Soup katkıda bulunanları.
+[Apache-2.0](LICENSE). Copyright 2026 Makazhan Alpamys and the Soup contributors. Soup'u veya değiştirilmiş bir kopyasını yeniden dağıtırsanız lisansın 4. ve 6. maddeleri sizin için geçerlidir: her kopyayla birlikte `LICENSE` ve `NOTICE` dosyalarını koruyun, değiştirdiğiniz dosyaları işaretleyin ve Soup adını eserin kaynağını belirtmenin ötesinde kullanmayın.
diff --git a/README.zh.md b/README.zh.md
index f1755c3e..eb7f72c1 100644
--- a/README.zh.md
+++ b/README.zh.md
@@ -1,4 +1,4 @@
-<!-- synced-from: README.md sha256:fa009c2fcc2c94ea06e25ea8620c2fbed9bfb8ac6611bf71a2669a06f7c50b46 -->
+<!-- synced-from: README.md sha256:7861d55b549aad1c5740d27f2fc72471270ed3011de8cbbf95ef23500e27fa99 -->
<p align="center">🌍 <a href="README.md">English</a> | <a href="README.tr.md">Türkçe</a> | <a href="README.ar.md">العربية</a> | <a href="README.ja.md">日本語</a> | <strong>中文</strong></p>
<p align="center">
@@ -478,4 +478,4 @@ v1 以来的任何实测数字也没有变。v3 做的是**撤回一个我们曾
## 许可证
-[Apache-2.0](LICENSE)。版权 © Soup 贡献者们。
+[Apache-2.0](LICENSE)。Copyright 2026 Makazhan Alpamys and the Soup contributors。如果你再分发 Soup 或其修改版本,许可证的第 4 条和第 6 条对你适用:每份副本都要保留 `LICENSE` 和 `NOTICE`,在你改动过的文件上注明改动,并且除说明作品来源之外不要使用 Soup 这一名称。
diff --git a/changelog.d/0.76.0/1742.changed.md b/changelog.d/0.76.0/1742.changed.md
new file mode 100644
index 00000000..fd517d49
--- /dev/null
+++ b/changelog.d/0.76.0/1742.changed.md
@@ -0,0 +1,13 @@
+- **`LICENSE` is the published Apache-2.0 text again, the holder line is spelled once, and `license-files` is pinned (#1677 in #1742).**
+ `LICENSE` had drifted from the text on apache.org: section 6 lacked "reasonable and customary
+ use in" and section 9 read "Warranty or Support" where the published wording is "Warranty or
+ Additional Liability". It is now byte-identical to the published file, with the appendix left
+ as the standard template. `NOTICE`, the five READMEs, the package `authors` and one stray test
+ header now carry the same holder line, `Copyright 2026 Makazhan Alpamys and the Soup
+ contributors`, and `NOTICE` is reduced to the product name and that line. `pyproject.toml`
+ names `license-files = ["LICENSE", "NOTICE"]` instead of relying on hatchling's default globs;
+ `tests/test_issue1677_licence_files.py` fails if the key, either file, the two restored
+ passages or the holder line goes. The README points redistributors to sections 4 and 6 of the
+ licence, `CONTRIBUTING.md` and the PR template say that contributions are accepted under
+ Apache-2.0 (no CLA, no DCO), and `tests/fixtures/cyclonedx/README.md` records the sha256 of the
+ three vendored CycloneDX schemas.
diff --git a/pyproject.toml b/pyproject.toml
index f9a95925..00f2338b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -8,6 +8,9 @@ version = "0.76.0"
description = "Fine-tune and post-train LLMs in one command. No SSH, no config hell."
readme = "README.md"
license = "Apache-2.0"
+# Explicit, so the files that ship do not depend on hatchling's default globs (#1677).
+# An explicit list replaces the default: a file added later must be named here too.
+license-files = ["LICENSE", "NOTICE"]
# Upper-bounded on purpose (#358). CI tests 3.10 / 3.11 / 3.12 and nothing above.
# Without a ceiling, pip on 3.13+ resolves torch wheels nobody here has run, and
# the failure is not a Soup error message — it is a loader crash inside c10.dll /
@@ -16,7 +19,7 @@ license = "Apache-2.0"
# widening one without the other fails the suite.
requires-python = ">=3.10,<3.13"
authors = [
- { name = "Soup Team", email = "[email protected]" },
+ { name = "Makazhan Alpamys and the Soup contributors", email = "[email protected]" },
]
keywords = ["llm", "fine-tuning", "lora", "qlora", "machine-learning"]
classifiers = [
diff --git a/tests/fixtures/cyclonedx/README.md b/tests/fixtures/cyclonedx/README.md
index 8d9e796d..34bf1c1e 100644
--- a/tests/fixtures/cyclonedx/README.md
+++ b/tests/fixtures/cyclonedx/README.md
@@ -11,7 +11,21 @@ validate the documents `soup bom` writes without network access:
| `jsf-0.82.schema.json` | `schema/jsf-0.82.schema.json` | the JSON Signature Format schema the 1.6 `signature` property references |
The CycloneDX specification repository is licensed under the Apache License 2.0; the two schemas
-that carry a licence `$comment` upstream keep it here verbatim. `src/soup_cli/utils/spdx_license_ids.py`
-is generated from `spdx.schema.json` (a test keeps the two in step). Where notices for vendored
-material live repository-wide is being settled in #1677; this file records the provenance of these
-three until then.
+that carry a licence `$comment` upstream keep it here verbatim. The upstream repository has no
+`NOTICE` file at tag `1.6`, so there is nothing to carry over into this project's `NOTICE`.
+`src/soup_cli/utils/spdx_license_ids.py` is generated from `spdx.schema.json` (a test keeps the
+two in step).
+
+Third-party notices for vendored files live here, next to the files, and not in `NOTICE` or a
+separate notices file (#1677). The files are byte-identical to upstream; the sha256 of each, as
+committed (LF line endings, the same as upstream), lets that be checked without the network:
+
+| file | sha256 |
+|---|---|
+| `bom-1.6.schema.json` | `3e92dddbc30cf7f6a02b80f0942b1a4cfd4fb1c26f1dfc4310afa9d613cafb93` |
+| `jsf-0.82.schema.json` | `8bae002c25e723db7ee1f26afde680ae1a2b1a8f6b4b4b0fd65dc3becb090aae` |
+| `spdx.schema.json` | `baa9d3bd1ed57b6751b0887edead6b5063ff53ff7429cf85d476c6c94af0166e` |
+
+Check one with `git show HEAD:tests/fixtures/cyclonedx/bom-1.6.schema.json | sha256sum`; a
+Windows checkout with `core.autocrlf=true` rewrites the working-tree copy to CRLF, which hashes
+differently.
diff --git a/tests/test_issue1677_licence_files.py b/tests/test_issue1677_licence_files.py
new file mode 100644
index 00000000..ab4a5857
--- /dev/null
+++ b/tests/test_issue1677_licence_files.py
@@ -0,0 +1,100 @@
+"""The licence files are pinned in the package metadata and say the same thing (#1677).
+
+Until #1677 the wheel and the sdist carried ``LICENSE`` and ``NOTICE`` only because
+hatchling's default ``license-files`` globs happen to match them: ``pyproject.toml``
+named neither, and nothing failed if the default changed or a file was renamed. The
+``LICENSE`` itself had drifted from the published Apache-2.0 text (section 6 lost
+"reasonable and customary use in", section 9 said "Support" where the published text
+says "Additional Liability"), and four different holder spellings were in circulation.
+
+Three locks:
+
+1. ``[project] license-files`` names ``LICENSE`` and ``NOTICE``, and both exist.
+2. ``LICENSE`` carries the two passages that had drifted, and not the drifted wording.
+3. The holder line is one string in ``NOTICE``, the READMEs and the package authors.
+
+``pyproject.toml`` is read with a regex, not ``tomllib``, which is 3.11+ while this
+project supports 3.10 (same reason as ``test_requires_python_bound.py``).
+"""
+
+from __future__ import annotations
+
+import pathlib
+import re
+
+import pytest
+
+ROOT = pathlib.Path(__file__).resolve().parents[1]
+PYPROJECT = ROOT / "pyproject.toml"
+
+#: The one holder spelling. Change it here and in every file below together.
+HOLDER_NAME = "Makazhan Alpamys and the Soup contributors"
+HOLDER = f"Copyright 2026 {HOLDER_NAME}"
+README_NAMES = ["README.md", *sorted(path.name for path in ROOT.glob("README.*.md"))]
+
+_LICENSE_FILES = re.compile(r"^license-files\s*=\s*\[([^\]]*)\]", re.M)
+
+
+def _read(path: pathlib.Path) -> str:
+ """UTF-8 text with LF endings: a Windows checkout with autocrlf has CRLF."""
+ return path.read_text(encoding="utf-8").replace("\r\n", "\n")
+
+
+def _project_table(text: str) -> str:
+ project = re.search(r"^\[project\]\s*$(.*?)^\[", text, re.M | re.S)
+ assert project, "pyproject.toml has no [project] table"
+ return project.group(1)
+
+
+def _license_files(text: str) -> list[str]:
+ match = _LICENSE_FILES.search(_project_table(text))
+ assert match, "no license-files key in the [project] table of pyproject.toml"
+ return re.findall(r'"([^"]+)"', match.group(1))
+
+
+class TestLicenseFilesArePinned:
+ def test_project_table_lists_license_and_notice(self):
+ assert sorted(_license_files(_read(PYPROJECT))) == ["LICENSE", "NOTICE"]
+
+ @pytest.mark.parametrize("name", ["LICENSE", "NOTICE"])
+ def test_the_listed_file_exists_at_the_repo_root_and_is_not_empty(self, name):
+ path = ROOT / name
+ assert path.is_file(), f"{name} is listed in license-files but is not at the repo root"
+ assert _read(path).strip(), f"{name} is empty"
+
+ def test_the_scanner_can_fail_on_a_missing_key(self):
+ stripped = re.sub(r"^license-files", "licence-files", _read(PYPROJECT), flags=re.M)
+ assert stripped != _read(PYPROJECT) # CONTROL: the key was there to remove
+ with pytest.raises(AssertionError, match="no license-files key"):
+ _license_files(stripped)
+
+
+class TestLicenseIsThePublishedApacheText:
+ def test_section_9_says_additional_liability(self):
+ text = _read(ROOT / "LICENSE")
+ assert "9. Accepting Warranty or Additional Liability." in text
+ assert "warranty or additional liability." in text
+ assert "Warranty or Support" not in text
+
+ def test_section_6_says_reasonable_and_customary_use(self):
+ text = " ".join(_read(ROOT / "LICENSE").split())
+ assert "reasonable and customary use in describing the origin of the Work" in text
+
+ def test_the_appendix_is_the_unfilled_template(self):
+ assert "Copyright [yyyy] [name of copyright owner]" in _read(ROOT / "LICENSE")
+
+
+class TestHolderIsSpelledOnce:
+ def test_notice_is_the_product_name_and_the_holder_line(self):
+ assert _read(ROOT / "NOTICE").splitlines() == ["Soup", HOLDER]
+
+ @pytest.mark.parametrize("name", README_NAMES)
+ def test_every_readme_names_the_holder_in_english(self, name):
+ assert HOLDER in _read(ROOT / name)
+
+ def test_package_authors_use_the_holder_name(self):
+ text = _read(PYPROJECT)
+ authors = re.search(r"^authors\s*=\s*\[(.*?)^\]", _project_table(text), re.M | re.S)
+ assert authors, "no authors list in the [project] table of pyproject.toml"
+ assert HOLDER_NAME in authors.group(1)
+ assert "Soup Team" not in authors.group(1)
diff --git a/tests/test_recipe_sizes.py b/tests/test_recipe_sizes.py
index eda7b1a1..3b13eeba 100644
--- a/tests/test_recipe_sizes.py
+++ b/tests/test_recipe_sizes.py
@@ -1,4 +1,4 @@
-# Copyright 2026 Soup Authors.
+# Copyright 2026 Makazhan Alpamys and the Soup contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.