Skip to content

Modernize tooling: Switch to ty and add local CI testing#8

Merged
safurrier merged 3 commits intomainfrom
feat/modernize-tooling-add-local-ci
Dec 17, 2025
Merged

Modernize tooling: Switch to ty and add local CI testing#8
safurrier merged 3 commits intomainfrom
feat/modernize-tooling-add-local-ci

Conversation

@safurrier
Copy link
Owner

Changes

This PR modernizes the development tooling with three focused improvements:

1. Type Checking: mypy → ty
Replaces mypy with Astral's ty for faster, more integrated type checking that aligns with the ruff ecosystem.

2. Dependency Management: uv pip sync → uv sync
Streamlines setup by using uv sync --all-extras which reads directly from pyproject.toml and uv.lock, eliminating intermediate requirements files and preserving environment markers for conditional dependencies.

3. Local CI Testing with act
Adds ability to run GitHub Actions workflows locally before pushing:

  • Zero-setup: make ci-local auto-installs everything needed
  • Fast feedback: 5-20 seconds vs 2-5 minutes on GitHub
  • Smart validation: checks Docker/Colima/Podman is running with clear error messages
  • Multiple targets: ci-local, ci-debug, ci-local-docs, ci-clean

Benefits

  • Faster type checking and local testing iterations
  • Reduced GitHub Actions minutes consumption
  • Better developer experience with local workflow testing
  • Cleaner dependency management without intermediate files

Testing

All checks pass locally and in CI:

  • ✅ Linting (ruff)
  • ✅ Formatting (ruff)
  • ✅ Type checking (ty)
  • ✅ Tests (pytest, 100% coverage)

safurrier and others added 3 commits December 17, 2025 13:49
Adopts Astral's new ty type checker to modernize the development tooling and align with the Ruff ecosystem for faster, more integrated type checking.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Modernizes dependency installation to use uv sync which reads directly from pyproject.toml and uv.lock, eliminating the need for intermediate requirements.txt files in the setup flow. This approach preserves environment markers for conditional dependencies and provides more accurate dependency resolution.

Key changes:
- Makefile: setup target now uses 'uv sync --all-extras' instead of pip sync
- GitHub Actions: simplified dependency installation workflow
- Dockerfile: uses 'uv sync --system --all-extras' with uv.lock for reproducible builds

The compile-deps target remains available for cases requiring requirements.txt files.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Implements local execution of GitHub Actions workflows using act, reducing feedback time from minutes to seconds. This allows developers to test workflows locally before pushing to GitHub, saving CI/CD minutes and enabling faster iteration.

Key additions:
- .actrc: Configuration for act with smart defaults (catthehacker image, amd64 arch)
- .github/workflows/ci-debug.yml: Fast debug workflow for iterative development
- Makefile targets:
  - act-install: One-time setup with Homebrew or install script
  - act-check: Auto-installs act if missing
  - docker-check: Validates container runtime is running with helpful error messages
  - ci-list: List available workflows and jobs
  - ci-local: Run full test workflow locally
  - ci-local-docs: Run documentation build check
  - ci-debug: Fast iteration with customizable workflow
  - ci-clean: Clean up act containers and cache
- Smart Docker socket detection (Colima/Docker/Podman)
- README and CHANGELOG updates with usage instructions
- Linux troubleshooting documentation for Docker permissions

Benefits:
- 5-20 second local feedback vs 2-5 minute GitHub runs
- Test workflows before commit/push
- Zero GitHub Actions minutes consumption
- Debug workflows with full local inspection
- Zero-setup experience: just run 'make ci-local' and it handles everything
- Clear, actionable error messages when prerequisites missing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@safurrier safurrier merged commit bad0cb9 into main Dec 17, 2025
4 checks passed
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