Skip to content

Commit 89d9659

Browse files
authored
chore(license): add MIT license and SPDX metadata (#20)
Add the MIT License, SPDX package metadata, release-document updates, package-level license verification, and automated license contract tests.
1 parent 66c4649 commit 89d9659

8 files changed

Lines changed: 160 additions & 17 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ readiness.
1111
### Pending
1212

1313
- Continuous road-video validation using a naturally changing video source
14-
- Repository license selection and addition
1514
- Final decision on whether version 0.1.0 is a normal or prerelease release
1615

1716
## [0.1.0] - 2026-08-06
@@ -32,6 +31,7 @@ readiness.
3231
- CPU-only, non-root Docker packaging
3332
- GitHub Actions tests, linting, Docker build, and smoke validation
3433
- Release metadata, release notes, checklist, and package-build workflow
34+
- MIT License and SPDX package metadata
3535

3636
### Verified engineering results
3737

@@ -54,4 +54,3 @@ readiness.
5454
- Results are based on a limited balanced pilot rather than full-scale
5555
production training
5656
- The current runtime is CPU-only
57-
- The repository license has not yet been selected

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Nafiz Noyon
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ performance, and deployment-oriented engineering.
1414
- Release stage: engineering-preview preparation
1515
- Public GitHub Release: not published
1616
- Continuous road-video validation: pending until a suitable MP4 is supplied
17-
- Repository license selection: pending
17+
- Repository license: MIT
1818
- Model, dataset, video, and generated report artifacts: not bundled
1919

2020
Release preparation is documented in
@@ -304,14 +304,24 @@ Completed milestones:
304304
16. Representative multi-scene and resolution video validation
305305
17. CPU-only non-root Docker packaging and CI image validation
306306
18. Versioned release metadata and package-build preparation
307+
19. MIT License and SPDX package metadata
307308

308309
Current milestone:
309310

310311
```text
311-
release preparation in progress -> continuous road-video validation -> v0.1.0 release decision
312+
MIT licensing completed -> continuous road-video validation -> v0.1.0 release decision
312313
```
313314

314315
## Planned Technology Stack
315316

316317
Python, OpenCV, PyTorch, Ultralytics, NumPy, Pandas, ONNX, ONNX Runtime,
317318
TensorRT, Docker, and GitHub Actions.
319+
320+
## License
321+
322+
The source code in this repository is licensed under the
323+
[MIT License](LICENSE).
324+
325+
BDD100K data, trained model artifacts, external videos, and other
326+
third-party resources remain subject to their respective licenses,
327+
access rules, and redistribution terms.

docs/release_checklist.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ request does not create a tag or GitHub Release.
55

66
## Blocking decisions
77

8-
- [ ] Select and add an appropriate repository license
8+
- [x] Select and add the MIT License
99
- [ ] Complete continuous road-video validation using a user-supplied MP4,
1010
or explicitly classify version 0.1.0 as a prerelease
1111
- [ ] Review model and dataset redistribution restrictions
@@ -19,6 +19,8 @@ request does not create a tag or GitHub Release.
1919
- [ ] Ruff passes
2020
- [ ] Docker build and smoke job passes
2121
- [ ] Package version equals `0.1.0`
22+
- [ ] Package metadata declares SPDX license expression `MIT`
23+
- [ ] Built distributions include the `LICENSE` file
2224
- [ ] Package `__version__` equals `0.1.0`
2325
- [ ] Changelog contains the `0.1.0` entry
2426
- [ ] Release workflow validates the tag against package metadata

docs/releases/v0.1.0.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ described as production-ready.
2020
- Representative 360p, 720p, and 1080p multi-scene video validation
2121
- CPU-only non-root Docker packaging
2222
- GitHub Actions Python and Docker validation
23+
- MIT-licensed source code with SPDX package metadata
2324

2425
## Selected evidence
2526

@@ -51,18 +52,26 @@ This repository release does not bundle:
5152
Model and data artifacts must be supplied separately and must follow their
5253
respective licensing and distribution terms.
5354

55+
56+
## License
57+
58+
The repository source code is distributed under the MIT License.
59+
60+
This license does not replace or override the separate terms that
61+
apply to BDD100K data, model artifacts, input videos, or other
62+
third-party resources.
63+
5464
## Remaining blockers
5565

5666
The following items must be resolved or explicitly accepted before the tag
5767
is published:
5868

59-
1. Select and add a repository license.
60-
2. Complete continuous road-video validation when a suitable MP4 is
69+
1. Complete continuous road-video validation when a suitable MP4 is
6170
available, or mark the GitHub release as a prerelease.
62-
3. Review this release note against the final main commit.
63-
4. Confirm that no dataset, model, report, secret, or local environment file
71+
2. Review this release note against the final main commit.
72+
3. Confirm that no dataset, model, report, secret, or local environment file
6473
is included.
65-
5. Confirm both Python and Docker CI jobs pass on the release commit.
74+
4. Confirm both Python and Docker CI jobs pass on the release commit.
6675

6776
## Reproducibility statement
6877

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ name = "edge-traffic-vision"
77
version = "0.1.0"
88
description = "Edge-oriented traffic sign and road-object detection system."
99
readme = "README.md"
10+
license = "MIT"
11+
license-files = ["LICENSE"]
1012
requires-python = ">=3.12,<3.13"
1113
authors = [
1214
{ name = "Nafiz Noyon" }

tests/test_license_contract.py

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
import tomllib
2+
from pathlib import Path
3+
4+
PROJECT_ROOT = Path(__file__).resolve().parents[1]
5+
LICENSE_FILE = PROJECT_ROOT / "LICENSE"
6+
PYPROJECT = PROJECT_ROOT / "pyproject.toml"
7+
README = PROJECT_ROOT / "README.md"
8+
CHANGELOG = PROJECT_ROOT / "CHANGELOG.md"
9+
RELEASE_CHECKLIST = (
10+
PROJECT_ROOT
11+
/ "docs"
12+
/ "release_checklist.md"
13+
)
14+
RELEASE_NOTES = (
15+
PROJECT_ROOT
16+
/ "docs"
17+
/ "releases"
18+
/ "v0.1.0.md"
19+
)
20+
21+
22+
EXPECTED_LICENSE = """MIT License
23+
24+
Copyright (c) 2026 Nafiz Noyon
25+
26+
Permission is hereby granted, free of charge, to any person obtaining a copy
27+
of this software and associated documentation files (the "Software"), to deal
28+
in the Software without restriction, including without limitation the rights
29+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
30+
copies of the Software, and to permit persons to whom the Software is
31+
furnished to do so, subject to the following conditions:
32+
33+
The above copyright notice and this permission notice shall be included in all
34+
copies or substantial portions of the Software.
35+
36+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
37+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
38+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
39+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
40+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
41+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
42+
SOFTWARE.
43+
"""
44+
45+
46+
def load_metadata() -> dict:
47+
return tomllib.loads(
48+
PYPROJECT.read_text(encoding="utf-8")
49+
)
50+
51+
52+
def test_license_file_matches_mit_contract() -> None:
53+
assert LICENSE_FILE.is_file()
54+
assert (
55+
LICENSE_FILE.read_text(encoding="utf-8")
56+
== EXPECTED_LICENSE
57+
)
58+
59+
60+
def test_package_declares_pep639_mit_metadata() -> None:
61+
project = load_metadata()["project"]
62+
63+
assert project["license"] == "MIT"
64+
assert project["license-files"] == ["LICENSE"]
65+
assert not any(
66+
classifier.startswith("License ::")
67+
for classifier in project["classifiers"]
68+
)
69+
70+
71+
def test_readme_exposes_license_and_external_terms() -> None:
72+
text = README.read_text(encoding="utf-8")
73+
74+
assert "- Repository license: MIT" in text
75+
assert "## License" in text
76+
assert "[MIT License](LICENSE)" in text
77+
assert "third-party resources" in text
78+
assert "license selection: pending" not in text.lower()
79+
80+
81+
def test_changelog_records_resolved_license_work() -> None:
82+
text = CHANGELOG.read_text(encoding="utf-8")
83+
84+
assert "MIT License and SPDX package metadata" in text
85+
assert "Repository license selection and addition" not in text
86+
assert (
87+
"repository license has not yet been selected"
88+
not in text.lower()
89+
)
90+
91+
92+
def test_release_documents_resolve_license_blocker() -> None:
93+
checklist = RELEASE_CHECKLIST.read_text(encoding="utf-8")
94+
notes = RELEASE_NOTES.read_text(encoding="utf-8")
95+
96+
assert "- [x] Select and add the MIT License" in checklist
97+
assert "SPDX license expression `MIT`" in checklist
98+
assert "Built distributions include the `LICENSE` file" in checklist
99+
100+
assert "## License" in notes
101+
assert "distributed under the MIT License" in notes
102+
assert "Select and add a repository license" not in notes

tests/test_release_contract.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ def test_changelog_contains_release_and_pending_work() -> None:
101101
assert "## [Unreleased]" in text
102102
assert "## [0.1.0] - 2026-08-06" in text
103103
assert "Continuous road-video validation" in text
104-
assert "repository license" in text.lower()
104+
assert "MIT License and SPDX package metadata" in text
105+
assert "Repository license selection and addition" not in text
105106
assert "3.317x" in text
106107

107108

@@ -119,10 +120,7 @@ def test_release_notes_and_checklist_are_conservative() -> None:
119120
assert "does not bundle" in notes
120121
assert "continuous road-video validation" in notes.lower()
121122

122-
assert (
123-
"Select and add an appropriate repository license"
124-
in checklist
125-
)
123+
assert "- [x] Select and add the MIT License" in checklist
126124
assert "--prerelease" in checklist
127125
assert "git tag -a v0.1.0" in checklist
128126
assert "gh release create v0.1.0" in checklist
@@ -166,5 +164,5 @@ def test_readme_exposes_release_status_and_blockers() -> None:
166164
assert "## Release Status" in text
167165
assert "Package metadata version: `0.1.0`" in text
168166
assert "Continuous road-video validation" in text
169-
assert "license selection" in text.lower()
170-
assert "release preparation in progress" in text
167+
assert "Repository license: MIT" in text
168+
assert "MIT licensing completed" in text

0 commit comments

Comments
 (0)