Skip to content

Latest commit

 

History

History
100 lines (65 loc) · 2.98 KB

CONTRIBUTING.md

File metadata and controls

100 lines (65 loc) · 2.98 KB

Contributing

First off, thanks for taking the time to contribute!

Table of Contents

🔨 Set up Development Environment

Using uv

home-assistant-vantage uses uv to run scripts, manage virtual environments, create reproducible builds, and publish packages. Check out the uv installation guide to get started.

To set up your development environment, run the following commands:

# Create a virtual environment
uv venv

# Install development dependencies
uv sync --extra dev

To start the Home Assistant development server, run:

uv run scripts/develop

Manually

If you'd prefer to manage your own python environment, you can install the development dependencies manually.

# Create a virtual environment
python3 -m venv .venv

# Activate the virtual environment
source .venv/bin/activate

# Install development dependencies
pip install -e ".[dev]"

To start the Home Assistant development server, run:

./scripts/develop

✨ Submit your work

Submit your improvements, fixes, and new features to one at a time, using GitHub Pull Requests.

Good pull requests remain focused in scope and avoid containing unrelated commits. If your contribution involves a significant amount of work or substantial changes to any part of the project, please open an issue to discuss it first to avoid any wasted or duplicate effort.

🎨 Style guidelines

Before submitting a pull request, make sure your code follows the style guidelines. This project uses pyright for type checking, and ruff for linting and formatting.

Pull requests will trigger a CI check that blocks merging if the code does not pass the style guidelines.

Running checks automatically with vscode

If you are using vscode, you'll be prompted to install the recommended extensions when you open the workspace.

Running checks manually

# Run type checking
uv run pyright
# Run linting
uv run ruff check
# Format code
uv run ruff format

🚀 Publish a release

First, update the version number:

bumpver update --patch # or --major --minor

Then create a release on GitHub. Releases are published automatically to HACS when a new GitHub release is created.