Skip to content

ci: add pyright, coverage, package validation, concurrency#73

Merged
brendanjryan merged 8 commits intomainfrom
ci/improvements
Feb 23, 2026
Merged

ci: add pyright, coverage, package validation, concurrency#73
brendanjryan merged 8 commits intomainfrom
ci/improvements

Conversation

@brendanjryan
Copy link
Collaborator

@brendanjryan brendanjryan commented Feb 23, 2026

Changes

Pyright type checking

  • Fixed all 9 src-level type errors (rpc_url narrowing, protocol hasattr, bytes cast)
  • Fixed all 47 test-level type errors (MockMethod protocol, decorator signature transforms, Intent casting)
  • Added pyright as dev dependency and CI step
  • Only examples/ excluded (separate dependency sets like fastapi/mcp — same as ruff)
  • Includes Method.intents protocol fix (property instead of bare attribute) — supersedes fix: make Method.intents a read-only property in protocol #72

Coverage enforcement

  • Added --cov-fail-under=90 to pytest (currently at 94%)

Package build validation

  • Added python -m build + twine check --strict job
  • Catches broken PyPI uploads before publish

CI structure improvements

  • Added concurrency cancellation for stale runs on new pushes
  • Split into parallel lint / test / package jobs
  • Added fail-fast: false to test matrix

Version matrix

  • Python 3.12 + 3.13 with fail-fast: false

All checks pass locally: pyright 0 errors (src + tests), 94% coverage, ruff clean, package builds + validates.

brendanjryan and others added 8 commits February 22, 2026 19:21
- Add pyright type checking to CI (fix 9 src errors, exclude
  examples/tests for now)
- Add coverage enforcement at 90% (currently at 94%)
- Add package build + twine check --strict validation
- Add concurrency cancellation for stale CI runs
- Split CI into lint/test/package jobs with fail-fast: false
- Add pyright, build, twine as dev dependencies
…usion

- Apply Method.intents protocol fix (property instead of bare attribute)
- Fix test_server.py: narrow StarletteResponse type, suppress MockMethod
  protocol mismatches
- Fix test_mcp.py: suppress @pay decorator signature transformation
- Fix test_tempo.py: cast Intent to ChargeIntent, suppress intentional
  type violations in tests, suppress rlp.encode operator
- Fix test_mpp_create.py: suppress TempoMethod-specific attr access
- Only exclude examples/ from pyright (separate dependency sets)
@brendanjryan brendanjryan merged commit 87724b2 into main Feb 23, 2026
4 checks passed
@brendanjryan brendanjryan deleted the ci/improvements branch February 23, 2026 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant