Thank you for your interest in contributing to MEFAI Engine. This document explains how to get started and what we expect from contributions.
- Python 3.11 or 3.12
- Git
- Clone the repository:
git clone https://github.com/mefai-io/mefai-engine.git
cd mefai-engine- Create a virtual environment:
python -m venv .venv
source .venv/bin/activate- Install in development mode with all dependencies:
pip install -e ".[all]"- Verify everything works:
python -m pytest tests/unit/ -v
ruff check src/ tests/
mypy src/mefai_engine/We use ruff for linting and formatting and mypy for type checking.
- Target version: Python 3.11
- Line length: 100 characters
- Enabled rule sets: E F W I N UP B A SIM TCH
Run the linter:
ruff check src/ tests/- Strict mode enabled
- Pydantic plugin enabled
Run type checks:
mypy src/mefai_engine/- Use type annotations on all function signatures
- Write docstrings for all public functions and classes
- Keep functions focused and under 50 lines where possible
- Prefer pure functions over stateful classes when practical
- Use numpy vectorized operations instead of Python loops for numeric code
- Fork the repository and create a feature branch from
main - Write your code following the style guidelines above
- Add or update tests for any changed behavior
- Ensure all tests pass locally before pushing
- Open a pull request against
main - Fill in the PR template with a clear description of what changed and why
- Wait for at least one maintainer review before merging
- All CI checks must pass (lint + tests + type checks)
- New features must include unit tests
- Breaking changes must be documented in the changelog
- Keep PRs focused on a single concern when possible
# Unit tests only (fast and no external deps)
python -m pytest tests/unit/ -v
# All tests with coverage
python -m pytest tests/ -v --cov=mefai_engine --cov-report=term-missing- Place unit tests in
tests/unit/ - Place integration tests in
tests/integration/ - Place end to end tests in
tests/e2e/ - Use descriptive test names that explain the expected behavior
- Each test should verify one thing
- Use GitHub Issues for bug reports and feature requests
- Include reproduction steps for bugs
- Include your Python version and OS
Be respectful and constructive. We are building something together and everyone should feel welcome to participate.