build: add bootstap task

This commit is contained in:
Daylin Morgan 2024-03-08 12:57:04 -06:00
parent 151ec62d21
commit 2aa643ad79
Signed by: daylin
GPG key ID: 950D13E9719334AD

View file

@ -2,9 +2,21 @@
__import__("sys").path.append("src") # noqa __import__("sys").path.append("src") # noqa
import shutil
import sys
import swydd as s import swydd as s
@s.task
def bootstrap():
"""setup swydd dev environment"""
if not shutil.which("pdm"):
sys.exit("pdm necessary for swydd development")
s.sh("pdm install")
s.sh("pdm run pre-commit install")
@s.task @s.task
@s.option("types", "also run mypy") @s.option("types", "also run mypy")
def check(types: bool = False): def check(types: bool = False):