chore: clean up web ui repo hygiene
This commit is contained in:
parent
94e62c9456
commit
2fcc9db903
4786 changed files with 1271 additions and 1275231 deletions
46
scripts/check_python_quality.sh
Executable file
46
scripts/check_python_quality.sh
Executable file
|
|
@ -0,0 +1,46 @@
|
|||
#!/usr/bin/env bash
|
||||
set -uo pipefail
|
||||
|
||||
status=0
|
||||
root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
python_files=(
|
||||
"app.py"
|
||||
)
|
||||
|
||||
run_check() {
|
||||
local label="$1"
|
||||
shift
|
||||
|
||||
echo "==> ${label}"
|
||||
if ! "$@"; then
|
||||
status=1
|
||||
fi
|
||||
echo
|
||||
}
|
||||
|
||||
cd "${root_dir}"
|
||||
|
||||
run_check \
|
||||
"Ruff format" \
|
||||
uv run --with "ruff>=0.15.0,<1.0.0" \
|
||||
ruff format --check "${python_files[@]}"
|
||||
run_check \
|
||||
"Ruff lint" \
|
||||
uv run --with "ruff>=0.15.0,<1.0.0" \
|
||||
ruff check "${python_files[@]}"
|
||||
run_check \
|
||||
"Deptry" \
|
||||
uv run --with "deptry>=0.24.0,<1.0.0" \
|
||||
deptry . \
|
||||
--requirements-files requirements.txt \
|
||||
--known-first-party app,supertonic_gateway,voice_rtc,wisper \
|
||||
--per-rule-ignores DEP002=uvicorn \
|
||||
--extend-exclude ".*/frontend/.*" \
|
||||
--extend-exclude ".*/\\.venv/.*" \
|
||||
--extend-exclude ".*/__pycache__/.*"
|
||||
run_check \
|
||||
"Vulture" \
|
||||
uv run --with "vulture>=2.15,<3.0.0" \
|
||||
vulture "${python_files[@]}" --min-confidence 80
|
||||
|
||||
exit "${status}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue