Skip to content

Latest commit

 

History

History
141 lines (95 loc) · 3.03 KB

File metadata and controls

141 lines (95 loc) · 3.03 KB

Developer Setup

This guide is for contributors who want to run RoboPilot locally from source.

Supported Python Versions

Use Python 3.10 or 3.11 for development and release checks.

Package metadata declares:

>=3.10,<3.12

Python 3.12 is not claimed because it was not available for this release validation pass. Python 3.13 is not currently claimed as supported because the CLI test suite has known Typer compatibility issues there.

Clone the Repository

git clone https://github.com/J1angJJ/RoboPilot.git
cd RoboPilot

Create an Environment

Using venv:

python -m venv .venv
.venv\Scripts\activate

Using conda:

conda create -n robopilot python=3.10 -y
conda activate robopilot

Install Editable Package

python -m pip install -U pip
pip install -e ".[dev]"

Optional LLM support is installed separately:

pip install -e ".[llm]"

The default RoboPilot workflow remains offline and rule-based. LLM features require explicit configuration and must not be required for normal tests.

Run Tests

python -m pytest

Windows fallback:

python -m pytest --basetemp=".pytest_tmp" -p no:cacheprovider

Run JSON contract tests:

python -m pytest tests/test_json_contracts.py

Run Chinese documentation encoding checks:

python -m pytest tests/test_docs_encoding.py

Chinese Markdown files are expected to be UTF-8 without BOM. Avoid GBK, ANSI, and UTF-8 with BOM.

Run CLI Help

robopilot --help
robopilot detect --help
robopilot migrate-plan --help
robopilot migrate-scaffold-validate --help
robopilot migrate-scaffold-report --help

Try the Python API

The CLI remains the main user interface, but integration code can call the lightweight API layer directly:

from robopilot.api.static_analysis import detect_project_type

result = detect_project_type("examples/generated_projects/demo_detector")
print(result["project_type"])

API functions are designed to avoid Rich rendering and direct stdout printing.

VSCode Extension Development

The extension is a thin wrapper around the RoboPilot CLI JSON outputs:

cd vscode-extension
npm install
npm run compile
npm test

Then launch an Extension Development Host from VSCode. The extension requires the robopilot CLI to be installed or configured with robopilot.executablePath.

For local VSIX packaging:

cd vscode-extension
npm install
npm run compile
npm test
npm run package

The package command creates a local .vsix for installation testing. It does not publish a new VSCode Marketplace version.

Marketplace listing and future update steps are documented in docs/vscode_marketplace.md. Publishing updates requires a confirmed Marketplace publisher id and a VSCE_PAT secret; do not run publishing workflows during normal development.

Packaging Checks

For local package verification:

python -m pip install -U build twine
python -m build
python -m twine check dist/*

Do not commit files from dist/, build/, or *.egg-info.