GitXplorerGitXplorer
b

WWBD

public
15 stars
1 forks
3 issues

Commits

List of commits on branch main.
Verified
a1f330fd01ba5fd6b11a688de9e94e4a557adfd0

Check that what `$VIRTUAL_ENV` is set to exists (#38)

bbrettcannon committed 3 years ago
Verified
b25a6be86f6a800e67add2e65a0c2c1f658f4894

Use `$VIRTUAL_ENV` when set (#37)

bbrettcannon committed 3 years ago
Verified
6d0c1b9d314416ff01b7f53672fd630e95f98b82

Prepare for releasing `2022.1.0` (#33)

bbrettcannon committed 3 years ago
Verified
2e2cca044f210602f9a7a38f0eea305ae52b0920

Add a `.gitignore` to the created virtual environment (#32)

bbrettcannon committed 3 years ago
Verified
dfa9b228d457c0e7b7c91a0f3f1dbc065adc02ad

Bump version to `2022.0.2` (#26)

bbrettcannon committed 3 years ago
Verified
03564df576e51792327dd478f16fc2609ad82945

Stop using `PYTHONUTF8` (#25)

bbrettcannon committed 3 years ago

README

The README file for this repository.

What Would Brett Do?

This EXPERIMENTAL extension is meant to help people set up a Python environment.

The project structure and user experience of this extension is very opinionated. While the supported project structures and workflows are considered common enough, do not be surprised if your particular workflow is not supported, especially if they would be considered advanced to someone new to Python.

This extension is meant act as a playground for the Python extension around environments and solicit feedback on this extension's functionality. If you have any feedback, please start a discussion. Popular functionality may make it's way into the Python extension itself.

Features

Automatic detection of activated virtual environments

If the VIRTUAL_ENV environment variable is set, WWBD will use that to set the selected Python environment.

Create Environment command

  1. Use an appropriate interpreter (the selected interpreter, ask the user to use the newest version of Python installed, or ask the user to pick an interpreter).
  2. Create a virtual environment in the workspace that git will ignore: python -m venv .venv --prompt . && echo "*" > .venv/.gitignore.
  3. Find the most appropriate requirements file (file name contains dev and requirements and ends in .txt, or requirements.txt).
  4. Install the requirements into the environment: python -m pip install --requirement <requirements file>.

Requirements

  1. Python (must be an actively maintained version; typically any version less than 5 years old)
  2. venv (typically only missing on Debian-based Linux distros; install via python3-venv)
  3. pip (typically only missing on Debian-based Linux distros; install via python3-pip)
  4. Python extension (which will be installed automatically)

Extension Settings

N/A

Known Issues

  • The selected Python interpreter must have venv and pip available/installed (something Debian/Ubuntu users must watch out for).
  • Does not support multi-root workspaces (blindly selects the first workspace).
  • Does not try to be smart if no workspace is selected.