Skip to content

Commit fcc0809

Browse files
committed
chore(docs, licence): documentation has been updated and the recognition of codeclone license types for GitHub (dual-license model) has been improved. This change does not change the licensing model, but is of a technical nature.
1 parent 28534bd commit fcc0809

18 files changed

Lines changed: 254 additions & 132 deletions

LICENSE-MIT

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 Denis Rozhnovskiy
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.

LICENSE-docs

Lines changed: 0 additions & 25 deletions
This file was deleted.

LICENSES.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# License Scope
2+
3+
CodeClone uses a dual-license layout in this repository.
4+
5+
## Default mapping
6+
7+
- Source code and other implementation files are licensed under
8+
[MPL-2.0](LICENSE).
9+
- Documentation content, including the `docs/` tree and published docs-site
10+
content, is licensed under [MIT](LICENSE-MIT).
11+
12+
## File-level overrides
13+
14+
If a file or bundled third-party artifact includes its own license notice, that
15+
file-level notice takes precedence over this default mapping.
16+
17+
## Notes
18+
19+
- Keep [LICENSE](LICENSE) and [LICENSE-MIT](LICENSE-MIT) as canonical license
20+
texts for tooling and GitHub license detection.
21+
- Use this file to describe scope, not to redefine the underlying license
22+
texts.

