Contributing¶
Development Setup¶
# Clone the repository
git clone https://github.com/aptakhin/unifex.git
cd unifex
# Install dependencies
uv sync
# Install pre-commit hooks
uv run pre-commit install
Documentation¶
Build and serve the documentation locally:
Open http://localhost:8000 to view the documentation.
Testing Documentation Examples¶
Documentation code examples are tested using Sybil:
Code Style¶
- Use type hints for all function signatures
- Follow existing patterns in the codebase
- Imports should be sorted (standard library, third-party, local)
The project uses ruff for formatting and linting.
Pre-commit Checks¶
The pre-commit hook runs automatically on git commit. To run manually:
This runs:
ruff format- Code formattingruff check --fix- Linting with auto-fixty check- Type checkingpytest- Test suite
Pull Request Process¶
- Create a feature branch from
main - Make your changes with tests
- Ensure all pre-commit checks pass
- Submit a pull request
Design Principles¶
- Think about correct degree of coupling when designing components
- Prefer exceptions for invalid user input over returning error objects
- Avoid over-engineering - only make changes that are directly requested