Skip to content

Instantly share code, notes, and snippets.

@nilreml
Last active March 25, 2024 10:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nilreml/e00e589d3aee60e922f9d0db4f3b57b8 to your computer and use it in GitHub Desktop.
Save nilreml/e00e589d3aee60e922f9d0db4f3b57b8 to your computer and use it in GitHub Desktop.
Bash completions:
mkdir -p ${XDG_DATA_HOME:-~/.local/share}/bash-completion/completions
poetry completions bash > ${XDG_DATA_HOME:-~/.local/share}/bash-completion/completions/poetry
Enter virtual environment:
poetry shell
Exit virtual environment:
exit
Sync poetry.lock with pyproject.toml:
poetry lock --no-update
Install dependencies inside virtual environment, in sync with poetry.lock:
poetry shell
poetry install --sync
Recreate virtual environment:
poetry shell
poetry env remove $(which python)
poetry install
Recreate dependency graph (poetry.lock):
rm poetry.lock
poetry lock
Rename main module:
pyproject.toml -> tool.poetry -> name
poetry shell
poetry update
poetry install --sync
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment