Thanks for your interest in contributing! This guide covers setup, conventions, and the PR process.
- Python 3.10+
- Git
git clone https://github.com/TheTrueAI/immermatch.git
cd immermatch
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev,test]"
pre-commit install --hook-type pre-commit --hook-type pre-pushNo API keys are needed for running tests — all external services are mocked.
-
Create a feature branch from
main:git checkout -b feat/your-feature
-
Make your changes and run quality checks:
make check # Optional during iteration: # make test # make lint # make typecheck
-
Commit your changes. Pre-commit hooks will automatically run:
- Trailing whitespace / end-of-file fixes
- YAML, TOML, JSON validation
- Secret detection (
detect-secrets) - Linting and formatting (
ruff) - Type checking (
mypy)
-
Push your branch. The pre-push hook runs the full test suite.
-
Open a pull request against
main.
- Formatter / Linter: Ruff — line length 120, rules: E, F, W, I, UP
- Type checking: mypy with
ignore_missing_imports = true - Python version: Target 3.10+ (use
from __future__ import annotationspatterns sparingly; preferX | Yunion syntax)
- Framework: pytest + pytest-cov
- All external services must be mocked — Gemini, SerpApi, Supabase, and Resend should never be called in tests
- Shared fixtures are in
tests/conftest.py:sample_profile,sample_job,sample_evaluation,sample_evaluated_job - Test fixture files (sample CVs, etc.) go in
tests/fixtures/ - File naming:
tests/test_<module>.pyforimmermatch/<module>.py - Pydantic models live in
immermatch/models.py— follow existing patterns
- All DB writes use the admin client (
get_admin_client()), never the anon client - Log subscriber UUIDs, never email addresses
- All
st.error()calls must show generic user-facing messages; real exceptions go tologger.exception() - Use the
google-genaipackage (not the deprecatedgoogle.generativeai)
- Use a descriptive title (e.g.,
feat: add job expiry badge,fix: handle empty search results) - Link to a related issue if one exists
- All CI checks must pass (lint, types, tests)
- PRs are squash-merged into
main
- Search existing issues first
- Use the provided issue templates (bug report, feature request, question)
- For bugs: include steps to reproduce, expected vs actual behavior, and your environment (Python version, OS)
Be respectful and constructive. We follow the spirit of the Contributor Covenant — harassment, discrimination, and bad-faith behavior are not tolerated.