feat: switch CI from pypi.org to Forgejo PyPI #5

Merged
forgejo_admin merged 1 commit from 4-forgejo-pypi-ci-pipeline into main 2026-03-01 18:14:29 +00:00

Summary

Switch the gmail-mcp CI pipeline from publishing to public pypi.org to the private Forgejo PyPI registry. This is part of Plan: Forgejo PyPI Migration Phase 2.

Changes

  • Deleted .woodpecker.yaml -- old pipeline config that published to pypi.org using pypi_token secret
  • Created .woodpecker.yml -- new standardized pipeline with three steps:
    • lint: ruff check and ruff format --check on src/ and tests/ (ruff pinned to 0.15.2)
    • test: pip install -e ".[dev]" then pytest tests/ -v (93 tests)
    • publish: build + twine upload to Forgejo PyPI using global secrets (forgejo_pypi_url, forgejo_publish_user, forgejo_publish_token), only on push to main
  • Updated pyproject.toml:
    • Added [tool.ruff] config (py310, line-length 120, E/F/W/I rules)
    • Converted [dependency-groups] to [project.optional-dependencies] for pip compatibility in CI
  • Fixed all lint/format issues across 14 source and 5 test files (import sorting, formatting, one line-length fix)

Test Plan

  • ruff check src/ tests/ -- all checks passed
  • ruff format --check src/ tests/ -- 27 files already formatted
  • pytest tests/ -v -- 93/93 tests passed
  • Woodpecker pipeline runs lint + test on this PR
  • After merge, publish step pushes to Forgejo PyPI

Review Checklist

  • Old .woodpecker.yaml deleted (prevents dual-config loading)
  • New .woodpecker.yml follows woodpecker-sdk template exactly
  • Publish step uses global secrets, not repo-level pypi_token
  • Publish only triggers on event: push, branch: main
  • Ruff config matches standard: py310, line-length 120, E/F/W/I
  • All existing tests still pass
  • plan-2026-03-01-forgejo-pypi-migration -- Phase 2
  • plan-2026-02-28-woodpecker-sdk-mcp -- reference implementation
  • Closes #4
## Summary Switch the gmail-mcp CI pipeline from publishing to public pypi.org to the private Forgejo PyPI registry. This is part of [Plan: Forgejo PyPI Migration](phase-2026-03-01-2-github-origin) Phase 2. ## Changes - **Deleted `.woodpecker.yaml`** -- old pipeline config that published to pypi.org using `pypi_token` secret - **Created `.woodpecker.yml`** -- new standardized pipeline with three steps: - **lint**: `ruff check` and `ruff format --check` on `src/` and `tests/` (ruff pinned to 0.15.2) - **test**: `pip install -e ".[dev]"` then `pytest tests/ -v` (93 tests) - **publish**: build + twine upload to Forgejo PyPI using global secrets (`forgejo_pypi_url`, `forgejo_publish_user`, `forgejo_publish_token`), only on push to main - **Updated `pyproject.toml`**: - Added `[tool.ruff]` config (py310, line-length 120, E/F/W/I rules) - Converted `[dependency-groups]` to `[project.optional-dependencies]` for pip compatibility in CI - **Fixed all lint/format issues** across 14 source and 5 test files (import sorting, formatting, one line-length fix) ## Test Plan - [x] `ruff check src/ tests/` -- all checks passed - [x] `ruff format --check src/ tests/` -- 27 files already formatted - [x] `pytest tests/ -v` -- 93/93 tests passed - [ ] Woodpecker pipeline runs lint + test on this PR - [ ] After merge, publish step pushes to Forgejo PyPI ## Review Checklist - [x] Old `.woodpecker.yaml` deleted (prevents dual-config loading) - [x] New `.woodpecker.yml` follows woodpecker-sdk template exactly - [x] Publish step uses global secrets, not repo-level `pypi_token` - [x] Publish only triggers on `event: push, branch: main` - [x] Ruff config matches standard: py310, line-length 120, E/F/W/I - [x] All existing tests still pass ## Related Notes - `plan-2026-03-01-forgejo-pypi-migration` -- Phase 2 - `plan-2026-02-28-woodpecker-sdk-mcp` -- reference implementation - Closes #4
feat: switch CI pipeline from pypi.org to Forgejo PyPI registry
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful
cfd00aa37c
Delete old .woodpecker.yaml (pypi.org config) and create .woodpecker.yml
with the standardized pipeline: lint (ruff pinned 0.15.2), test (pytest),
and publish to Forgejo PyPI using global secrets. Add [tool.ruff] config
to pyproject.toml and fix all lint/format issues. Convert dependency-groups
to project.optional-dependencies for pip compatibility in CI.

Closes #4

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
Owner

