Skip to main content
Version: 1.0.5

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-extras

Linting​

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 pytest

You can also use tox to test against configured environments:

tox

Working with documentation​

Documentation is built with Docusaurus.

Install Node dependencies from the docs directory:

cd docs
npm install

Run the documentation server with hot reload:

npm run docs:dev

Build and preview the production documentation:

npm run docs:build
npm run docs:serve

Project 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 pyrefly strict mode.
  • No relative imports — always use absolute imports (from django_rmq.producer import Producer, not from .producer import Producer).
  • Key-value call parameters — pass arguments by keyword where possible ( Producer(queue='orders').publish(body='...')).
  • uv run instead of python — run scripts and management commands as uv run python manage.py ... or uv run pytest.