release-note-readiness-desk 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- release_note_readiness_desk-0.1.0/LICENSE +22 -0
- release_note_readiness_desk-0.1.0/MANIFEST.in +4 -0
- release_note_readiness_desk-0.1.0/PKG-INFO +77 -0
- release_note_readiness_desk-0.1.0/README.md +57 -0
- release_note_readiness_desk-0.1.0/docs/screenshot.svg +20 -0
- release_note_readiness_desk-0.1.0/examples/release-draft.md +19 -0
- release_note_readiness_desk-0.1.0/pyproject.toml +30 -0
- release_note_readiness_desk-0.1.0/setup.cfg +4 -0
- release_note_readiness_desk-0.1.0/src/release_note_readiness/__init__.py +6 -0
- release_note_readiness_desk-0.1.0/src/release_note_readiness/cli.py +47 -0
- release_note_readiness_desk-0.1.0/src/release_note_readiness/core.py +332 -0
- release_note_readiness_desk-0.1.0/src/release_note_readiness/desktop.py +96 -0
- release_note_readiness_desk-0.1.0/src/release_note_readiness_desk.egg-info/PKG-INFO +77 -0
- release_note_readiness_desk-0.1.0/src/release_note_readiness_desk.egg-info/SOURCES.txt +16 -0
- release_note_readiness_desk-0.1.0/src/release_note_readiness_desk.egg-info/dependency_links.txt +1 -0
- release_note_readiness_desk-0.1.0/src/release_note_readiness_desk.egg-info/entry_points.txt +3 -0
- release_note_readiness_desk-0.1.0/src/release_note_readiness_desk.egg-info/top_level.txt +1 -0
- release_note_readiness_desk-0.1.0/tests/test_core.py +52 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Haider Sattar
|
|
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.
|
|
22
|
+
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: release-note-readiness-desk
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Local CLI and desktop checker for release note readiness gaps
|
|
5
|
+
Author: Haider Sattar
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Keywords: release-notes,changelog,product,qa,developer-tools
|
|
8
|
+
Classifier: Development Status :: 4 - Beta
|
|
9
|
+
Classifier: Environment :: Console
|
|
10
|
+
Classifier: Environment :: MacOS X
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
14
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
15
|
+
Classifier: Topic :: Text Processing
|
|
16
|
+
Requires-Python: >=3.10
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
License-File: LICENSE
|
|
19
|
+
Dynamic: license-file
|
|
20
|
+
|
|
21
|
+

