Skip to content

How to submit a PR

Egbert Broerse edited this page Jul 23, 2025 · 7 revisions

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

> source ./venv/bin/activate

For venv hints, see Where to put your venvs

Then, install the additional development dependencies:

> pip install -r requirements_dev.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

To fix import sorts flagged (but not fixed) by ruff format, run:

> ruff check --select I --fix

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

Clone this wiki locally