Contribution Guide
Contribution guide
We welcome contributions to Django-RMQ. This guide covers the basic local workflow for development, testing, and documentation.
If you are not sure whether a change fits the project, open an issue or a draft pull request first.
Please keep changes focused and include tests when behavior changes.
Setting up environment
The project uses uv for Python dependency management. To install it, follow the official guide in the uv documentation.
After cloning the repository, install dependencies:
uv sync --all-extrasLinting
Run Ruff locally before opening a pull request:
uv run ruff check .
uv run ruff format --check .Testing
Run the test suite with pytest:
uv run pytestYou can also use tox to test against configured environments:
toxWorking with documentation
Documentation is built with VuePress 2 and vuepress-theme-hope.
Install Node dependencies:
npm installRun the documentation server with hot reload:
npm run docs:devBuild and preview the production documentation:
npm run docs:build
npm run docs:serveProject conventions
All Python code in this repository follows the rules below (enforced by Ruff and pyrefly in CI):
- Full typing — annotate every function parameter, return value, and variable. The project targets
pyreflystrict mode. - No relative imports — always use absolute imports (
from django_rmq.producer import Producer, notfrom .producer import Producer). - Key-value call parameters — pass arguments by keyword where possible (
Producer(queue='orders').publish(body='...')). uv runinstead ofpython— run scripts and management commands asuv run python manage.py ...oruv run pytest.