Thank you for your interest in contributing to HAFO! This document provides guidelines and information for contributors.
- Python 3.13+
- uv (package manager)
- Node.js (for Prettier formatting)
-
Clone the repository:
git clone https://github.com/hass-energy/hafo.git cd hafo -
Install dependencies:
uv sync --dev npm install
-
Run tests:
uv run pytest
-
Run linting:
uv run ruff check uv run ruff format --check uv run pyright
- Python 3.13+ with modern features
- Type hints required on all functions and methods
- Ruff for linting and formatting
- Pyright for type checking
- Python: Ruff formatter (120 character line length)
- JSON: Prettier
- Markdown: mdformat
- pytest for all tests
- Coverage enforced on changed lines
- Tests should be clear and well-documented
- Create a feature branch from
main - Make your changes with clear, atomic commits
- Ensure all tests pass and linting is clean
- Update documentation if needed
- Submit a pull request with a clear description
Please be respectful and constructive in all interactions. We're all here to build something useful for the Home Assistant community.