|
|
22
|
+
|
|
23
|
+
# Release Note Readiness Desk
|
|
24
|
+
|
|
25
|
+
Release Note Readiness Desk checks changelog drafts, PR summaries, and release-note copy for gaps that usually cause avoidable release confusion: missing migration steps, unclear customer impact, vague bullets, unresolved placeholders, absent validation evidence, and missing rollback notes.
|
|
26
|
+
|
|
27
|
+
It runs locally as a CLI or a small Tkinter desktop app. There are no runtime dependencies.
|
|
28
|
+
|
|
29
|
+
## Install
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
python3 -m pip install release-note-readiness-desk
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## CLI
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
release-note-readiness examples/release-draft.md
|
|
39
|
+
release-note-readiness examples/release-draft.md --format html --output readiness.html
|
|
40
|
+
release-note-readiness CHANGELOG.md --fail-under 80 --fail-on-high
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Read from stdin:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
cat CHANGELOG.md | release-note-readiness --format json
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Desktop App
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
release-note-readiness-gui
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Paste a draft, click **Check**, then copy or save the Markdown report.
|
|
56
|
+
|
|
57
|
+
## What It Checks
|
|
58
|
+
|
|
59
|
+
- Breaking or high-risk changes without migration guidance
|
|
60
|
+
- Risky changes without customer impact language
|
|
61
|
+
- Missing validation or rollout evidence
|
|
62
|
+
- Missing rollback, revert, or feature-flag notes
|
|
63
|
+
- Draft placeholders such as `TODO` or `TBD`
|
|
64
|
+
- Vague entries like "minor updates" or "various fixes"
|
|
65
|
+
- Missing standard release-note categories
|
|
66
|
+
|
|
67
|
+
## Development
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
python3 -m unittest discover -s tests
|
|
71
|
+
python3 -m build --no-isolation
|
|
72
|
+
python3 -m twine check dist/*
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## License
|
|
76
|
+
|
|
77
|
+
MIT
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
# Release Note Readiness Desk
|
|
4
|
+
|
|
5
|
+
Release Note Readiness Desk checks changelog drafts, PR summaries, and release-note copy for gaps that usually cause avoidable release confusion: missing migration steps, unclear customer impact, vague bullets, unresolved placeholders, absent validation evidence, and missing rollback notes.
|
|
6
|
+
|
|
7
|
+
It runs locally as a CLI or a small Tkinter desktop app. There are no runtime dependencies.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
python3 -m pip install release-note-readiness-desk
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## CLI
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
release-note-readiness examples/release-draft.md
|
|
19
|
+
release-note-readiness examples/release-draft.md --format html --output readiness.html
|
|
20
|
+
release-note-readiness CHANGELOG.md --fail-under 80 --fail-on-high
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Read from stdin:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
cat CHANGELOG.md | release-note-readiness --format json
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Desktop App
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
release-note-readiness-gui
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Paste a draft, click **Check**, then copy or save the Markdown report.
|
|
36
|
+
|
|
37
|
+
## What It Checks
|
|
38
|
+
|
|
39
|
+
- Breaking or high-risk changes without migration guidance
|
|
40
|
+
- Risky changes without customer impact language
|
|
41
|
+
- Missing validation or rollout evidence
|
|
42
|
+
- Missing rollback, revert, or feature-flag notes
|
|
43
|
+
- Draft placeholders such as `TODO` or `TBD`
|
|
44
|
+
- Vague entries like "minor updates" or "various fixes"
|
|
45
|
+
- Missing standard release-note categories
|
|
46
|
+
|
|
47
|
+
## Development
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
python3 -m unittest discover -s tests
|
|
51
|
+
python3 -m build --no-isolation
|
|
52
|
+
python3 -m twine check dist/*
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## License
|
|
56
|
+
|
|
57
|
+
MIT
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1100" height="620" viewBox="0 0 1100 620" role="img" aria-label="Release Note Readiness desktop preview">
|
|
2
|
+
<rect width="1100" height="620" fill="#f7f8fb"/>
|
|
3
|
+
<rect x="34" y="30" width="1032" height="560" rx="8" fill="#ffffff" stroke="#d7dee9"/>
|
|
4
|
+
<rect x="34" y="30" width="1032" height="54" rx="8" fill="#17202a"/>
|
|
5
|
+
<text x="58" y="64" font-family="Arial, sans-serif" font-size="20" fill="#ffffff" font-weight="700">Release Note Readiness</text>
|
|
6
|
+
<rect x="58" y="112" width="470" height="430" rx="6" fill="#fbfcfe" stroke="#d7dee9"/>
|
|
7
|
+
<text x="78" y="145" font-family="Arial, sans-serif" font-size="16" fill="#17202a" font-weight="700">Draft</text>
|
|
8
|
+
<text x="78" y="184" font-family="Menlo, monospace" font-size="15" fill="#26313f"># Breaking</text>
|
|
9
|
+
<text x="78" y="214" font-family="Menlo, monospace" font-size="15" fill="#26313f">- Removed legacy invoice.status values</text>
|
|
10
|
+
<text x="78" y="244" font-family="Menlo, monospace" font-size="15" fill="#26313f"># Validation</text>
|
|
11
|
+
<text x="78" y="274" font-family="Menlo, monospace" font-size="15" fill="#26313f">- Verified with webhook replay tests</text>
|
|
12
|
+
<rect x="572" y="112" width="470" height="430" rx="6" fill="#fbfcfe" stroke="#d7dee9"/>
|
|
13
|
+
<text x="592" y="145" font-family="Arial, sans-serif" font-size="16" fill="#17202a" font-weight="700">Readiness Report</text>
|
|
14
|
+
<text x="592" y="194" font-family="Arial, sans-serif" font-size="48" fill="#175cd3" font-weight="800">89/100</text>
|
|
15
|
+
<rect x="592" y="222" width="76" height="28" rx="6" fill="#e7f0ff"/>
|
|
16
|
+
<text x="608" y="241" font-family="Arial, sans-serif" font-size="14" fill="#175cd3" font-weight="700">ready</text>
|
|
17
|
+
<text x="592" y="294" font-family="Arial, sans-serif" font-size="16" fill="#26313f">No blocking findings.</text>
|
|
18
|
+
<text x="592" y="338" font-family="Arial, sans-serif" font-size="16" fill="#26313f">Action: publish after owner review.</text>
|
|
19
|
+
</svg>
|
|
20
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Added
|
|
2
|
+
- Added workspace-level export for audit admins and customer success teams.
|
|
3
|
+
- Added API support for project-level usage summaries.
|
|
4
|
+
|
|
5
|
+
# Changed
|
|
6
|
+
- Changed invoice webhook payload defaults for developers.
|
|
7
|
+
- Updated admin settings layout after staging QA.
|
|
8
|
+
|
|
9
|
+
# Breaking
|
|
10
|
+
- Removed legacy invoice.status values from the public API.
|
|
11
|
+
|
|
12
|
+
# Migration
|
|
13
|
+
- Developers should map old invoice.status values to the documented open, paid, and void states before upgrading.
|
|
14
|
+
|
|
15
|
+
# Validation
|
|
16
|
+
- Verified in staging with webhook replay tests and canary monitoring.
|
|
17
|
+
|
|
18
|
+
# Rollback
|
|
19
|
+
- Release can be disabled with the invoice_webhook_v2 feature flag.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "release-note-readiness-desk"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Local CLI and desktop checker for release note readiness gaps"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
authors = [{name = "Haider Sattar"}]
|
|
13
|
+
keywords = ["release-notes", "changelog", "product", "qa", "developer-tools"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 4 - Beta",
|
|
16
|
+
"Environment :: Console",
|
|
17
|
+
"Environment :: MacOS X",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
21
|
+
"Topic :: Software Development :: Quality Assurance",
|
|
22
|
+
"Topic :: Text Processing",
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
[project.scripts]
|
|
26
|
+
release-note-readiness = "release_note_readiness.cli:main"
|
|
27
|
+
release-note-readiness-gui = "release_note_readiness.desktop:main"
|
|
28
|
+
|
|
29
|
+
[tool.setuptools.packages.find]
|
|
30
|
+
where = ["src"]
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import argparse
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
import sys
|
|
6
|
+
|
|
7
|
+
from .core import analyze_notes, format_html, format_json, format_markdown, format_text
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
FORMATTERS = {
|
|
11
|
+
"text": format_text,
|
|
12
|
+
"markdown": format_markdown,
|
|
13
|
+
"json": format_json,
|
|
14
|
+
"html": format_html,
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def build_parser() -> argparse.ArgumentParser:
|
|
19
|
+
parser = argparse.ArgumentParser(description="Check release note drafts for readiness gaps.")
|
|
20
|
+
parser.add_argument("path", nargs="?", help="Release note draft file. Reads stdin when omitted.")
|
|
21
|
+
parser.add_argument("--format", choices=sorted(FORMATTERS), default="markdown", help="Output format.")
|
|
22
|
+
parser.add_argument("--output", help="Write the report to a file.")
|
|
23
|
+
parser.add_argument("--fail-under", type=int, default=None, help="Exit 2 when readiness score is below this value.")
|
|
24
|
+
parser.add_argument("--fail-on-high", action="store_true", help="Exit 2 when high-severity findings are present.")
|
|
25
|
+
return parser
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def main(argv: list[str] | None = None) -> int:
|
|
29
|
+
parser = build_parser()
|
|
30
|
+
args = parser.parse_args(argv)
|
|
31
|
+
text = Path(args.path).read_text(encoding="utf-8") if args.path else sys.stdin.read()
|
|
32
|
+
report = analyze_notes(text)
|
|
33
|
+
rendered = FORMATTERS[args.format](report)
|
|
34
|
+
if args.output:
|
|
35
|
+
Path(args.output).write_text(rendered, encoding="utf-8")
|
|
36
|
+
else:
|
|
37
|
+
sys.stdout.write(rendered)
|
|
38
|
+
if args.fail_under is not None and report.score < args.fail_under:
|
|
39
|
+
return 2
|
|
40
|
+
if args.fail_on_high and any(finding.level == "high" for finding in report.findings):
|
|
41
|
+
return 2
|
|
42
|
+
return 0
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
if __name__ == "__main__":
|
|
46
|
+
raise SystemExit(main())
|
|
47
|
+
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from dataclasses import dataclass
|
|
4
|
+
import html
|
|
5
|
+
import json
|
|
6
|
+
import re
|
|
7
|
+
from typing import Iterable
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
CATEGORY_KEYWORDS = {
|
|
11
|
+
"breaking": ("breaking", "removed", "deprecate", "incompatible", "migration", "migrate"),
|
|
12
|
+
"security": ("security", "vulnerability", "cve", "permission", "auth", "token", "secret"),
|
|
13
|
+
"fixed": ("fix", "fixed", "bug", "patch", "resolve", "crash", "error"),
|
|
14
|
+
"added": ("add", "added", "new", "launch", "support", "introduce"),
|
|
15
|
+
"changed": ("change", "changed", "update", "improve", "refactor", "rename"),
|
|
16
|
+
"deprecated": ("deprecated", "sunset", "remove in", "end of life"),
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
SECTION_ALIASES = {
|
|
20
|
+
"added": "added",
|
|
21
|
+
"new": "added",
|
|
22
|
+
"fixed": "fixed",
|
|
23
|
+
"bug fixes": "fixed",
|
|
24
|
+
"changed": "changed",
|
|
25
|
+
"updated": "changed",
|
|
26
|
+
"breaking": "breaking",
|
|
27
|
+
"breaking changes": "breaking",
|
|
28
|
+
"migration": "migration",
|
|
29
|
+
"migrations": "migration",
|
|
30
|
+
"upgrade notes": "migration",
|
|
31
|
+
"security": "security",
|
|
32
|
+
"deprecated": "deprecated",
|
|
33
|
+
"known issues": "known-issues",
|
|
34
|
+
"rollback": "rollback",
|
|
35
|
+
"validation": "validation",
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
HIGH_RISK_TERMS = (
|
|
39
|
+
"breaking",
|
|
40
|
+
"remove",
|
|
41
|
+
"deleted",
|
|
42
|
+
"migration",
|
|
43
|
+
"schema",
|
|
44
|
+
"database",
|
|
45
|
+
"billing",
|
|
46
|
+
"invoice",
|
|
47
|
+
"auth",
|
|
48
|
+
"permission",
|
|
49
|
+
"security",
|
|
50
|
+
"token",
|
|
51
|
+
"api",
|
|
52
|
+
"webhook",
|
|
53
|
+
"default",
|
|
54
|
+
"deprecate",
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
VALIDATION_TERMS = ("tested", "verified", "qa", "rollout", "canary", "staging", "monitor")
|
|
58
|
+
ROLLBACK_TERMS = ("rollback", "revert", "feature flag", "kill switch", "disable")
|
|
59
|
+
CUSTOMER_TERMS = ("customer", "user", "admin", "developer", "tenant", "account", "workspace")
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
@dataclass(frozen=True)
|
|
63
|
+
class Section:
|
|
64
|
+
name: str
|
|
65
|
+
items: tuple[str, ...]
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
@dataclass(frozen=True)
|
|
69
|
+
class Finding:
|
|
70
|
+
level: str
|
|
71
|
+
title: str
|
|
72
|
+
detail: str
|
|
73
|
+
evidence: tuple[str, ...] = ()
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
@dataclass(frozen=True)
|
|
77
|
+
class ReleaseNoteReport:
|
|
78
|
+
score: int
|
|
79
|
+
readiness: str
|
|
80
|
+
sections: tuple[Section, ...]
|
|
81
|
+
findings: tuple[Finding, ...]
|
|
82
|
+
action_items: tuple[str, ...]
|
|
83
|
+
summary: str
|
|
84
|
+
|
|
85
|
+
def to_dict(self) -> dict:
|
|
86
|
+
return {
|
|
87
|
+
"score": self.score,
|
|
88
|
+
"readiness": self.readiness,
|
|
89
|
+
"summary": self.summary,
|
|
90
|
+
"sections": [{"name": section.name, "items": list(section.items)} for section in self.sections],
|
|
91
|
+
"findings": [
|
|
92
|
+
{
|
|
93
|
+
"level": finding.level,
|
|
94
|
+
"title": finding.title,
|
|
95
|
+
"detail": finding.detail,
|
|
96
|
+
"evidence": list(finding.evidence),
|
|
97
|
+
}
|
|
98
|
+
for finding in self.findings
|
|
99
|
+
],
|
|
100
|
+
"action_items": list(self.action_items),
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
def analyze_notes(text: str) -> ReleaseNoteReport:
|
|
105
|
+
cleaned = text.strip()
|
|
106
|
+
sections = _parse_sections(cleaned)
|
|
107
|
+
items = [item for section in sections for item in section.items]
|
|
108
|
+
findings: list[Finding] = []
|
|
109
|
+
|
|
110
|
+
if not cleaned:
|
|
111
|
+
findings.append(Finding("high", "No release notes supplied", "Paste a draft or changelog before publishing."))
|
|
112
|
+
return ReleaseNoteReport(0, "blocked", tuple(), tuple(findings), ("Add release notes.",), "No usable release note content was found.")
|
|
113
|
+
|
|
114
|
+
if len(items) < 2:
|
|
115
|
+
findings.append(Finding("medium", "Very thin draft", "The note has too few concrete items to support release review."))
|
|
116
|
+
|
|
117
|
+
has_customer_impact = _contains_any(cleaned, CUSTOMER_TERMS)
|
|
118
|
+
has_validation = _contains_any(cleaned, VALIDATION_TERMS) or _has_section(sections, "validation")
|
|
119
|
+
has_rollback = _contains_any(cleaned, ROLLBACK_TERMS) or _has_section(sections, "rollback")
|
|
120
|
+
has_migration = _has_section(sections, "migration") or _contains_any(cleaned, ("migration", "migrate", "upgrade"))
|
|
121
|
+
risky_items = tuple(item for item in items if _contains_any(item, HIGH_RISK_TERMS))
|
|
122
|
+
breaking_items = tuple(item for item in items if _classify_item(item) == "breaking")
|
|
123
|
+
vague_items = tuple(item for item in items if _is_vague(item))
|
|
124
|
+
placeholder_items = tuple(item for item in items if re.search(r"\b(tbd|todo|fixme|lorem|placeholder|xxx)\b", item, re.I))
|
|
125
|
+
|
|
126
|
+
if risky_items and not has_customer_impact:
|
|
127
|
+
findings.append(Finding("high", "Customer impact missing", "Risky changes should say who is affected and what changes for them.", risky_items[:3]))
|
|
128
|
+
if (risky_items or breaking_items) and not has_migration:
|
|
129
|
+
findings.append(Finding("high", "Migration notes missing", "Breaking or high-risk changes need explicit upgrade or migration guidance.", breaking_items[:3] or risky_items[:3]))
|
|
130
|
+
if risky_items and not has_validation:
|
|
131
|
+
findings.append(Finding("medium", "Validation evidence missing", "Include how the change was tested, staged, or monitored.", risky_items[:3]))
|
|
132
|
+
if risky_items and not has_rollback:
|
|
133
|
+
findings.append(Finding("medium", "Rollback note missing", "High-risk releases should include a rollback or disable path.", risky_items[:3]))
|
|
134
|
+
if placeholder_items:
|
|
135
|
+
findings.append(Finding("high", "Draft placeholders remain", "Remove unresolved placeholders before publishing.", placeholder_items[:3]))
|
|
136
|
+
if vague_items:
|
|
137
|
+
findings.append(Finding("medium", "Vague entries", "Rewrite vague entries so readers can understand the shipped behavior.", vague_items[:4]))
|
|
138
|
+
if not _has_any_release_category(sections, items):
|
|
139
|
+
findings.append(Finding("medium", "No recognizable release categories", "Use clear Added, Changed, Fixed, Security, Deprecated, or Breaking sections."))
|
|
140
|
+
|
|
141
|
+
score = _score(findings, sections, items, has_customer_impact, has_validation, has_rollback)
|
|
142
|
+
has_high = any(finding.level == "high" for finding in findings)
|
|
143
|
+
readiness = "blocked" if has_high else "ready" if score >= 85 else "needs review" if score >= 65 else "blocked"
|
|
144
|
+
action_items = _action_items(findings)
|
|
145
|
+
summary = _summary(score, readiness, sections, findings)
|
|
146
|
+
return ReleaseNoteReport(score, readiness, sections, tuple(findings), action_items, summary)
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
def format_markdown(report: ReleaseNoteReport) -> str:
|
|
150
|
+
lines = [
|
|
151
|
+
"# Release Note Readiness",
|
|
152
|
+
"",
|
|
153
|
+
f"Score: **{report.score}/100**",
|
|
154
|
+
f"Status: **{report.readiness}**",
|
|
155
|
+
"",
|
|
156
|
+
report.summary,
|
|
157
|
+
"",
|
|
158
|
+
"## Findings",
|
|
159
|
+
]
|
|
160
|
+
if report.findings:
|
|
161
|
+
for finding in report.findings:
|
|
162
|
+
lines.append(f"- **{finding.level.upper()} - {finding.title}:** {finding.detail}")
|
|
163
|
+
for evidence in finding.evidence:
|
|
164
|
+
lines.append(f" - Evidence: {evidence}")
|
|
165
|
+
else:
|
|
166
|
+
lines.append("- No blocking findings.")
|
|
167
|
+
lines.extend(["", "## Action Items"])
|
|
168
|
+
for item in report.action_items:
|
|
169
|
+
lines.append(f"- {item}")
|
|
170
|
+
lines.extend(["", "## Parsed Sections"])
|
|
171
|
+
for section in report.sections:
|
|
172
|
+
lines.append(f"### {section.name.title()}")
|
|
173
|
+
for item in section.items:
|
|
174
|
+
lines.append(f"- {item}")
|
|
175
|
+
return "\n".join(lines).rstrip() + "\n"
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
def format_text(report: ReleaseNoteReport) -> str:
|
|
179
|
+
lines = [f"Release Note Readiness: {report.score}/100 ({report.readiness})", report.summary, ""]
|
|
180
|
+
lines.append("Findings:")
|
|
181
|
+
if report.findings:
|
|
182
|
+
for finding in report.findings:
|
|
183
|
+
lines.append(f"- {finding.level.upper()}: {finding.title} - {finding.detail}")
|
|
184
|
+
else:
|
|
185
|
+
lines.append("- No blocking findings.")
|
|
186
|
+
lines.append("")
|
|
187
|
+
lines.append("Action items:")
|
|
188
|
+
for item in report.action_items:
|
|
189
|
+
lines.append(f"- {item}")
|
|
190
|
+
return "\n".join(lines).rstrip() + "\n"
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
def format_json(report: ReleaseNoteReport) -> str:
|
|
194
|
+
return json.dumps(report.to_dict(), indent=2) + "\n"
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
def format_html(report: ReleaseNoteReport) -> str:
|
|
198
|
+
finding_cards = "\n".join(
|
|
199
|
+
f"<li class='{html.escape(f.level)}'><strong>{html.escape(f.level.upper())}: {html.escape(f.title)}</strong><p>{html.escape(f.detail)}</p></li>"
|
|
200
|
+
for f in report.findings
|
|
201
|
+
) or "<li>No blocking findings.</li>"
|
|
202
|
+
sections = "\n".join(
|
|
203
|
+
f"<section><h3>{html.escape(section.name.title())}</h3><ul>{''.join(f'<li>{html.escape(item)}</li>' for item in section.items)}</ul></section>"
|
|
204
|
+
for section in report.sections
|
|
205
|
+
)
|
|
206
|
+
actions = "".join(f"<li>{html.escape(item)}</li>" for item in report.action_items)
|
|
207
|
+
return f"""<!doctype html>
|
|
208
|
+
<html lang="en">
|
|
209
|
+
<head>
|
|
210
|
+
<meta charset="utf-8">
|
|
211
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
212
|
+
<title>Release Note Readiness</title>
|
|
213
|
+
<style>
|
|
214
|
+
body {{ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; margin: 0; color: #17202a; background: #f7f8fb; }}
|
|
215
|
+
main {{ max-width: 980px; margin: 0 auto; padding: 32px 20px; }}
|
|
216
|
+
.hero {{ background: #ffffff; border: 1px solid #d9e0ea; border-radius: 8px; padding: 24px; }}
|
|
217
|
+
.score {{ font-size: 44px; font-weight: 750; margin: 0; }}
|
|
218
|
+
.status {{ display: inline-block; margin-top: 8px; padding: 5px 10px; border-radius: 6px; background: #e7f0ff; }}
|
|
219
|
+
li {{ margin: 8px 0; }}
|
|
220
|
+
.high strong {{ color: #9f1d1d; }}
|
|
221
|
+
.medium strong {{ color: #8a5a00; }}
|
|
222
|
+
section, .panel {{ background: #ffffff; border: 1px solid #d9e0ea; border-radius: 8px; margin-top: 16px; padding: 18px; }}
|
|
223
|
+
</style>
|
|
224
|
+
</head>
|
|
225
|
+
<body>
|
|
226
|
+
<main>
|
|
227
|
+
<div class="hero">
|
|
228
|
+
<p class="score">{report.score}/100</p>
|
|
229
|
+
<span class="status">{html.escape(report.readiness)}</span>
|
|
230
|
+
<p>{html.escape(report.summary)}</p>
|
|
231
|
+
</div>
|
|
232
|
+
<div class="panel"><h2>Findings</h2><ul>{finding_cards}</ul></div>
|
|
233
|
+
<div class="panel"><h2>Action Items</h2><ul>{actions}</ul></div>
|
|
234
|
+
<h2>Parsed Sections</h2>
|
|
235
|
+
{sections}
|
|
236
|
+
</main>
|
|
237
|
+
</body>
|
|
238
|
+
</html>
|
|
239
|
+
"""
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
def _parse_sections(text: str) -> tuple[Section, ...]:
|
|
243
|
+
current = "uncategorized"
|
|
244
|
+
buckets: dict[str, list[str]] = {current: []}
|
|
245
|
+
for raw_line in text.splitlines():
|
|
246
|
+
line = raw_line.strip()
|
|
247
|
+
if not line:
|
|
248
|
+
continue
|
|
249
|
+
heading = re.sub(r"^#+\s*", "", line).strip(" :")
|
|
250
|
+
heading_key = SECTION_ALIASES.get(heading.lower())
|
|
251
|
+
if heading_key and (raw_line.lstrip().startswith("#") or not re.match(r"^[-*]\s+", line)):
|
|
252
|
+
current = heading_key
|
|
253
|
+
buckets.setdefault(current, [])
|
|
254
|
+
continue
|
|
255
|
+
item = re.sub(r"^[-*]\s+|\d+[.)]\s+", "", line).strip()
|
|
256
|
+
if item:
|
|
257
|
+
category = current if current != "uncategorized" else _classify_item(item)
|
|
258
|
+
buckets.setdefault(category, []).append(item)
|
|
259
|
+
return tuple(Section(name, tuple(values)) for name, values in buckets.items() if values)
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
def _classify_item(item: str) -> str:
|
|
263
|
+
lower = item.lower()
|
|
264
|
+
for category, keywords in CATEGORY_KEYWORDS.items():
|
|
265
|
+
if any(keyword in lower for keyword in keywords):
|
|
266
|
+
return category
|
|
267
|
+
return "uncategorized"
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
def _contains_any(text: str, terms: Iterable[str]) -> bool:
|
|
271
|
+
lower = text.lower()
|
|
272
|
+
return any(term in lower for term in terms)
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
def _has_section(sections: Iterable[Section], name: str) -> bool:
|
|
276
|
+
return any(section.name == name and section.items for section in sections)
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
def _has_any_release_category(sections: tuple[Section, ...], items: list[str]) -> bool:
|
|
280
|
+
known = {"added", "fixed", "changed", "breaking", "security", "deprecated"}
|
|
281
|
+
return any(section.name in known for section in sections) or any(_classify_item(item) in known for item in items)
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
def _is_vague(item: str) -> bool:
|
|
285
|
+
lower = item.lower()
|
|
286
|
+
if len(item.split()) <= 4:
|
|
287
|
+
return True
|
|
288
|
+
return any(phrase in lower for phrase in ("various fixes", "minor updates", "improvements", "misc cleanup", "better stuff"))
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
def _score(findings: tuple[Finding, ...] | list[Finding], sections: tuple[Section, ...], items: list[str], has_customer: bool, has_validation: bool, has_rollback: bool) -> int:
|
|
292
|
+
score = 100
|
|
293
|
+
for finding in findings:
|
|
294
|
+
score -= 22 if finding.level == "high" else 11 if finding.level == "medium" else 5
|
|
295
|
+
if len(sections) >= 3:
|
|
296
|
+
score += 4
|
|
297
|
+
if len(items) >= 5:
|
|
298
|
+
score += 4
|
|
299
|
+
if has_customer:
|
|
300
|
+
score += 4
|
|
301
|
+
if has_validation:
|
|
302
|
+
score += 4
|
|
303
|
+
if has_rollback:
|
|
304
|
+
score += 3
|
|
305
|
+
if any(finding.level == "high" for finding in findings):
|
|
306
|
+
score = min(score, 64)
|
|
307
|
+
return max(0, min(100, score))
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
def _action_items(findings: tuple[Finding, ...] | list[Finding]) -> tuple[str, ...]:
|
|
311
|
+
if not findings:
|
|
312
|
+
return ("Publish after final owner review.",)
|
|
313
|
+
mapping = {
|
|
314
|
+
"Customer impact missing": "Add a customer-impact sentence for every high-risk change.",
|
|
315
|
+
"Migration notes missing": "Write upgrade, compatibility, or migration steps for breaking changes.",
|
|
316
|
+
"Validation evidence missing": "Add test, rollout, staging, or monitoring evidence.",
|
|
317
|
+
"Rollback note missing": "Document rollback, revert, or feature-flag controls.",
|
|
318
|
+
"Draft placeholders remain": "Replace placeholders with final release details.",
|
|
319
|
+
"Vague entries": "Rewrite vague bullets into specific shipped behavior.",
|
|
320
|
+
"No recognizable release categories": "Group entries under standard release note headings.",
|
|
321
|
+
"Very thin draft": "Add concrete bullets for the main changes.",
|
|
322
|
+
"No release notes supplied": "Add release note content.",
|
|
323
|
+
}
|
|
324
|
+
return tuple(dict.fromkeys(mapping.get(finding.title, finding.detail) for finding in findings))
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
def _summary(score: int, readiness: str, sections: tuple[Section, ...], findings: tuple[Finding, ...]) -> str:
|
|
328
|
+
section_names = ", ".join(section.name for section in sections) or "no sections"
|
|
329
|
+
if not findings:
|
|
330
|
+
return f"The draft is {readiness} with clear coverage across {section_names}."
|
|
331
|
+
high_count = sum(1 for finding in findings if finding.level == "high")
|
|
332
|
+
return f"The draft scored {score}/100 across {section_names}; {high_count} high-risk gap(s) need attention."
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
import tkinter as tk
|
|
5
|
+
from tkinter import filedialog, messagebox, ttk
|
|
6
|
+
|
|
7
|
+
from .core import analyze_notes, format_markdown
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
SAMPLE = """# Added
|
|
11
|
+
- Added workspace-level export for audit admins.
|
|
12
|
+
|
|
13
|
+
# Changed
|
|
14
|
+
- Changed invoice webhook payload defaults for developers.
|
|
15
|
+
|
|
16
|
+
# Breaking
|
|
17
|
+
- Removed legacy invoice.status values from the public API.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class ReleaseNoteApp(tk.Tk):
|
|
22
|
+
def __init__(self) -> None:
|
|
23
|
+
super().__init__()
|
|
24
|
+
self.title("Release Note Readiness")
|
|
25
|
+
self.geometry("1120x720")
|
|
26
|
+
self.minsize(880, 560)
|
|
27
|
+
self._build()
|
|
28
|
+
self.input.insert("1.0", SAMPLE)
|
|
29
|
+
self.run_check()
|
|
30
|
+
|
|
31
|
+
def _build(self) -> None:
|
|
32
|
+
self.columnconfigure(0, weight=1)
|
|
33
|
+
self.columnconfigure(1, weight=1)
|
|
34
|
+
self.rowconfigure(1, weight=1)
|
|
35
|
+
|
|
36
|
+
toolbar = ttk.Frame(self, padding=(10, 8))
|
|
37
|
+
toolbar.grid(row=0, column=0, columnspan=2, sticky="ew")
|
|
38
|
+
ttk.Button(toolbar, text="Open", command=self.open_file).pack(side="left")
|
|
39
|
+
ttk.Button(toolbar, text="Check", command=self.run_check).pack(side="left", padx=6)
|
|
40
|
+
ttk.Button(toolbar, text="Copy Report", command=self.copy_report).pack(side="left")
|
|
41
|
+
ttk.Button(toolbar, text="Save Report", command=self.save_report).pack(side="left", padx=6)
|
|
42
|
+
self.status = ttk.Label(toolbar, text="")
|
|
43
|
+
self.status.pack(side="right")
|
|
44
|
+
|
|
45
|
+
left = ttk.Frame(self, padding=(10, 0, 5, 10))
|
|
46
|
+
left.grid(row=1, column=0, sticky="nsew")
|
|
47
|
+
left.rowconfigure(1, weight=1)
|
|
48
|
+
left.columnconfigure(0, weight=1)
|
|
49
|
+
ttk.Label(left, text="Draft").grid(row=0, column=0, sticky="w")
|
|
50
|
+
self.input = tk.Text(left, wrap="word", undo=True)
|
|
51
|
+
self.input.grid(row=1, column=0, sticky="nsew")
|
|
52
|
+
|
|
53
|
+
right = ttk.Frame(self, padding=(5, 0, 10, 10))
|
|
54
|
+
right.grid(row=1, column=1, sticky="nsew")
|
|
55
|
+
right.rowconfigure(1, weight=1)
|
|
56
|
+
right.columnconfigure(0, weight=1)
|
|
57
|
+
ttk.Label(right, text="Readiness Report").grid(row=0, column=0, sticky="w")
|
|
58
|
+
self.output = tk.Text(right, wrap="word")
|
|
59
|
+
self.output.grid(row=1, column=0, sticky="nsew")
|
|
60
|
+
|
|
61
|
+
def open_file(self) -> None:
|
|
62
|
+
path = filedialog.askopenfilename(filetypes=[("Text files", "*.md *.txt"), ("All files", "*.*")])
|
|
63
|
+
if not path:
|
|
64
|
+
return
|
|
65
|
+
self.input.delete("1.0", "end")
|
|
66
|
+
self.input.insert("1.0", Path(path).read_text(encoding="utf-8"))
|
|
67
|
+
self.run_check()
|
|
68
|
+
|
|
69
|
+
def run_check(self) -> None:
|
|
70
|
+
report = analyze_notes(self.input.get("1.0", "end"))
|
|
71
|
+
rendered = format_markdown(report)
|
|
72
|
+
self.output.delete("1.0", "end")
|
|
73
|
+
self.output.insert("1.0", rendered)
|
|
74
|
+
self.status.config(text=f"{report.score}/100 - {report.readiness}")
|
|
75
|
+
|
|
76
|
+
def copy_report(self) -> None:
|
|
77
|
+
self.clipboard_clear()
|
|
78
|
+
self.clipboard_append(self.output.get("1.0", "end").strip())
|
|
79
|
+
self.status.config(text="Copied report")
|
|
80
|
+
|
|
81
|
+
def save_report(self) -> None:
|
|
82
|
+
path = filedialog.asksaveasfilename(defaultextension=".md", filetypes=[("Markdown", "*.md"), ("Text", "*.txt")])
|
|
83
|
+
if not path:
|
|
84
|
+
return
|
|
85
|
+
Path(path).write_text(self.output.get("1.0", "end"), encoding="utf-8")
|
|
86
|
+
messagebox.showinfo("Saved", f"Report saved to {path}")
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def main() -> None:
|
|
90
|
+
app = ReleaseNoteApp()
|
|
91
|
+
app.mainloop()
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
if __name__ == "__main__":
|
|
95
|
+
main()
|
|
96
|
+
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: release-note-readiness-desk
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Local CLI and desktop checker for release note readiness gaps
|
|
5
|
+
Author: Haider Sattar
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Keywords: release-notes,changelog,product,qa,developer-tools
|
|
8
|
+
Classifier: Development Status :: 4 - Beta
|
|
9
|
+
Classifier: Environment :: Console
|
|
10
|
+
Classifier: Environment :: MacOS X
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
14
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
15
|
+
Classifier: Topic :: Text Processing
|
|
16
|
+
Requires-Python: >=3.10
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
License-File: LICENSE
|
|
19
|
+
Dynamic: license-file
|
|
20
|
+
|
|
21
|
+

|
|
22
|
+
|
|
23
|
+
# Release Note Readiness Desk
|
|
24
|
+
|
|
25
|
+
Release Note Readiness Desk checks changelog drafts, PR summaries, and release-note copy for gaps that usually cause avoidable release confusion: missing migration steps, unclear customer impact, vague bullets, unresolved placeholders, absent validation evidence, and missing rollback notes.
|
|
26
|
+
|
|
27
|
+
It runs locally as a CLI or a small Tkinter desktop app. There are no runtime dependencies.
|
|
28
|
+
|
|
29
|
+
## Install
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
python3 -m pip install release-note-readiness-desk
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## CLI
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
release-note-readiness examples/release-draft.md
|
|
39
|
+
release-note-readiness examples/release-draft.md --format html --output readiness.html
|
|
40
|
+
release-note-readiness CHANGELOG.md --fail-under 80 --fail-on-high
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Read from stdin:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
cat CHANGELOG.md | release-note-readiness --format json
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Desktop App
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
release-note-readiness-gui
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Paste a draft, click **Check**, then copy or save the Markdown report.
|
|
56
|
+
|
|
57
|
+
## What It Checks
|
|
58
|
+
|
|
59
|
+
- Breaking or high-risk changes without migration guidance
|
|
60
|
+
- Risky changes without customer impact language
|
|
61
|
+
- Missing validation or rollout evidence
|
|
62
|
+
- Missing rollback, revert, or feature-flag notes
|
|
63
|
+
- Draft placeholders such as `TODO` or `TBD`
|
|
64
|
+
- Vague entries like "minor updates" or "various fixes"
|
|
65
|
+
- Missing standard release-note categories
|
|
66
|
+
|
|
67
|
+
## Development
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
python3 -m unittest discover -s tests
|
|
71
|
+
python3 -m build --no-isolation
|
|
72
|
+
python3 -m twine check dist/*
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## License
|
|
76
|
+
|
|
77
|
+
MIT
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
MANIFEST.in
|
|
3
|
+
README.md
|
|
4
|
+
pyproject.toml
|
|
5
|
+
docs/screenshot.svg
|
|
6
|
+
examples/release-draft.md
|
|
7
|
+
src/release_note_readiness/__init__.py
|
|
8
|
+
src/release_note_readiness/cli.py
|
|
9
|
+
src/release_note_readiness/core.py
|
|
10
|
+
src/release_note_readiness/desktop.py
|
|
11
|
+
src/release_note_readiness_desk.egg-info/PKG-INFO
|
|
12
|
+
src/release_note_readiness_desk.egg-info/SOURCES.txt
|
|
13
|
+
src/release_note_readiness_desk.egg-info/dependency_links.txt
|
|
14
|
+
src/release_note_readiness_desk.egg-info/entry_points.txt
|
|
15
|
+
src/release_note_readiness_desk.egg-info/top_level.txt
|
|
16
|
+
tests/test_core.py
|
release_note_readiness_desk-0.1.0/src/release_note_readiness_desk.egg-info/dependency_links.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
release_note_readiness
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import unittest
|
|
2
|
+
|
|
3
|
+
from release_note_readiness.core import analyze_notes, format_json, format_markdown
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class CoreTests(unittest.TestCase):
|
|
7
|
+
def test_ready_release_notes_score_well(self) -> None:
|
|
8
|
+
report = analyze_notes(
|
|
9
|
+
"""
|
|
10
|
+
# Added
|
|
11
|
+
- Added project usage export for customer admins.
|
|
12
|
+
# Breaking
|
|
13
|
+
- Removed legacy invoice.status values from the public API.
|
|
14
|
+
# Migration
|
|
15
|
+
- Developers should map pending_payment to open before upgrading.
|
|
16
|
+
# Validation
|
|
17
|
+
- Verified in staging with webhook replay tests.
|
|
18
|
+
# Rollback
|
|
19
|
+
- Disable invoice_webhook_v2 to restore old payloads.
|
|
20
|
+
"""
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
self.assertGreaterEqual(report.score, 85)
|
|
24
|
+
self.assertEqual(report.readiness, "ready")
|
|
25
|
+
self.assertFalse(any(finding.level == "high" for finding in report.findings))
|
|
26
|
+
|
|
27
|
+
def test_flags_missing_migration_for_breaking_change(self) -> None:
|
|
28
|
+
report = analyze_notes(
|
|
29
|
+
"""
|
|
30
|
+
# Changed
|
|
31
|
+
- Removed old API response fields.
|
|
32
|
+
- Minor updates.
|
|
33
|
+
"""
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
titles = {finding.title for finding in report.findings}
|
|
37
|
+
self.assertIn("Migration notes missing", titles)
|
|
38
|
+
self.assertIn("Customer impact missing", titles)
|
|
39
|
+
self.assertEqual(report.readiness, "blocked")
|
|
40
|
+
self.assertLessEqual(report.score, 64)
|
|
41
|
+
|
|
42
|
+
def test_formats_include_score_and_findings(self) -> None:
|
|
43
|
+
report = analyze_notes("- TODO add final release notes")
|
|
44
|
+
|
|
45
|
+
self.assertIn('"score"', format_json(report))
|
|
46
|
+
markdown = format_markdown(report)
|
|
47
|
+
self.assertIn("Release Note Readiness", markdown)
|
|
48
|
+
self.assertIn("Draft placeholders remain", markdown)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
if __name__ == "__main__":
|
|
52
|
+
unittest.main()
|