feat: add Woodpecker CI pipeline and update ruff config #8

Merged
forgejo_admin merged 1 commit from 7-add-woodpecker-ci-pipeline-ruff-config-f into main 2026-03-01 17:32:13 +00:00

Summary

  • Add .woodpecker.yml with lint, test, and publish steps following the standardized pattern from woodpecker-sdk
  • Update ruff config to target py310 with 120 char line-length (was py312/100)
  • Run ruff format to apply the updated line-length, collapsing multi-line strings that now fit on one line

Changes

  • .woodpecker.yml: New file with three CI steps -- lint (ruff==0.15.2), test (pytest -v), publish (build + twine upload to Forgejo PyPI, main-only)
  • pyproject.toml: Updated [tool.ruff] target-version from py312 to py310 and line-length from 100 to 120
  • src/pal_e_auth/config.py: Reformatted by ruff to unwrap two raise ValueError(...) statements that now fit within 120 chars

Test Plan

  • ruff check src/ tests/ passes (0 errors)
  • ruff format --check src/ tests/ passes (all files formatted)
  • pytest tests/ -v passes (29/29 tests)
  • Woodpecker CI runs on this PR (lint + test steps)

Review Checklist

  • No secrets committed
  • No unnecessary file changes
  • Commit messages are descriptive
  • Publish step uses from_secret for all credentials
  • Publish step gated to event: push, branch: main only
  • plan-2026-03-01-forgejo-pypi-migration -- Phase 1: add CI + ruff to all repos
  • Forgejo issue #7 -- Add Woodpecker CI pipeline + ruff config
## Summary - Add `.woodpecker.yml` with lint, test, and publish steps following the standardized pattern from woodpecker-sdk - Update ruff config to target py310 with 120 char line-length (was py312/100) - Run ruff format to apply the updated line-length, collapsing multi-line strings that now fit on one line ## Changes - `.woodpecker.yml`: New file with three CI steps -- lint (ruff==0.15.2), test (pytest -v), publish (build + twine upload to Forgejo PyPI, main-only) - `pyproject.toml`: Updated `[tool.ruff]` target-version from py312 to py310 and line-length from 100 to 120 - `src/pal_e_auth/config.py`: Reformatted by ruff to unwrap two `raise ValueError(...)` statements that now fit within 120 chars ## Test Plan - [x] `ruff check src/ tests/` passes (0 errors) - [x] `ruff format --check src/ tests/` passes (all files formatted) - [x] `pytest tests/ -v` passes (29/29 tests) - [ ] Woodpecker CI runs on this PR (lint + test steps) ## Review Checklist - [x] No secrets committed - [x] No unnecessary file changes - [x] Commit messages are descriptive - [x] Publish step uses `from_secret` for all credentials - [x] Publish step gated to `event: push, branch: main` only ## Related Notes - `plan-2026-03-01-forgejo-pypi-migration` -- Phase 1: add CI + ruff to all repos - Forgejo issue #7 -- Add Woodpecker CI pipeline + ruff config
feat: add Woodpecker CI pipeline and update ruff config
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
3d298eade7
Add .woodpecker.yml with lint, test, and publish steps matching the
standardized pattern from woodpecker-sdk. Update ruff config to use
py310 target and 120 char line-length. Run ruff format to apply the
updated line-length setting.

Closes #7

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

Review-fix loop: PASS (round 1)

Reviewed the full diff (3 files, +38/-8 lines). No issues found.

Checklist:

  • .woodpecker.yml matches the standardized pattern from woodpecker-sdk
  • Lint step pins ruff==0.15.2
  • Test step correctly handles poetry-core build backend (explicit pip install of test deps)
  • Publish step uses from_secret for all credentials, gated to main-only push
  • Ruff config updated to py310 / 120 line-length per plan spec
  • Only formatting change in config.py is a consequence of the line-length increase
  • All 29 tests pass locally
  • ruff check and ruff format --check both pass
  • No secrets committed
  • PR body follows template-pr-body

Ready for human review.

**Review-fix loop: PASS (round 1)** Reviewed the full diff (3 files, +38/-8 lines). No issues found. **Checklist:** - [x] `.woodpecker.yml` matches the standardized pattern from woodpecker-sdk - [x] Lint step pins `ruff==0.15.2` - [x] Test step correctly handles poetry-core build backend (explicit pip install of test deps) - [x] Publish step uses `from_secret` for all credentials, gated to main-only push - [x] Ruff config updated to py310 / 120 line-length per plan spec - [x] Only formatting change in `config.py` is a consequence of the line-length increase - [x] All 29 tests pass locally - [x] `ruff check` and `ruff format --check` both pass - [x] No secrets committed - [x] PR body follows `template-pr-body` Ready for human review.
Author
Owner

PR #8 Review

BLOCKERS

None.

