7. How to submit a PR - ramses-rf/ramses_cc GitHub Wiki

Create a dev environment

First, download the repo, and set up a Python virtual environment:

> git clone https://github.com/zxdavb/ramses_rf

> cd ramses_rf

> cat pyproject.toml | grep requires-python
requires-python = ">=3.11"  # use this version of Python, or newer

> python3.14 -m venv venv  # the version used by the latest HA

> source ./venv/bin/activate

Then, install all the dependencies:

> pip install -r ./requirements/requirements_dev.txt
Collecting...

Install ramses_cc if you aren’t using an IDE that handles this for you. With Python3.14+ you should install ramses_cc in Compatibility Mode: This forces a legacy .pth file that the HA loader can physically locate:

pip install -e . --config-settings editable_mode=compat

Finally, install the pre-commit hooks, and confirm all tests pass:

> prek install
prek installed at .git/hooks/pre-commit

Since we have moved from pre-commit to prek, a much faster drop-in replacement, update any existing pre-commit hooks to use prek. Run:

> prek install -f
Overwriting existing hook at `.git/hooks/pre-commit`
prek installed at `.git/hooks/pre-commit`

The command to run the hooks from the terminal:

> prek run -a
ruff.....................................................................Passed
ruff-format..............................................................Passed
codespell................................................................Passed
...

Before writing code

  • Study the existing code, study the Home Assistant Developer's pages, our Contribution guidelines, LLM Guidelines and this guide.
  • Create a new Issue (type: Feature or Bug) in the applicable repository, either ramses_cc (the integration) or ramses_rf (the RF library), describing your proposed new feature or the bug you plan to fix. This allows others to reflect on your plan and align your contributions to ongoing work.
  • Always work on a fresh branch, copied from the repository master. Never edit your local copy of the master branch.

Before submitting a PR

  1. Check the pre-commit tests pass:
> prek run -a
  1. Check mypy tests pass:
> mypy
  1. Check pytest tests pass:
> pytest tests

If all the above pass, then you can submit your PR.

Keep PRs distinct & atomic. Do not combine different changes/files in one PR unless the changes are directly related. See The perfect PR for HA developers.

You must use the PR template, and confirm the 203 checkboxes, including your use of LLM if any. Include a description of your concrete changes, and link to your Issue.

If applicable, link to issues fixed by this PR as follows: "fixes Issue #123"