Conventional-Commit-driven version bumps (scripts/bump.py), a commit-msg validation hook, and a /release-notes workflow that produces a human-reviewed CHANGELOG.md. Adds an in-app version badge + 'What's new' dialog on the launcher. The version is single-sourced from pyproject.toml (cim_suite.__version__), and the deterministic bump backbone lives in scripts/release/ with tests in tests/release/. Marks the 1.0.0 baseline. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
29 lines
860 B
Python
29 lines
860 B
Python
"""Launcher version badge + the What's-new release-notes dialog."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from PySide6.QtWidgets import QLabel
|
|
|
|
import cim_suite
|
|
from cim_suite.modules.da12.module import Da12Module
|
|
from cim_suite.shell.launcher import LauncherView
|
|
from cim_suite.shell.whats_new import WhatsNewDialog
|
|
|
|
|
|
def _scan_none(*, include_simulator=False):
|
|
return []
|
|
|
|
|
|
def test_launcher_shows_suite_version(qtbot):
|
|
view = LauncherView([Da12Module(simulate=True)], scan_fn=_scan_none)
|
|
qtbot.addWidget(view)
|
|
texts = [w.text() for w in view.findChildren(QLabel)]
|
|
assert f"v{cim_suite.__version__}" in texts
|
|
|
|
|
|
def test_whats_new_dialog_renders_changelog(qtbot):
|
|
dlg = WhatsNewDialog()
|
|
qtbot.addWidget(dlg)
|
|
rendered = dlg.notes.toPlainText()
|
|
assert rendered.strip() # never empty (real changelog or a friendly placeholder)
|