From 2aa643ad79cf41a66ed83950543d029cbadd915e Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Fri, 8 Mar 2024 12:57:04 -0600 Subject: [PATCH] build: add bootstap task --- tasks.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tasks.py b/tasks.py index 7732bbd..2833aaa 100755 --- a/tasks.py +++ b/tasks.py @@ -2,9 +2,21 @@ __import__("sys").path.append("src") # noqa +import shutil +import sys + 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.option("types", "also run mypy") def check(types: bool = False):