Skip to content

Commit

Permalink
Type checking fixes, colors, and speedup for check script
Browse files Browse the repository at this point in the history
  • Loading branch information
scosman committed Aug 18, 2024
1 parent 469f829 commit 68ddfd9
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,39 @@ set -e
# work from the root of the repo
cd "$(dirname "$0")"

echo "Checking Python"
headerStart="\n\033[4;34m=== "
headerEnd=" ===\033[0m\n"

echo "${headerStart}Checking Python: Ruff, format, check${headerEnd}"
ruff check
ruff format --check

echo "checking Web UI"
cd src/web_ui
npm run format_check
npm run lint
npm run check
cd ../..
changed_files=$(git diff --name-only)

if [[ "$changed_files" == *"src/web_ui/"* ]]; then
echo "${headerStart}Checking Web UI: format, lint, check${headerEnd}"
cd src/web_ui
npm run format_check
npm run lint
npm run check
cd ../..
else
echo "${headerStart}Skipping Web UI: format, lint, check${headerEnd}"
fi

echo "checking Core: build, test"
echo "${headerStart}Checking Core: build, test${headerEnd}"
cd core
hatch build
hatch test
cd ..

echo "checking Studio: build, test"
echo "${headerStart}Checking Studio: build, test${headerEnd}"
cd studio
hatch build
hatch test
cd ..

echo "Checking Types Core"
echo "${headerStart}Checking Types${headerEnd}"
mypy --install-types
mypy src/core
mypy src/studio

0 comments on commit 68ddfd9

Please sign in to comment.