set shell := ["bash", "-eou", "pipefail", "-c"]

PYVENV := ".pyvenv"
PYTHON := PYVENV / "bin/python3"
PIP := PYVENV / "bin/pip3"

venv:
  [ -d {{PYVENV}} ] || python3 -m venv {{PYVENV}}

install-dep:
  just python -m pip install --upgrade pip python-lsp-server
  just python -m pip install -r requirements.txt

python *args: venv
  {{PYTHON}} {{args}}

watch-src args:
  watchexec -c -r -w ./src -e py --project-origin . {{args}}
