Contributing Guide¶
Development Setup¶
- Clone the repository:
- Install development dependencies:
- Verify installation:
This runs 1353 tests and should complete in ~21 seconds.
Development Workflow¶
- Create a feature branch
- Make your changes
- Run tests:
make test - Type check:
make typecheck - Lint and format:
make lint/make format - Update documentation (CHANGELOG.md, CLAUDE.md, docs/)
- Create a pull request
Code Quality Standards¶
Zero Tolerance for Test Failures
- ALL tests must pass, no exceptions
- Never weaken tests without significant certainty
- Find and fix root causes, don't ignore failures
Type Safety
- Strict mypy type checking (
disallow_untyped_defs) - Use Python 3.9+ type annotations (PEP 585)
Code Style
- Follow PEP 8
- Use ruff for linting
- 120 character line length
- Google-style docstrings
Adding a New Backend¶
- Create backend directory:
-
Implement core classes (
backend.py,converter.py,factory.py,builder.py) -
Create runtime library in
runtime/subdirectory -
Write tests in
tests/test_backend_newlang_*.py -
Run all 7 benchmarks:
make benchmark -
Update documentation
See existing backends (C, C++, Rust, Go, Haskell, OCaml, LLVM) for implementation examples.
Pull Request Guidelines¶
PR Title: Use conventional commits format:
feat: Add NewLang backend
fix: Resolve type inference bug in Rust backend
docs: Update verification guide
Requirements:
- All tests pass
- Type checking passes
- CHANGELOG.md updated
- Documentation updated for user-facing changes
Community¶
- GitHub Issues: https://github.com/shakfu/multigen/issues
- Discussions: https://github.com/shakfu/multigen/discussions
License¶
MultiGen is MIT licensed. All contributions must be compatible with MIT license.