README.md

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -283,11 +283,11 @@ Report contract: [Report contract](https://orenlab.github.io/codeclone/book/08-r
283283
[HTML render](https://orenlab.github.io/codeclone/book/10-html-render/)
284284

285285
<details>
286-
<summary>Canonical JSON report shape (v2.8)</summary>
286+
<summary>Canonical JSON report shape (v2.9)</summary>
287287

288288
```json
289289
{
290-
"report_schema_version": "2.8",
290+
"report_schema_version": "2.9",
291291
"meta": {
292292
"codeclone_version": "2.0.0b6",
293293
"project_name": "...",
@@ -356,15 +356,27 @@ Report contract: [Report contract](https://orenlab.github.io/codeclone/book/08-r
356356
"metrics": {
357357
"summary": {
358358
"...": "...",
359-
"coverage_adoption": { "...": "..." },
360-
"coverage_join": { "...": "..." },
361-
"api_surface": { "...": "..." }
359+
"coverage_adoption": {
360+
"...": "..."
361+
},
362+
"coverage_join": {
363+
"...": "..."
364+
},
365+
"api_surface": {
366+
"...": "..."
367+
}
362368
},
363369
"families": {
364370
"...": "...",
365-
"coverage_adoption": { "...": "..." },
366-
"coverage_join": { "...": "..." },
367-
"api_surface": { "...": "..." }
371+
"coverage_adoption": {
372+
"...": "..."
373+
},
374+
"coverage_join": {
375+
"...": "..."
376+
},
377+
"api_surface": {
378+
"...": "..."
379+
}
368380
}
369381
},
370382
"derived": {
@@ -470,8 +482,8 @@ in [Benchmarking contract](https://orenlab.github.io/codeclone/book/18-benchmark
470482

471483
## License
472484

473-
- **Code:** MPL-2.0
474-
- **Documentation:** MIT
485+
- **Code:** MPL-2.0 (`LICENSE`)
486+
- **Documentation and docs-site content:** MIT (`LICENSE-MIT`)
475487

476488
Versions released before this change remain under their original license terms.
477489

@@ -480,4 +492,4 @@ Versions released before this change remain under their original license terms.
480492
- **Docs:** <https://orenlab.github.io/codeclone/>
481493
- **Issues:** <https://github.com/orenlab/codeclone/issues>
482494
- **PyPI:** <https://pypi.org/project/codeclone/>
483-
- **Licenses:** [MPL-2.0](LICENSE) · [MIT docs](LICENSE-docs)
495+
- **Licenses:** [MPL-2.0](LICENSE) · [MIT docs](LICENSE-MIT) · [Scope map](LICENSES.md)

docs/README.md

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@ This site is built with MkDocs and published to
44
[orenlab.github.io/codeclone](https://orenlab.github.io/codeclone/).
55

66
!!! note "Version Notice"
7-
This site currently documents the in-development `v2.0.x` line from `main`.
8-
For the latest stable CodeClone documentation (`v1.4.4`), see the
9-
[`v1.4.4` README](https://github.com/orenlab/codeclone/blob/v1.4.4/README.md)
10-
and the
11-
[`v1.4.4` docs tree](https://github.com/orenlab/codeclone/tree/v1.4.4/docs).
7+
This site currently documents the in-development `v2.0.x` line from `main`.
8+
For the latest stable CodeClone documentation (`v1.4.4`), see the
9+
[`v1.4.4` README](https://github.com/orenlab/codeclone/blob/v1.4.4/README.md)
10+
and the
11+
[`v1.4.4` docs tree](https://github.com/orenlab/codeclone/tree/v1.4.4/docs).
12+
13+
!!! note "Repository licensing"
14+
CodeClone source code is licensed under MPL-2.0. Documentation content
15+
under `docs/` and the published docs site is licensed under MIT.
1216

1317
It has two documentation layers:
1418

@@ -91,13 +95,22 @@ help topics when the connected server exposes them.
9195

9296
## Local Preview
9397

94-
Build the docs site with MkDocs, then generate the sample report into the built
95-
site:
98+
=== "Build the site"
99+
100+
```bash title="Validate the docs site"
101+
uv run --with mkdocs --with mkdocs-material mkdocs build --strict
102+
```
103+
104+
=== "Build the site and sample report"
105+
106+
```bash title="Generate the live sample report into the built site"
107+
uv run --with mkdocs --with mkdocs-material mkdocs build --strict
108+
uv run python scripts/build_docs_example_report.py --output-dir site/examples/report/live
109+
```
96110

97-
```bash
98-
uv run --with mkdocs --with mkdocs-material mkdocs build --strict
99-
uv run python scripts/build_docs_example_report.py --output-dir site/examples/report/live
100-
```
111+
!!! note "Generated output"
112+
`site/` is generated output. It is used for local preview and GitHub Pages
113+
publishing, but it is not committed to git.
101114

102115
GitHub Pages publishing is handled by
103116
[`docs.yml`](https://github.com/orenlab/codeclone/blob/main/.github/workflows/docs.yml)

docs/book/04-config-and-defaults.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Fragment-level admission thresholds (pyproject.toml only, advanced tuning):
5353

5454
Example project-level config:
5555

56-
```toml
56+
```toml title="Minimal [tool.codeclone] configuration"
5757
[tool.codeclone]
5858
min_loc = 10
5959
min_stmt = 6
@@ -138,14 +138,17 @@ This is the exact accepted `[tool.codeclone]` key set from
138138
`codeclone/config/spec.py` and `codeclone/config/pyproject_loader.py`; unknown
139139
keys are contract errors.
140140

141-
Important:
142-
143-
- The tables above list `pyproject.toml` keys, not CLI flag spellings.
144-
- CLI flags may map to the same internal destination under a different name.
145-
Example: `coverage_xml` in `pyproject.toml` corresponds to CLI
146-
`--coverage FILE`.
147-
- The same pattern applies to report outputs such as `html_out``--html` and
148-
`json_out``--json`.
141+
!!! note "Pyproject keys vs CLI flags"
142+
The tables above list `[tool.codeclone]` keys, not CLI flag spellings.
143+
CLI flags may map to the same internal destination under a different name.
144+
Example: `coverage_xml` in `pyproject.toml` corresponds to CLI
145+
`--coverage FILE`. The same pattern applies to report outputs such as
146+
`html_out``--html` and `json_out``--json`.
147+
148+
!!! warning "Metrics-mode conflicts are enforced"
149+
Metrics update/gating flags are runtime contracts, not hints. Combinations
150+
such as `skip_metrics=true` together with metrics gating or metrics
151+
baseline update flags are contract errors.
149152

150153
Notes:
151154

docs/book/09-cli.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
Define observable CLI behavior: argument handling, summaries, output writing,
66
and exit routing.
77

8+
!!! note "Observable surface only"
9+
This chapter covers scripting-visible behavior and user-facing CLI output
10+
categories. Rich styling details may evolve as long as markers, exit
11+
semantics, and deterministic output contracts stay stable.
12+
813
## Public surface
914

1015
- Public entrypoint: `codeclone/main.py:main`
@@ -83,6 +88,11 @@ Refs:
8388

8489
## Failure modes
8590

91+
!!! warning "Failure precedence"
92+
Contract failures take precedence over gating failures. In CI and scripted
93+
flows, invalid config or unreadable sources must surface as exit `2` before
94+
any clone or metrics gate can fail with exit `3`.
95+
8696
| Condition | User-facing category | Exit |
8797
|-------------------------------------------------------------------|----------------------|------|
8898
| Invalid CLI flag | contract | `2` |

0 commit comments

Comments
 (0)