Thank you for your interest in contributing to TadoLocal! This document provides guidelines for developers.
- Python 3.11 or later
- pip and virtualenv (recommended)
-
Clone the repository:
git clone https://github.com/ampscm/TadoLocal.git cd TadoLocal -
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install runtime and development dependencies:
pip install -r requirements.txt pip install -r requirements-dev.txt
-
Install the package in development mode:
pip install -e .
Run all tests:
pytestRun tests with verbose output:
pytest -vRun tests with coverage:
pytest --cov=tado_local --cov-report=htmlThe project uses the following tools for code quality:
- ruff: Fast Python linter (excludes domoticz/)
- flake8: Additional linting
- black: Code formatting (configured in pyproject.toml)
- pytest-asyncio: Testing async code
ruff check .
flake8 tado_local/tado_local/- Main packagedomoticz/- Domoticz plugin (uses namespace packaging)tests/- Unit testsdocs/- Documentationdemos/- Example scriptssystemd/- Systemd service files
- Domoticz Plugin: The
domoticz/plugin.pycan be used standalone. Tests use a mocked Domoticz module so the plugin can be tested without the Domoticz runtime. - Async Code: Use
@pytest.mark.asynciofor async tests (requires pytest-asyncio). - Namespace Packages: The
domoticz/folder uses namespace packaging to allow it to be imported separately.
Please check for existing open PRs before working on new features to avoid conflicts.