Skip to content

Commit

Permalink
remove test_generator; doesn't make sense now that we're building it …
Browse files Browse the repository at this point in the history
…in SCons
  • Loading branch information
adeebshihadeh committed Dec 15, 2024
1 parent 15705fb commit fd8471d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 28 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ jobs:
steps:
- uses: commaai/timeout@v1
- uses: actions/checkout@v4
- name: run ./test.sh
run: PYTHONPATH=. ./test.sh
- run: ./test.sh
22 changes: 0 additions & 22 deletions opendbc/dbc/generator/test_generator.py

This file was deleted.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ select = [
"E", "F", "W", "PIE", "C4", "ISC", "A", "B",
"NPY", # numpy
"UP", # pyupgrade
"TRY302", "TRY400", "TRY401", # try/excepts
"TRY203", "TRY400", "TRY401", # try/excepts
"RUF008", "RUF100",
"TID251",
"PLR1704",
Expand Down
11 changes: 8 additions & 3 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,30 @@ set -e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
cd $DIR

# check if uv is installed
# TODO: why doesn't uv do this?
export PYTHONPATH=$DIR

# *** dependencies install ***
if ! command -v uv &>/dev/null; then
echo "'uv' is not installed. Installing 'uv'..."
curl -LsSf https://astral.sh/uv/install.sh | sh
fi

# ensure we're up to date
uv sync --all-extras
source .venv/bin/activate

# *** build ***
uv run scons -j8


# *** lint ***
# TODO: pre-commit is slow; replace it with openpilot's "op lint"
#uv run pre-commit run --all-files
uv run ruff check .

# *** test ***
uv run pytest -n8

# *** all done ***
GREEN='\033[0;32m'
NC='\033[0m'
printf "\n${GREEN}All good!${NC} Finished build, lint, and test in ${SECONDS}s\n"

0 comments on commit fd8471d

Please sign in to comment.