Skip to content

Latest commit

 

History

History
41 lines (30 loc) · 1.95 KB

CONTRIBUTING.md

File metadata and controls

41 lines (30 loc) · 1.95 KB

Contributing

This extension is based on the Template for VS Code Python tools extensions.

Development

Getting Started

  • Install uv
  • Install just, or see the justfile for corresponding commands.
  • Create and activate a virtual environment (e.g., uv venv && source .venv/bin/activate).
  • Install development dependencies (just install).
  • To automatically format the codebase, run: just fmt.
  • To run lint and type checks, run: just check.
  • To run tests, run: just test.

To run the extension, navigate to src/extension.ts and run (F5). You should see the LSP output and Python log messages in the debug console under "Python Server".

Modifying the LSP

  • Clone ruff-lsp to, e.g., ../ruff-lsp.
  • In ../ruff-lsp, run: uv pip install -t ../ruff-vscode/bundled/libs/ -e ..

Using a custom version of ruff

  • Clone ruff to, e.g., /home/ferris/ruff.
  • Run cargo build in the Ruff repository.
  • Set "Ruff: Path" to /home/ferris/ruff/target/debug/ruff in the VS Code settings.

Release

  • Make sure you have Python 3.7 installed and locatable by uv. (If you're using pyenv, you may need to run pyenv local 3.7.)
  • Run uv run --python=3.7 scripts/release.py. (Run uv run --python=3.7 scripts/release.py --help for information on what this script does, and its various options.)
  • Check the changes the script made, copy-edit the changelog, and commit the changes.
  • Create a new PR and merge it.
  • Create a new Release, enter x.x.x (where x.x.x is the new version) into the Choose a tag selector. Click Generate release notes, curate the release notes and publish the release.
  • The Release workflow publishes the extension to the VS Code marketplace.