Skip to content

Development Environment Setup

Prerequisites

Before starting development, you need to install the following tools:

Development Environment

Tool Version Description
Python >=3.12 Python programming language
uv - Python package and project manager

To start development, clone the repository:

git clone https://github.com/oqtopus-team/device-gateway.git
cd device-gateway

Setting Up the Python Environment

To install dependencies:

uv sync

Lint and test

How to Format Code

To format the code, run the following command:

uv run ruff format

How to Lint Code

To check the types, run the following command:

uv run ruff check

How to Check Types

To check the types, run the following command:

uv run mypy .

How to Test Code

To test the code, run the following command:

uv run pytest

Starting the Documentation Server

We are using MkDocs to generate the HTML documentation and mkdocstrings-python to generate the Python API reference. To start the documentation server, run the following command:

uv run mkdocs serve

Then, check the documentation at http://localhost:8000.