generated from coulomb/repo-seed
feat: WP-0006 — packaging & distribution infrastructure
CI matrix (Python 3.11/3.12) with pip cache and coverage job. PyPI publish workflow (OIDC trusted publishing, triggered on v*.*.* tags). Docker image for REST service with non-root user + ghcr.io push workflow. markidocx --version flag. Diagram optional extras (diagram-mermaid/graphviz/plantuml) and readme/urls in pyproject.toml. CHANGELOG.md (Keep a Changelog format) with retrospective v0.1.0 entry. docs/release-process.md with executable checklist. All 272 tests pass; ruff and mypy clean; twine check PASSED. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,8 @@ import typer
|
||||
from rich.console import Console
|
||||
from rich.table import Table
|
||||
|
||||
from markidocx import __version__
|
||||
|
||||
app = typer.Typer(
|
||||
name="markidocx",
|
||||
help="Markdown ↔ DOCX round-trip editing system.",
|
||||
@@ -18,6 +20,22 @@ app = typer.Typer(
|
||||
template_app = typer.Typer(help="Template family management.")
|
||||
app.add_typer(template_app, name="template")
|
||||
|
||||
|
||||
def _version_callback(value: bool) -> None:
|
||||
if value:
|
||||
print(f"markidocx {__version__}")
|
||||
raise typer.Exit()
|
||||
|
||||
|
||||
@app.callback()
|
||||
def _main(
|
||||
version: Annotated[
|
||||
bool,
|
||||
typer.Option("--version", callback=_version_callback, is_eager=True, help="Show version and exit."),
|
||||
] = False,
|
||||
) -> None:
|
||||
pass
|
||||
|
||||
console = Console()
|
||||
err_console = Console(stderr=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user