From 670551d4d8fdeaffdf054f765107607af92a1a02 Mon Sep 17 00:00:00 2001 From: scosman Date: Sun, 18 Aug 2024 01:10:40 -0400 Subject: [PATCH] Add checks script for use in pre-commit --- checks.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 checks.sh diff --git a/checks.sh b/checks.sh new file mode 100755 index 00000000..f1972408 --- /dev/null +++ b/checks.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +# Check our project: formatting, linting, testing, building, etc. +# Good to call this from .git/hooks/pre-commit + +set -e + +# work from the root of the repo +cd "$(dirname "$0")" + +echo "Checking Python" +ruff check +ruff format --check + +echo "checking Web UI" +cd src/web_ui +npm run format_check +npm run lint +npm run check +cd ../.. + +echo "checking Core: build, test" +cd core +hatch build +hatch test +cd .. + +echo "checking Studio: build, test" +cd studio +hatch build +hatch test +cd ..