NITS

  1. Ruff select includes "N" (pep8-naming) beyond the standard set.
    The plan (plan-2026-03-01-forgejo-pypi-migration) specifies "same rules everywhere: E/F/W/I." The current pyproject.toml has select = ["E", "F", "I", "N", "W"]. The "N" rule was pre-existing and this PR did not introduce it, but it also did not remove it to match the standardized set. The reference implementation (woodpecker-sdk) uses ["E", "F", "W", "I"] only.
    Recommendation: Either remove "N" to match the standard, or document the intentional deviation. Since "N" is stricter (additive), keeping it is defensible -- but it breaks the "same rules everywhere" goal. Non-blocking.

  2. Explicit test dependency installation vs .[dev].
    The test step installs pytest pytest-asyncio httpx explicitly rather than pip install -e ".[dev]". This is a reasonable workaround because pal-e-auth uses poetry-core as its build backend, and poetry defines dev dependencies under [tool.poetry.group.dev.dependencies] rather than PEP 621 [project.optional-dependencies], so pip install -e ".[dev]" would not pick them up. The tradeoff is maintenance drift: if test deps change in pyproject.toml, the CI file must be updated manually. Acceptable for now. Non-blocking.

  3. Trailing -f in branch name.
    Branch 7-add-woodpecker-ci-pipeline-ruff-config-f has a trailing -f that appears to be a truncation artifact or worktree suffix. Cosmetic only, does not affect anything. Non-blocking.

SOP COMPLIANCE

  • Branch named after issue (7-... matches issue #7)
  • PR body follows template-pr-body (Summary, Changes, Test Plan, Review Checklist, Related Notes -- all present)
  • Related Notes references plan-2026-03-01-forgejo-pypi-migration
  • No secrets, .env files, or credentials committed (all secrets use from_secret)
  • No unnecessary file changes (3 files, all in scope)
  • Commit messages are descriptive
  • Tests exist and pass (29/29 per PR body)

TECHNICAL REVIEW

  • .woodpecker.yml matches proven woodpecker-sdk pattern (lint/test/publish structure, image, gating)
  • Ruff pinned to ruff==0.15.2
  • target-version = "py310" and line-length = 120 correct
  • Publish step uses $$FORGEJO_PYPI_URL, $$FORGEJO_PUBLISH_USER, $$FORGEJO_PUBLISH_TOKEN with from_secret
  • --non-interactive flag present on twine upload
  • Publish gated to event: push, branch: main
  • config.py changes are purely mechanical reformatting (line unwrapping due to 100->120 line-length change)
  • No behavioral changes in any file

VERDICT: APPROVED

Clean PR. The three nits are non-blocking. The pipeline matches the proven pattern, secrets are handled correctly, lint changes are mechanical, and SOP compliance is solid.

## PR #8 Review ### BLOCKERS None. ### NITS 1. **Ruff `select` includes `"N"` (pep8-naming) beyond the standard set.** The plan (`plan-2026-03-01-forgejo-pypi-migration`) specifies "same rules everywhere: E/F/W/I." The current `pyproject.toml` has `select = ["E", "F", "I", "N", "W"]`. The `"N"` rule was pre-existing and this PR did not introduce it, but it also did not remove it to match the standardized set. The reference implementation (woodpecker-sdk) uses `["E", "F", "W", "I"]` only. **Recommendation:** Either remove `"N"` to match the standard, or document the intentional deviation. Since `"N"` is stricter (additive), keeping it is defensible -- but it breaks the "same rules everywhere" goal. Non-blocking. 2. **Explicit test dependency installation vs `.[dev]`.** The test step installs `pytest pytest-asyncio httpx` explicitly rather than `pip install -e ".[dev]"`. This is a reasonable workaround because pal-e-auth uses `poetry-core` as its build backend, and poetry defines dev dependencies under `[tool.poetry.group.dev.dependencies]` rather than PEP 621 `[project.optional-dependencies]`, so `pip install -e ".[dev]"` would not pick them up. The tradeoff is maintenance drift: if test deps change in pyproject.toml, the CI file must be updated manually. Acceptable for now. Non-blocking. 3. **Trailing `-f` in branch name.** Branch `7-add-woodpecker-ci-pipeline-ruff-config-f` has a trailing `-f` that appears to be a truncation artifact or worktree suffix. Cosmetic only, does not affect anything. Non-blocking. ### SOP COMPLIANCE - [x] Branch named after issue (`7-...` matches issue #7) - [x] PR body follows `template-pr-body` (Summary, Changes, Test Plan, Review Checklist, Related Notes -- all present) - [x] Related Notes references `plan-2026-03-01-forgejo-pypi-migration` - [x] No secrets, .env files, or credentials committed (all secrets use `from_secret`) - [x] No unnecessary file changes (3 files, all in scope) - [x] Commit messages are descriptive - [x] Tests exist and pass (29/29 per PR body) ### TECHNICAL REVIEW - [x] `.woodpecker.yml` matches proven woodpecker-sdk pattern (lint/test/publish structure, image, gating) - [x] Ruff pinned to `ruff==0.15.2` - [x] `target-version = "py310"` and `line-length = 120` correct - [x] Publish step uses `$$FORGEJO_PYPI_URL`, `$$FORGEJO_PUBLISH_USER`, `$$FORGEJO_PUBLISH_TOKEN` with `from_secret` - [x] `--non-interactive` flag present on `twine upload` - [x] Publish gated to `event: push, branch: main` - [x] `config.py` changes are purely mechanical reformatting (line unwrapping due to 100->120 line-length change) - [x] No behavioral changes in any file ### VERDICT: APPROVED Clean PR. The three nits are non-blocking. The pipeline matches the proven pattern, secrets are handled correctly, lint changes are mechanical, and SOP compliance is solid.
forgejo_admin deleted branch 7-add-woodpecker-ci-pipeline-ruff-config-f 2026-03-01 17:32:13 +00:00
Sign in to join this conversation.
No description provided.