Skip to content
David Bonnes edited this page Jan 8, 2025 · 1 revision

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.13 -m venv venv  # the version used by the latest HA

> source ./venv/bin/activate

Then, install all the dependencies:

> pip install -r requirements_test.txt
Collecting...

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

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

> pre-commit run -a
ruff.....................................................................Passed
ruff-format..............................................................Passed
codespell................................................................Passed
...

Before submitting a PR

  1. Check the pre-commit tests pass:
> pre-commit 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!