Contributing¶
Thank you for your interest in contributing to this project!
Development Setup¶
- Fork and clone the repository
- Install dependencies:
uv sync --group dev - Install pre-commit hooks:
uv run pre-commit install
Code Style¶
This project uses:
- Ruff for linting and formatting
- Pyright for type checking
- Pre-commit hooks for automated checks
Style Guidelines¶
# ✅ Good: Clear typing, early returns, descriptive names
from loguru import logger as lg
def fetch_entity(table: str, entity_id: str | None) -> dict:
if entity_id is None:
msg = "entity_id required"
raise ValueError(msg)
lg.info(f"Fetching {entity_id} from {table}")
return {"id": entity_id, "table": table}
Pull Request Process¶
- Create a feature branch from
main - Make your changes with clear, focused commits
- Ensure all tests pass:
uv run pytest - Ensure code quality checks pass:
uv run ruff check . && uv run pyright - Update documentation if needed
- Submit a pull request
Commit Messages¶
Use conventional commit style:
type(scope): description
feat(config): add environment variable validation
fix(params): handle missing path gracefully
docs(readme): update installation instructions
test(models): add edge case coverage
Testing¶
- Write tests for new functionality
- Place tests in
tests/mirroring thesrc/structure - Use descriptive test names:
test_function_does_expected_behavior
Documentation¶
- Update docs when adding new features
- Include usage examples in docstrings
- Build and preview locally:
uv run mkdocs serve
Questions?¶
Open an issue for any questions or concerns.