This guide covers everything needed to set up a local development environment for IdeGYM, run the test suites, and make your first code change.
| Tool | Version | Purpose | Install |
|---|---|---|---|
| uv | >= 0.10.0 | Python package manager | See below |
| Git | any | Version control | System package manager |
Install uv (the only tool you need to install manually):
# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Or with Homebrew
brew install uv
# Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
uvwill manage Python 3.12 for you — no separate Python install required.
| Tool | Version | Purpose | Install |
|---|---|---|---|
| Docker | >= 24 | Build and run containers | Docker Desktop or brew install docker |
Integration tests build real Docker images and push them to a local registry. They require:
- A running Docker daemon.
- A container registry. Start one with:
docker run -d -p 5000:5000 --name registry registry:2
[!WARNING] On macOS, AirPlay Receiver (Control Center) occupies port 5000 by default. If the command above fails with address already in use, use port 5001 instead:
docker run -d -p 5001:5000 --name registry registry:2
To free port 5000 permanently, turn off AirPlay Receiver in System Settings → General → AirDrop & Handoff → AirPlay Receiver. See also: Port 5000 already in use.
- The
IDEGYM_TEST_REGISTRYenvironment variable set to the registry address:export IDEGYM_TEST_REGISTRY=localhost:5000 # or localhost:5001 on macOS
In CI this registry is provided automatically as a Docker service container. Locally you need to start it manually before running the integration suite.
| Tool | Version | Purpose | Install |
|---|---|---|---|
| kubectl | >= 1.28 | Kubernetes CLI | brew install kubernetes-cli |
| minikube | >= 1.35 | Local Kubernetes cluster | brew install minikube |
See Local Deployment and E2E Tests for full setup instructions.
git clone https://github.com/JetBrains-Research/idegym.git
cd idegymuv manages the Python version declared in .python-version (3.12):
uv python installuv venv --seed--seed pre-installs pip, setuptools, and wheel into the virtual environment alongside uv's
own tooling. Some build backends and older packages rely on these tools being present; without --seed
they may not be available inside the venv.
This creates .venv/ in the project root. Activate it if needed by your IDE or shell:
# Activate (optional — uv run handles this automatically)
source .venv/bin/activate # Linux / macOS
.venv\Scripts\activate # Windowsuv sync --all-packages --all-extras --all-groupsThis installs every package across all workspace members, including dev and test dependencies.
pre-commit installHooks run automatically on git commit to enforce code style.
Fast, self-contained tests with no external dependencies:
uv run pytest -m unitTests that build Docker images and push them to a local registry.
Prerequisites (see Required for integration tests above):
- Docker daemon running
- Local registry started (port 5000, or 5001 on macOS if AirPlay Receiver is active)
IDEGYM_TEST_REGISTRYset to the registry address
IDEGYM_TEST_REGISTRY=localhost:5000 uv run pytest -m integration
# macOS with AirPlay Receiver enabled:
IDEGYM_TEST_REGISTRY=localhost:5001 uv run pytest -m integrationE2E tests require a running Minikube cluster with specific addons. See E2E Tests for the full setup, then run:
uv run pytest -m e2eSpeed up subsequent runs by reusing a running cluster:
uv run pytest -m e2e --skip-build --reuse-resourcesuv run pytest -vv -s -o log_cli=true --log-cli-level=INFOIdeGYM uses Ruff for formatting and linting.
Configuration (pyproject.toml):
- Line length: 120 characters
- Indent: 4 spaces
- Quotes: double
- Line endings: LF
uv run ruff formatuv run ruff checkuv run ruff check --fixPre-commit hooks run both ruff format and ruff check on every commit.
pre-commit run --all-files- Use
Optional[X]for optional types (notX | None) - Use built-in generics for non-optional:
dict[str, Any],list[str](notDict,List) - Target Python 3.12+ features where appropriate
- Open the project root as the project directory.
- Set the Python interpreter to
.venv/bin/python. - Mark
e2e-tests/as a Source Root (right-click → Mark Directory As → Sources Root). - Install the Kubernetes plugin for working with manifests.
- Install the Python extension.
- Select the interpreter from
.venv/bin/python. - The workspace is already configured — open the root folder.
This project uses uv exclusively. Never use pip directly — it bypasses uv's lockfile and workspace management.
| Instead of | Use |
|---|---|
pip install <pkg> |
uv add <pkg> |
pip install -r requirements.txt |
uv sync |
python -m pytest |
uv run pytest |
python script.py |
uv run python script.py |
- Local Deployment — run the full IdeGYM stack locally on Minikube
- Image Builder — build custom environment images with plugins
- Full Flow Example — see a complete build-deploy-run walkthrough