Skip to content

Latest commit

 

History

History
91 lines (75 loc) · 1.24 KB

CONTRIBUTING.md

File metadata and controls

91 lines (75 loc) · 1.24 KB

Contributing

Local Development

Install

Project code

cd && git clone # path-to-this-repository.git
cd # path-to-downloaded-repository

Python

Verify if Python is installed.

python --version
pyenv

To install multiple Python versions, use pyenv.

To activate pyenv:

pyenv local 3.11 3.12

Mosquitto

sudo apt install -y mosquitto mosquitto-clients

Virtual environment

python -m venv .env
source .env/bin/activate

pip and setuptools

python -m pip install --upgrade pip setuptools

Dependencies

pip install -e .[dev]

Pre-commit

pre-commit install
pre-commit autoupdate
pre-commit run --all-files

Develop

Mosquitto

Start server

sudo mosquitto -v

Listen to messages

mosquitto_sub -v -t '#' -h 127.0.0.1

Publish a message

mosquitto_pub -t 'led/strip/set' -h 127.0.0.1 -m 0

Stop Mosquitto server:

sudo systemctl stop mosquitto

Tox

See tox for all test environments.

To run all:

tox

To run a specific environment:

tox -e py312

To generate documentation:

tox -e docs

The HTML pages are in docs/build/html.