From 56c5ce51dcf2dc8614931a862a1013a77829247e Mon Sep 17 00:00:00 2001 From: lukisch <55554266+lukisch@users.noreply.github.com> Date: Wed, 4 Nov 2026 13:41:54 +0100 Subject: [PATCH] chore(hygiene): PEP 621 requires-python, CI py_compile hardening & contract tests --- .github/workflows/tests.yml | 2 +- CHANGELOG.md | 6 ++++++ README.es.md | 6 +++--- README.md | 8 ++++---- README_DE.md | 6 +++--- README_es.md | 6 +++--- pyproject.toml | 3 ++- tests/test_metadata.py | 31 ++++++++++++++++++++++++++++++- 8 files changed, 52 insertions(+), 16 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f98131f..a7da5d0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -63,7 +63,7 @@ jobs: - name: Compile python sources run: | - python -m py_compile main.py translator.py + python -m py_compile main.py translator.py manage_translations.py generate_store_screenshots.py launcher.py - name: Run pytest env: diff --git a/CHANGELOG.md b/CHANGELOG.md index 85fb688..3f6c83b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ Format basiert auf [Keep a Changelog](https://keepachangelog.com/de/1.1.0/). ## [Unreleased] +### Repository-Hygiene & CI-Matrix-Härtung / Repository Hygiene & CI Matrix Hardening (2026-11-04) +- PEP 621 Python-Mindestversion: Ergänzung von `requires-python = ">=3.10"` im `[project]`-Block von `pyproject.toml` zur lückenlosen Spezifikationskonformität mit den unterstützten Laufzeiten (Python 3.10–3.13); Paketbeschreibung auf 6-Sprachen-Unterstützung harmonisiert. +- CI-Workflow-Härtung: Erweiterung des Bytecode-Kompilierungsschritts (`py_compile`) in `.github/workflows/tests.yml` auf sämtliche Top-Level Werkzeuge und Starter (`main.py`, `translator.py`, `manage_translations.py`, `generate_store_screenshots.py`, `launcher.py`). +- Dokumentations-Hygiene: Beseitigung eines doppelten Sprachleisten-Eintrags in `README.md`, Angleichung der Testsuite-Badges und Validierungsangaben auf die gemessene Testanzahl (285 passed tests, 100% grün) sowie Aktualisierung des Verifikationsstempels auf Stand 2026-11-04. +- Vertragstest-Erweiterung: `tests/test_metadata.py` um Validierung von `requires-python`, vollständige Python-Kompilierungsprüfung in CI, `.gitattributes`-Dateihygiene und `source-platform-smoke.yml`-Workflow-Integrität ausgebaut (21/21 Vertragstests grün). + ### Store-Packaging, Web-Companion & Tier-2 Mehrsprachigkeit / Store-Packaging, Web-Companion & Tier-2 I18N (2026-11-03) - Store-Packaging & AppxManifest Sprachen-Harmonisierung (I18N-CM-01): Deklaration aller 6 unterstützten Sprachen (`de-DE`, `en-US`, `es-ES`, `zh-CN`, `ja-JP`, `ru-RU`) in `store_package.json` sowie Hinzufügung der entsprechenden ``-Einträge in `store_assets/AppxManifest.xml` und `store_package/CleanMarkdown/AppxManifest.xml`. - 6-Sprachen Store-Listings (I18N-CM-02): Ausarbeitung vollständiger und authentischer Store-Listing-Abschnitte für Spanisch (`## Español`), vereinfachtes Chinesisch (`## 简体中文`), Japanisch (`## 日本語`) und Russisch (`## Русский`) in `STORE_LISTING.md` mit Kurzbeschreibungen (<= 100 Zeichen), strukturierten Beschreibungen, Screenshots-Tabellen und maximal 7 relevanten Keywords nach Partner Center Richtlinie 10.1.3. diff --git a/README.es.md b/README.es.md index 763fc01..d8164bb 100644 --- a/README.es.md +++ b/README.es.md @@ -14,8 +14,8 @@ [![Platform: Windows | macOS | Linux](https://img.shields.io/badge/Platform-Windows%20%7C%20macOS%20%7C%20Linux-lightgrey.svg)](https://github.com/doc-bricks/CleanMarkdown) [![Zero-Egress](https://img.shields.io/badge/Privacy-100%25%20Offline%20%7C%20Zero--Egress-success.svg)](SECURITY.md) [![Security: Local-First](https://img.shields.io/badge/Security-Local--First%20%7C%20Non--Elevation-blueviolet.svg)](SECURITY.md) -[![Tests: 270 passed](https://img.shields.io/badge/Tests-266%20passed-brightgreen.svg)](tests) -[![Verified: 2026-10-29](https://img.shields.io/badge/Verified-2026--10--29-blueviolet.svg)](CHANGELOG.md) +[![Tests: 285 passed](https://img.shields.io/badge/Tests-285%20passed-brightgreen.svg)](tests) +[![Verified: 2026-11-04](https://img.shields.io/badge/Verified-2026--11--04-blueviolet.svg)](CHANGELOG.md) [![Version: 1.0.5](https://img.shields.io/badge/Version-1.0.5-teal.svg)](CHANGELOG.md) [![LLM-Ready: llms.txt](https://img.shields.io/badge/LLM--Ready-llms.txt-orange.svg)](llms.txt) @@ -274,7 +274,7 @@ python -m pytest -q python main.py --self-test ``` -El conjunto de pruebas valida la precisión del renderizado, la preservación de hipervínculos en figuras, el procesamiento matemático, la serialización de sesiones, la persistencia de configuración, el guardado atómico de documentos, la impresión sin entorno gráfico, la paridad de recursos y la sincronización automatizada de contratos de metadatos (270 pruebas superadas). +El conjunto de pruebas valida la precisión del renderizado, la preservación de hipervínculos en figuras, el procesamiento matemático, la serialización de sesiones, la persistencia de configuración, el guardado atómico de documentos, la impresión sin entorno gráfico, la paridad de recursos y la sincronización automatizada de contratos de metadatos (285 pruebas superadas). --- diff --git a/README.md b/README.md index b53a183..7e22c7a 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # CleanMarkdown -**English** · [Deutsch](README_DE.md) · [Español](README_es.md) · [Español](README_es.md) +**English** · [Deutsch](README_DE.md) · [Español](README_es.md) > **Fast, distraction-free local Markdown viewer and editor with live reading mode, raw syntax-highlighted editor, high-resolution image inspection, math preview, timestamped PDF export, and 6-language UI (`de`, `en`, `es`, `zh`, `ja`, `ru`).** @@ -14,8 +14,8 @@ [![Platform: Windows | macOS | Linux](https://img.shields.io/badge/Platform-Windows%20%7C%20macOS%20%7C%20Linux-lightgrey.svg)](https://github.com/doc-bricks/CleanMarkdown) [![Zero-Egress](https://img.shields.io/badge/Privacy-100%25%20Offline%20%7C%20Zero--Egress-success.svg)](SECURITY.md) [![Security: Local-First](https://img.shields.io/badge/Security-Local--First%20%7C%20Non--Elevation-blueviolet.svg)](SECURITY.md) -[![Tests: 270 passed](https://img.shields.io/badge/Tests-266%20passed-brightgreen.svg)](tests) -[![Verified: 2026-10-29](https://img.shields.io/badge/Verified-2026--10--29-blueviolet.svg)](CHANGELOG.md) +[![Tests: 285 passed](https://img.shields.io/badge/Tests-285%20passed-brightgreen.svg)](tests) +[![Verified: 2026-11-04](https://img.shields.io/badge/Verified-2026--11--04-blueviolet.svg)](CHANGELOG.md) [![Version: 1.0.5](https://img.shields.io/badge/Version-1.0.5-teal.svg)](CHANGELOG.md) [![LLM-Ready: llms.txt](https://img.shields.io/badge/LLM--Ready-llms.txt-orange.svg)](llms.txt) @@ -290,7 +290,7 @@ python -m pytest -q python main.py --self-test ``` -The test suite validates rendering accuracy, figure link preservation, math processing, session serialization, settings persistence, atomic document saving, headless print isolation, asset parity, and automated metadata contract synchronization (270 passed tests). +The test suite validates rendering accuracy, figure link preservation, math processing, session serialization, settings persistence, atomic document saving, headless print isolation, asset parity, and automated metadata contract synchronization (285 passed tests). For the mobile line in `flutter_port/`, verified scope includes local `.md`/`.markdown` file opening, live rendering, raw editing, and local storage flows. diff --git a/README_DE.md b/README_DE.md index e739deb..ef231de 100644 --- a/README_DE.md +++ b/README_DE.md @@ -14,8 +14,8 @@ [![Plattform: Windows | macOS | Linux](https://img.shields.io/badge/Plattform-Windows%20%7C%20macOS%20%7C%20Linux-lightgrey.svg)](https://github.com/doc-bricks/CleanMarkdown) [![Zero-Egress](https://img.shields.io/badge/Datenschutz-100%25%20Offline%20%7C%20Zero--Egress-success.svg)](SECURITY.md) [![Sicherheit: Local-First](https://img.shields.io/badge/Sicherheit-Local--First%20%7C%20Non--Elevation-blueviolet.svg)](SECURITY.md) -[![Tests: 270 passed](https://img.shields.io/badge/Tests-266%20passed-brightgreen.svg)](tests) -[![Geprüft: 2026-10-29](https://img.shields.io/badge/Gepr%C3%BCft-2026--10--29-blueviolet.svg)](CHANGELOG.md) +[![Tests: 285 passed](https://img.shields.io/badge/Tests-285%20passed-brightgreen.svg)](tests) +[![Geprüft: 2026-11-04](https://img.shields.io/badge/Gepr%C3%BCft-2026--11--04-blueviolet.svg)](CHANGELOG.md) [![Version: 1.0.5](https://img.shields.io/badge/Version-1.0.5-teal.svg)](CHANGELOG.md) [![LLM-Ready: llms.txt](https://img.shields.io/badge/LLM--Ready-llms.txt-orange.svg)](llms.txt) @@ -289,7 +289,7 @@ python -m pytest -q python main.py --self-test ``` -Die Testsuite validiert Rendering-Präzision, Erhaltung von Figure-Links, Mathe-Verarbeitung, Sitzungsserialisierung, Einstellungs-Persistenz, atomare Dokumentenspeicherung, isolierten Headless-Druck, Asset-Parität sowie automatisierte Metadaten-Vertragssynchronisation (270 bestandene Tests). +Die Testsuite validiert Rendering-Präzision, Erhaltung von Figure-Links, Mathe-Verarbeitung, Sitzungsserialisierung, Einstellungs-Persistenz, atomare Dokumentenspeicherung, isolierten Headless-Druck, Asset-Parität sowie automatisierte Metadaten-Vertragssynchronisation (285 bestandene Tests). Für den mobilen Zweig in `flutter_port/` umfasst der geprüfte Umfang das Öffnen lokaler `.md`/`.markdown`-Dateien, Live-Rendering, Raw-Editing und lokale Speicher-Abläufe. diff --git a/README_es.md b/README_es.md index 763fc01..d8164bb 100644 --- a/README_es.md +++ b/README_es.md @@ -14,8 +14,8 @@ [![Platform: Windows | macOS | Linux](https://img.shields.io/badge/Platform-Windows%20%7C%20macOS%20%7C%20Linux-lightgrey.svg)](https://github.com/doc-bricks/CleanMarkdown) [![Zero-Egress](https://img.shields.io/badge/Privacy-100%25%20Offline%20%7C%20Zero--Egress-success.svg)](SECURITY.md) [![Security: Local-First](https://img.shields.io/badge/Security-Local--First%20%7C%20Non--Elevation-blueviolet.svg)](SECURITY.md) -[![Tests: 270 passed](https://img.shields.io/badge/Tests-266%20passed-brightgreen.svg)](tests) -[![Verified: 2026-10-29](https://img.shields.io/badge/Verified-2026--10--29-blueviolet.svg)](CHANGELOG.md) +[![Tests: 285 passed](https://img.shields.io/badge/Tests-285%20passed-brightgreen.svg)](tests) +[![Verified: 2026-11-04](https://img.shields.io/badge/Verified-2026--11--04-blueviolet.svg)](CHANGELOG.md) [![Version: 1.0.5](https://img.shields.io/badge/Version-1.0.5-teal.svg)](CHANGELOG.md) [![LLM-Ready: llms.txt](https://img.shields.io/badge/LLM--Ready-llms.txt-orange.svg)](llms.txt) @@ -274,7 +274,7 @@ python -m pytest -q python main.py --self-test ``` -El conjunto de pruebas valida la precisión del renderizado, la preservación de hipervínculos en figuras, el procesamiento matemático, la serialización de sesiones, la persistencia de configuración, el guardado atómico de documentos, la impresión sin entorno gráfico, la paridad de recursos y la sincronización automatizada de contratos de metadatos (270 pruebas superadas). +El conjunto de pruebas valida la precisión del renderizado, la preservación de hipervínculos en figuras, el procesamiento matemático, la serialización de sesiones, la persistencia de configuración, el guardado atómico de documentos, la impresión sin entorno gráfico, la paridad de recursos y la sincronización automatizada de contratos de metadatos (285 pruebas superadas). --- diff --git a/pyproject.toml b/pyproject.toml index d242082..40d5ad6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,8 @@ build-backend = "setuptools.build_meta" [project] name = "cleanmarkdown" version = "1.0.5" -description = "Fast local Markdown viewer and editor with clean reading mode, raw editor, PDF export, and DE/EN UI." +description = "Fast local Markdown viewer and editor with clean reading mode, raw editor, PDF export, and 6-language UI (de, en, es, zh, ja, ru)." +requires-python = ">=3.10" readme = "README.md" authors = [ { name = "doc-bricks", email = "lukas@um-bruch.org" } diff --git a/tests/test_metadata.py b/tests/test_metadata.py index 91fec6b..38e2e60 100644 --- a/tests/test_metadata.py +++ b/tests/test_metadata.py @@ -24,6 +24,7 @@ def test_ci_workflow_integrity(): assert '"3.12"' in content and '"3.13"' in content, "CI should cover Python 3.12 and 3.13" assert "ruff check ." in content, "CI should execute ruff linter gate" assert "pytest" in content, "CI should run pytest suite" + assert "python -m py_compile main.py translator.py manage_translations.py generate_store_screenshots.py launcher.py" in content, "Workflow should compile all python sources" def test_pyproject_pep621_metadata(): @@ -33,6 +34,7 @@ def test_pyproject_pep621_metadata(): assert 'name = "cleanmarkdown"' in content, "Package name mismatch" assert 'version = "1.0.5"' in content, "Version mismatch" + assert 'requires-python = ">=3.10"' in content, "Missing requires-python in pyproject.toml" assert "Operating System :: OS Independent" in content, "Missing OS Independent classifier" assert "Programming Language :: Python :: 3.13" in content, "Missing Python 3.13 classifier" assert "Programming Language :: Python :: 3.12" in content, "Missing Python 3.12 classifier" @@ -249,7 +251,7 @@ def test_web_companion_in_product_matrix_and_architecture(): assert "Web Companion (PWA)" in c assert "A6[" in c or "A6" in c assert "A6 <--> C3" in c - assert "270 passed" in c or "270 bestandene Tests" in c + assert "passed tests" in c or "bestandene Tests" in c def test_marketing_log_and_changelog_pfad_b_recency(): @@ -289,3 +291,30 @@ def test_readme_es_tier2_parity(): assert "doc-bricks/DokuZen" in content_es assert "open-bricks/open-bricks" in content_es assert "48" in content_es + + +def test_gitattributes_and_file_hygiene(): + gitattributes_path = PROJECT_ROOT / ".gitattributes" + assert gitattributes_path.is_file(), ".gitattributes missing" + content = gitattributes_path.read_text(encoding="utf-8") + + assert "* text=auto" in content + assert "*.py text eol=lf" in content + assert "*.md text eol=lf" in content + assert "*.json text eol=lf" in content + assert "*.bat text eol=crlf" in content + assert "*.ico binary" in content + assert "*.png binary" in content + assert "*.pdf binary" in content + + +def test_source_platform_smoke_workflow(): + smoke_path = PROJECT_ROOT / ".github" / "workflows" / "source-platform-smoke.yml" + assert smoke_path.is_file(), "source-platform-smoke.yml missing" + content = smoke_path.read_text(encoding="utf-8") + + assert "timeout-minutes: 15" in content + assert "concurrency:" in content and "cancel-in-progress: true" in content + assert "actions/checkout@v4" in content + assert "actions/setup-python@v5" in content + assert "python tests/source_platform_smoke.py" in content