2 Getting Started
2.1 Prerequisites
- Python 3.12+
- uv — the recommended package runner (handles all dependency installation automatically)
- A Google Gemini API key — get one here
2.2 Quick Start
# 1. Clone the repository
git clone https://github.com/benedekaibas/pytifex-demo.git
cd pytifex-demo/src/tc_disagreement
# 2. Set your API key
export GEMINI_API_KEY=your_key
# 3. Run the full pipeline
uv run main.py --num-examples 5That’s it. uv automatically installs all dependencies (including all four type checkers) on first run.
2.3 What Happens When You Run It
- Seed mining — Pytifex fetches closed bug reports from mypy, pyrefly, and ty GitHub repositories
- Code generation — Seeds are sent to Gemini, which generates new code variations targeting similar edge cases
- Type checking — Each generated example is run through mypy, pyrefly, zuban, and ty
- Filtering — Only examples where checkers disagree are kept
- Evaluation — A multi-tiered system determines which checker is correct
Output is saved to generated_examples/<timestamp>/.
2.4 Optional: GitHub Token
Without a token, GitHub API requests are limited to 60/hour. For heavier usage:
export GITHUB_TOKEN=ghp_your_token # raises limit to 5,000/hourOr skip GitHub entirely:
uv run main.py --no-github2.5 Next Steps
- Installation — Detailed setup including manual installation without
uv - Usage — Full CLI reference, commands, and options
- Architecture — Understand how the pipeline works under the hood