/vscode-python-tox

Visual Studio Code plugin for the Python tox task automation tool

Primary LanguageTypeScriptMIT LicenseMIT

python-tox extension for Visual Studio Code

tox logo VS Code logo

VS Marketplace Version VS Marketplace Installs VS Marketplace Ratings

Open VSX Version Open VSX Downloads Open VSX Ratings

CI Sponsor

This extension integrates the tox task automation tool with Visual Studio Code.

Features

Commands to run single or multiple tox environments, with or without additional arguments:

Running single environment

Running multiple environments

Specifying arguments

Integration with VS Code's testing feature when opening a tox.ini file:

Test integration

Hover information for environment variables while editing a tox.ini file:

Hover information

Installing

For VSpaceCode, consider a configuration such as:

    "vspacecode.bindingOverrides": [
        {
            "keys": ["m", "languageId:python", "c", "t"],
            "name": "+Tox",
            "icon": "play",
            "type": "bindings",
            "bindings": [
                {
                    "key": "t",
                    "name": "Run tox",
                    "icon": "play",
                    "type": "command",
                    "command": "python-tox.select"
                },
                {
                    "key": "T",
                    "name": "Run tox with arguments",
                    "icon": "play-circle",
                    "type": "command",
                    "command": "python-tox.selectWithArgs"
                },
                {
                    "key": "m",
                    "name": "Run tox (multiple)",
                    "icon": "run-all",
                    "type": "command",
                    "command": "python-tox.selectMultiple"
                },
                {
                    "key": "M",
                    "name": "Run tox (multiple) with arguments",
                    "icon": "run-all",
                    "type": "command",
                    "command": "python-tox.selectMultipleWithArgs"
                },
                {
                    "key": "?",
                    "name": "Show tox documentation",
                    "icon": "book",
                    "type": "command",
                    "command": "python-tox.openDocs"
                }
            ]
        },
        // ...
    ]

To get a development build of the latest commit, you can:

  • Go to the GitHub Actions tab, view the newest passing run and download an automated build from the "Artifacts" section.
  • Or clone the repository and run npm run package

Then install the resulting .vsix file using the command palette and selecting "Extensions: Install from VSIX...".

Extension Commands

  • python-tox.select: Show a menu allowing to pick a tox environment.
  • python-tox.selectWithArgs: Show a menu allowing to pick a tox environment, then ask for custom arguments.
  • python-tox.selectMultiple: Show a menu allowing to pick multiple tox environments.
  • python-tox.selectMultipleWithArgs: Show a menu allowing to pick multiple tox environments, then ask for custom arguments.
  • python-tox.openDocs: Open the tox documentation in the web browser.

Suggested extensions

Release Notes

See CHANGELOG.md.

Releasing checklist

  • Double-check the CI
  • npm version <major|minor|patch>
  • git push origin
  • git push origin vX.Y.Z
  • Lean back and let the CI do the rest