Thank you for contributing to this project! This guide explains how to set up your development environment (recommended: VS Code + Dev Container) and how to contribute code following our workflow and style rules.
GitHub Path: .github/CONTRIBUTING.md
- Overview
- System Requirements
- Recommended Setup: Clone in Container Volume
- Alternative Setup: Local Clone (Not Recommended)
- Windows Users (WSL2 Required)
- China Mainland Network Mirrors
- Dev Container Commands & Debugging
- Commit & Pull Request Workflow
- Code Style, Pre-commit & Testing
- Issues & Community Conduct
This project uses VS Code + Dev Container to provide a consistent, containerized development environment.
✅ Recommended: Use “Dev Containers: Clone Repository in Container Volume...” directly from VS Code to avoid permission issues.
- OS: Linux / macOS / Windows (with WSL2)
- Python: ≥ 3.11 (for runtime inside container)
- VS Code Extensions:
- Dev Containers
- Remote - WSL (Windows only)
- Docker: Docker Desktop (with WSL2 backend) or native Docker
- Reference: See
.devcontainer/Dockerfilefor the environment build details.
⚠️ On Windows, you do not need to install Python or any build tools inside WSL manually. The container environment handles everything.
- Open VS Code.
- Press:
- Windows/Linux:
Ctrl + Shift + P - macOS:
Cmd + Shift + P
- Windows/Linux:
- Type
Dev Containers: Clone Repository in Container Volume...and press Enter. - Enter your repository URL (e.g.,
https://github.com/<org>/<repo>.git). - VS Code will automatically:
- Clone the repository into a Docker-managed volume.
- Build and open the containerized environment.
Advantages:
- Avoids UID/GID conflicts.
- All dependencies and configs remain inside the container.
If you prefer cloning locally:
git clone <repo-url>
cd <repo>
code .Then open via command:
Dev Containers: Open Folder in Container
- Enable WSL2:
wsl --install -d Ubuntu wsl --set-default-version 2
- No need to install Python or compilers manually. Just ensure Docker Desktop (WSL2 backend) and VS Code Dev Container extensions are installed.
- Clone or open repositories inside WSL’s Linux filesystem:
- Example path:
/home/<user>/<repo> - Avoid using
C:\drives to prevent performance and permission issues.
- Example path:
For users in China Mainland, set mirrors before building:
export APT_MIRROR_DOMAIN="mirrors.tuna.tsinghua.edu.cn"
export PIP_MIRROR_DOMAIN="pypi.tuna.tsinghua.edu.cn"These variables are supported inside devcontainer/Dockerfile.
| Command | Description |
|---|---|
| Reopen in Container | Open current folder inside container |
| Rebuild Container | Rebuild environment |
| Clone Repository in Container Volume | Recommended workflow |
| Show Container Log | View build logs and errors |
-
Create a branch:
git checkout -b feat/add-feature
-
Follow Conventional Commits message format:
feat:→ New featurefix:→ Bug fixchore:→ Tooling, configs, or non-functional updatesdocs:→ Documentation onlyrefactor:→ Code restructuretest:→ Test-only changes
-
Example:
feat: add user authentication chore: update pre-commit hooks fix: correct API endpoint error
-
Push and open a Pull Request. GitHub Actions will validate your commit messages automatically.
- Pre-commit is preinstalled inside the container.
- It automatically runs:
ruff→ Linting and static analysismypy→ Type checking
- Fix all reported issues before committing.
- Tests use
pytest(unless specified otherwise).
When opening Issues:
- Include steps to reproduce, logs, and your environment info.
- Be respectful, concise, and follow community guidelines.
File Path:
- English:
.github/CONTRIBUTING.md - Chinese:
.github/CONTRIBUTING.zh.md