From f9c7e42894467c3dfc6a91da968eab24b7966833 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Tosser?= Date: Tue, 29 Sep 2026 15:02:22 +0200 Subject: [PATCH 1/2] ci: remove release-please automation --- .github/workflows/release.yml | 80 ----------------------------------- .release-please-manifest.json | 3 -- AGENTS.md | 5 +-- release-please-config.json | 8 ---- 4 files changed, 2 insertions(+), 94 deletions(-) delete mode 100644 .github/workflows/release.yml delete mode 100644 .release-please-manifest.json delete mode 100644 release-please-config.json diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 70e03b3..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,80 +0,0 @@ -name: release - -# Automated semver releases driven by conventional commits (release-please): -# every push to main updates a release PR that bumps pyproject.toml and -# CHANGELOG.md; merging it creates the vX.Y.Z tag + GitHub Release, which -# triggers the publish job below (dists attached to the GitHub Release). -on: - push: - branches: [main] - -permissions: - contents: write - pull-requests: write - issues: write - -jobs: - release-please: - runs-on: ubuntu-latest - outputs: - release_created: ${{ steps.release.outputs.release_created }} - tag_name: ${{ steps.release.outputs.tag_name }} - pr: ${{ steps.release.outputs.pr }} - steps: - - uses: googleapis/release-please-action@v4 - id: release - with: - # GITHUB_TOKEN works, but its PRs/tags don't trigger other - # workflows (e.g. ci.yml on the release PR). Set a PAT as the - # RELEASE_PLEASE_TOKEN secret to get CI checks on release PRs. - token: ${{ secrets.RELEASE_PLEASE_TOKEN || secrets.GITHUB_TOKEN }} - - # release-please bumps pyproject.toml but not uv.lock; keep the release - # PR's lockfile in sync. - lockfile: - needs: release-please - if: ${{ needs.release-please.outputs.pr != '' }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ fromJSON(needs.release-please.outputs.pr).headBranchName || 'release-please--branches--main' }} - token: ${{ secrets.RELEASE_PLEASE_TOKEN || secrets.GITHUB_TOKEN }} - - - name: Install uv - uses: astral-sh/setup-uv@v5 - with: - version: "0.12.7" - - - name: Re-lock and push if uv.lock changed - run: | - uv lock - if git diff --quiet uv.lock; then - echo "uv.lock already in sync" - exit 0 - fi - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - git add uv.lock - git commit -m "chore: sync uv.lock with version bump" - git push - - publish: - needs: release-please - if: ${{ needs.release-please.outputs.release_created }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Install uv - uses: astral-sh/setup-uv@v5 - with: - version: "0.12.7" - - - name: Build distributions - run: uv build - - - name: Attach distributions to the GitHub Release - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: gh release upload "${{ needs.release-please.outputs.tag_name }}" dist/* diff --git a/.release-please-manifest.json b/.release-please-manifest.json deleted file mode 100644 index 2be9c43..0000000 --- a/.release-please-manifest.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - ".": "0.2.0" -} diff --git a/AGENTS.md b/AGENTS.md index 99e23f3..120b8a3 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -50,6 +50,5 @@ two modes, config is TOML-only, and the catalog is live with an empty fallback. For config or hook changes, consult `docs/configuration.md` or `docs/hooks.md` and reconcile with the implementation. -- Releases use conventional commits and release-please, with wheel/sdist attached - to GitHub Releases, not PyPI. `.github/workflows/release.yml` separately re-locks - `uv.lock` after release-please bumps `pyproject.toml`. +- Releases are manual: there is no release automation. Commits still follow + conventional commits; `pyproject.toml` carries a static version. diff --git a/release-please-config.json b/release-please-config.json deleted file mode 100644 index b034fa3..0000000 --- a/release-please-config.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", - "packages": { - ".": { - "release-type": "python" - } - } -} From eebd6545d35349ab7b4d3e803f06d2142b810970 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Tosser?= Date: Tue, 29 Sep 2026 15:04:43 +0200 Subject: [PATCH 2/2] feat!: remove --version flag and version from welcome screen No releases means no version numbers worth displaying. The internal __version__ stays for telemetry; pyproject.toml keeps a static version. --- src/lecode/cli.py | 12 +----------- src/lecode/tui/loading.py | 6 +----- tests/test_cli.py | 15 +-------------- tests/test_tui_loading.py | 4 +--- 4 files changed, 4 insertions(+), 33 deletions(-) diff --git a/src/lecode/cli.py b/src/lecode/cli.py index 5a3d427..f00c08e 100644 --- a/src/lecode/cli.py +++ b/src/lecode/cli.py @@ -1,6 +1,6 @@ """lecode command-line interface. -Scope: ``--version``, the startup dependency check (fd / rg / rtk), headless +Scope: the startup dependency check (fd / rg / rtk), headless mode (``-p/--prompt``: auto-approved tools, auto-named session, final response on stdout, token/cost summary on stderr, exit codes 0 done / 1 error / 2 startup / 3 max turns / 4-9 provider failures), and the interactive TUI (default when @@ -156,12 +156,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: ) -def _version_callback(value: bool) -> None: - if value: - typer.echo(f"lecode {__version__}") - raise typer.Exit(EXIT_OK) - - def check_dependencies() -> None: """Abort startup (exit code 2) if fd/rg/rtk are missing from PATH.""" missing = find_missing_binaries() @@ -986,10 +980,6 @@ def run_setup() -> int: @app.callback(cls=_LeCodeGroup, invoke_without_command=True) def callback( - version: Annotated[ - bool, - typer.Option("--version", "-V", callback=_version_callback, is_eager=True), - ] = False, prompt: Annotated[ str | None, typer.Option( diff --git a/src/lecode/tui/loading.py b/src/lecode/tui/loading.py index bc6a648..bc6b8df 100644 --- a/src/lecode/tui/loading.py +++ b/src/lecode/tui/loading.py @@ -315,14 +315,10 @@ def build_load_report( def _byline_text(theme: Theme, splash: str | None) -> Text: - """Version, ``by Kalvad`` link, and the splash tagline on one line.""" - from lecode import __version__ - + """The ``by Kalvad`` link and the splash tagline on one line.""" if splash is None: splash = random.choice(_SPLASHES) line = Text() - line.append(f"v{__version__}", style=theme.muted) - line.append(" · ", style=theme.muted) line.append("by ", style=theme.muted) line.append("Kalvad", style=f"bold {theme.accent} link https://kalvad.com") line.append(f" — {splash}", style=f"italic {theme.permission}") diff --git a/tests/test_cli.py b/tests/test_cli.py index ca5f8b8..c7b3f34 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1,4 +1,4 @@ -"""Tests for the CLI bootstrap (version flag, dependency gating).""" +"""Tests for the CLI bootstrap (dependency gating).""" from __future__ import annotations @@ -7,24 +7,11 @@ import pytest from typer.testing import CliRunner -from lecode import __version__ from lecode.cli import EXIT_OK, EXIT_STARTUP, app runner = CliRunner() -def test_version_flag(): - result = runner.invoke(app, ["--version"]) - assert result.exit_code == EXIT_OK - assert f"lecode {__version__}" in result.stdout - - -def test_version_flag_short(): - result = runner.invoke(app, ["-V"]) - assert result.exit_code == EXIT_OK - assert __version__ in result.stdout - - def test_help_flag_short(): """``-h`` is an alias for ``--help``.""" for flag in ("-h", "--help"): diff --git a/tests/test_tui_loading.py b/tests/test_tui_loading.py index 3203764..0ff4241 100644 --- a/tests/test_tui_loading.py +++ b/tests/test_tui_loading.py @@ -416,8 +416,7 @@ def test_progressive_banner_prints_immediately(): assert "by Kalvad" in text -def test_banner_shows_version_splash_and_gradient(): - from lecode import __version__ +def test_banner_shows_splash_and_gradient(): from lecode.tui.loading import print_banner out = io.StringIO() @@ -427,7 +426,6 @@ def test_banner_shows_version_splash_and_gradient(): print_banner(console, THEME, splash="test splash") raw = out.getvalue() text = Text.from_ansi(raw).plain - assert f"v{__version__}" in text assert "by Kalvad" in text assert "test splash" in text # the banner is colored per column — leftmost glyph is the deep-purple endpoint