PR #5 Review

BLOCKERS

None.

NITS

None.

CODE REVIEW

.woodpecker.yaml (deleted) -- Old pypi.org pipeline correctly removed. Prevents dual-config loading.

.woodpecker.yml (new) -- Matches the woodpecker-sdk reference template exactly:

  • Top-level when: [push, pull_request] -- correct
  • Lint step: ruff==0.15.2 pinned, checks src/ and tests/ -- correct
  • Test step: pip install -e ".[dev]", pytest tests/ -v, no extra secrets needed (tests use mocks) -- correct
  • Publish step: $$FORGEJO_PYPI_URL, $$FORGEJO_PUBLISH_USER, $$FORGEJO_PUBLISH_TOKEN via from_secret, --non-interactive flag, gated to event: push, branch: main -- correct

pyproject.toml -- Two changes, both correct:

  1. [tool.ruff] config added: py310, line-length = 120, select = ["E", "F", "W", "I"] -- matches standard
  2. [dependency-groups] changed to [project.optional-dependencies] -- correct fix. [dependency-groups] (PEP 735) is not recognized by pip install -e ".[dev]". The CI test step requires [project.optional-dependencies] (PEP 621) for the .[dev] extras syntax to work. Without this fix, the test step would fail to install dev dependencies.

Source files (14 src + 5 test files) -- All changes are mechanical ruff formatting:

  • Import sorting (alphabetical within from statements)
  • Collapsing multi-line expressions that fit within 120-char line length
  • One string literal split in filters.py for line-length compliance
  • Zero logic changes

SOP COMPLIANCE

  • Branch named after issue (4-forgejo-pypi-ci-pipeline references issue #4)
  • PR body follows template-pr-body (Summary, Changes, Test Plan, Review Checklist, Related Notes -- all present)
  • Related Notes references plan slug (plan-2026-03-01-forgejo-pypi-migration)
  • Tests exist and pass (93/93 per PR body)
  • No secrets, .env files, or credentials committed
  • No unnecessary file changes (all 20 files are in-scope: pipeline swap + ruff config + mechanical formatting)
  • Commit messages are descriptive
  • Closes #4 links PR to issue

VERDICT: APPROVED

## PR #5 Review ### BLOCKERS None. ### NITS None. ### CODE REVIEW **`.woodpecker.yaml` (deleted)** -- Old pypi.org pipeline correctly removed. Prevents dual-config loading. **`.woodpecker.yml` (new)** -- Matches the woodpecker-sdk reference template exactly: - Top-level `when: [push, pull_request]` -- correct - Lint step: `ruff==0.15.2` pinned, checks `src/` and `tests/` -- correct - Test step: `pip install -e ".[dev]"`, `pytest tests/ -v`, no extra secrets needed (tests use mocks) -- correct - Publish step: `$$FORGEJO_PYPI_URL`, `$$FORGEJO_PUBLISH_USER`, `$$FORGEJO_PUBLISH_TOKEN` via `from_secret`, `--non-interactive` flag, gated to `event: push, branch: main` -- correct **`pyproject.toml`** -- Two changes, both correct: 1. `[tool.ruff]` config added: `py310`, `line-length = 120`, `select = ["E", "F", "W", "I"]` -- matches standard 2. `[dependency-groups]` changed to `[project.optional-dependencies]` -- **correct fix**. `[dependency-groups]` (PEP 735) is not recognized by `pip install -e ".[dev]"`. The CI test step requires `[project.optional-dependencies]` (PEP 621) for the `.[dev]` extras syntax to work. Without this fix, the test step would fail to install dev dependencies. **Source files (14 src + 5 test files)** -- All changes are mechanical ruff formatting: - Import sorting (alphabetical within `from` statements) - Collapsing multi-line expressions that fit within 120-char line length - One string literal split in `filters.py` for line-length compliance - Zero logic changes ### SOP COMPLIANCE - [x] Branch named after issue (`4-forgejo-pypi-ci-pipeline` references issue #4) - [x] PR body follows `template-pr-body` (Summary, Changes, Test Plan, Review Checklist, Related Notes -- all present) - [x] Related Notes references plan slug (`plan-2026-03-01-forgejo-pypi-migration`) - [x] Tests exist and pass (93/93 per PR body) - [x] No secrets, .env files, or credentials committed - [x] No unnecessary file changes (all 20 files are in-scope: pipeline swap + ruff config + mechanical formatting) - [x] Commit messages are descriptive - [x] `Closes #4` links PR to issue ### VERDICT: APPROVED
forgejo_admin deleted branch 4-forgejo-pypi-ci-pipeline 2026-03-01 18:14:29 +00:00
Sign in to join this conversation.
No description provided.