AST-based tool that scans Python files, extracts function/method signatures,
and generates pytest test stubs for functions without existing tests.
Usage:
python3 codebase_genome.py /path/to/repo
python3 codebase_genome.py /path/to/repo -o tests/test_genome_generated.py
Features:
- AST parsing (no imports required, handles syntax errors gracefully)
- Extracts: function name, args, return type, decorators, class context
- Detects existing tests to avoid duplicates
- Generates: basic test + edge case test per function
- Skips private/dunder methods
- Configurable limit (--limit N)
Generated 30 test stubs for timmy-home as proof of concept.