Development Setup¶
Set up your development environment for HAEO.
Prerequisites¶
- Python 3.13+
- uv package manager
- Git
Installation¶
Clone repository¶
Install dependencies¶
This installs all development dependencies including:
- pytest (testing)
- ruff (linting/formatting)
- pyright (type checking)
- zensical (documentation)
Local Home Assistant simulation¶
For interactive development with realistic input data and a browsable frontend:
See the local simulation guide for options including accelerated time, ephemeral mode, and skipping automatic HAEO setup.
Running tests¶
# Unit tests, as the test gate runs them
uv run check test
# Everything, including scenario, guide, and benchmark tests
uv run pytest
# Model element tests
uv run pytest custom_components/haeo/core/model/tests/
# With coverage
uv run pytest --cov=custom_components.haeo
Code quality¶
Linting¶
Formatting¶
Type checking¶
Documentation¶
Build locally¶
Visit http://127.0.0.1:8000
uv run zensical build is the documentation gate in uv run check.
It runs in strict mode, so a broken internal link or anchor fails it.
Deploy¶
Documentation automatically deploys via GitHub Actions on push to main.
Next steps¶
- Read Contributing guidelines
- Explore Architecture
- Check Testing guide