Contributing¶
Thank you for your interest in contributing to emic!
Development Setup¶
- Clone the repository:
- Install with development dependencies:
- Install pre-commit hooks:
Code Style¶
- Formatting: We use Ruff for formatting
- Linting: Ruff for linting as well
- Type checking: Pyright in strict mode
- Docstrings: Google style
Pre-commit hooks automatically check these before each commit.
Running Tests¶
# All tests
uv run pytest
# With coverage
uv run pytest --cov=src/emic --cov-report=term-missing
# Specific test file
uv run pytest tests/unit/test_cssr.py -v
Documentation¶
Build docs locally:
Then visit http://localhost:8000
Docstring Requirements¶
All public APIs must have Google-style docstrings:
def my_function(param: str) -> int:
"""Short description.
Longer description if needed.
Args:
param: Description of parameter.
Returns:
Description of return value.
Raises:
ValueError: When something is wrong.
Example:
>>> my_function("test")
42
"""
Architecture¶
See .project/adr/ for Architecture Decision Records explaining design choices.
See .project/specifications/ for detailed feature specifications.
Pull Request Process¶
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes
- Ensure tests pass:
uv run pytest - Ensure linting passes:
uv run ruff check src tests - Commit with conventional commits:
git commit -m "feat: add new feature" - Push and create a PR
Commit Messages¶
We use Conventional Commits:
feat:New featurefix:Bug fixdocs:Documentation onlytest:Adding testsrefactor:Code refactoringchore:Maintenance tasks
Questions?¶
Open an issue on GitHub or reach out to the maintainers.