Skip to Content
ContributeSDKGetting Started

Getting Started

Before contributing to the SDK, read the main CONTRIBUTING.md at the root of the repository. It contains guidelines that apply to all contributors, including commit conventions and the pull request workflow.

Before you start

Install uv for Python environment management.

Development setup

setup.sh
git clone https://github.com/rhesis-ai/rhesis.git
cd rhesis/sdk

# Create a development virtual environment
uv sync --dev

# Activate the virtual environment
source .venv/bin/activate

Linting and formatting

From sdk:

format-and-lint.sh
make format      # auto-format and fix all Python files
make lint        # check formatting without modifying files

Both targets use ruff  via uvx. There are also diff-scoped variants that only run against files changed relative to main:

format-and-lint-diff.sh
make format_diff
make lint_diff

Tests

Tests live in ../tests/sdk (relative to sdk/), not inside the SDK package itself.

From sdk:

  • Unit testsmake test runs pytest on ../tests/sdk, ignoring ../tests/sdk/integration.
  • Integration testsmake test-integration starts the sdk Docker profile (see tests/docker-compose.test.yml), then runs the full suite including ../tests/sdk/integration.
  • Coveragemake test-coverage runs pytest with coverage reporting for src/rhesis.
  • Teardownmake docker-down (or make docker-clean to remove volumes).

Run a single test after starting the Docker profile yourself:

run-specific-test.sh
make docker-up
uv run pytest -s ../tests/sdk/entities/test_endpoint.py::test_endpoint -v

Questions or need help?