Skip to Content
ContributeSDKGetting Started

Getting Started

Read the root CONTRIBUTING.md first for commit conventions and the pull request workflow that apply to all contributors.

Development setup

Install uv, then:

setup.sh
git clone https://github.com/rhesis-ai/rhesis.git
cd rhesis/sdk
uv sync --dev
source .venv/bin/activate

Linting and formatting

From sdk, both targets run ruff  via uvx:

format-and-lint.sh
make format      # auto-format and apply fixes
make lint        # check without modifying files

The _diff variants scope to files changed relative to origin/main, which is what make all runs:

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. Run these from sdk:

  • Unitmake test runs pytest on ../tests/sdk, ignoring ../tests/sdk/integration.
  • Integrationmake test-integration brings up the sdk Docker profile (tests/docker-compose.test.yml), then runs the full suite including ../tests/sdk/integration.
  • Coveragemake test-coverage reports coverage for src/rhesis (terminal + HTML).
  • Teardownmake docker-down, or make docker-clean to also drop 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