Recommended Setup
We use modern, Rust-based tooling to keep the development environment fast, reproducible, and free of dependency conflicts.
1. uv (Environment & Package Management)¶
uv replaces pip, virtualenv, and poetry. It manages our dependencies, locks versions, and
ensures perfectly isolated virtual environments.
Install
uv: Runcurl -LsSf https://astral.sh/uv/install.sh | sh(Mac/Linux) or check the official docs for Windows/Homebrew methods.Bootstrap the project: Run
uv sync --all-extras --devin the root directory. This readspyproject.toml, resolves dependencies, and automatically creates the.venvfolder.Run commands: Always prefix development commands with
uv runto ensure they execute inside the isolated environment (e.g.,uv run pytest).Add dependencies: Do not use
pip install. Instead, runuv add <package_name>. This automatically updatespyproject.tomland the lockfile.
2. MATLAB Engine for Python¶
Some functions call into MATLAB. Install the matlabengine version matching your local MATLAB
installation — see the MATLAB Engine for Python PyPI page
for the version table, then:
uv add "matlabengine==<version>"3. ruff (Linting & Formatting)¶
Format code: Run
uv run ruff format .Lint code: Run
uv run ruff check .Auto-fix issues: Run
uv run ruff check . --fix
4. VS Code Configuration¶
Recommended extensions:
Settings (.vscode/settings.json):
{
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python",
"[python]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.codeActionsOnSave": {
"source.fixAll.ruff": true,
"source.organizeImports.ruff": true
}
}
}