Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ jobs:
- name: Run ruff format
run: uv run ruff format

- name: Run ruff linter for mdp folder
run: uv run ruff check src/behavior_generation_lecture_python/mdp
- name: Run ruff linter
run:
uv run ruff check

- name: Run mypy for mdp folder
run: uv run mypy src/behavior_generation_lecture_python/mdp
- name: Run mypy
run:
uv run mypy

- name: Test
run: |
Expand Down
43 changes: 43 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,46 @@ docs = [
requires = ["setuptools>=64.0.0", "wheel", "pip>=21.3.0"]
build-backend = "setuptools.build_meta"

[tool.ruff]
# Check src, scripts, and notebooks
include = ["src/**/*.py", "scripts/**/*.py", "notebooks/**/*.ipynb"]

# Exclude files that aren't ready yet
exclude = [
"notebooks/compare_models_notebook.ipynb",
"notebooks/lateral_control_riccati_notebook.ipynb",
"notebooks/lateral_control_state_based_notebook.ipynb",
"scripts/run_compare_dynamic_one_track_models.py",
"scripts/run_lateral_control_riccati.py",
"scripts/run_lateral_control_state_based.py",
"src/behavior_generation_lecture_python/finite_state_machine/traffic_light_visualization.py",
"src/behavior_generation_lecture_python/lateral_control_riccati/lateral_control_riccati.py",
]

[tool.ruff.lint]
# Ignore specific rules globally that are too noisy
ignore = [
"E731", # Do not assign a lambda expression, use a def
]

[tool.mypy]
python_version = "3.12"
strict = false # for now
ignore_missing_imports = true

# Files/folders to check (notebooks are checked by ruff, not mypy)
files = ["src", "scripts"]

# Exclude files/folders that aren't fully typed yet
exclude = [
"src/behavior_generation_lecture_python/finite_state_machine/",
"src/behavior_generation_lecture_python/vehicle_models/",
"src/behavior_generation_lecture_python/graph_search/",
"src/behavior_generation_lecture_python/utils/vizard/",
"src/behavior_generation_lecture_python/utils/grid_plotting.py",
"src/behavior_generation_lecture_python/lateral_control_riccati/lateral_control_riccati.py",
"scripts/run_finite_state_machine_cli.py",
"scripts/run_finite_state_machine_visu.py",
"scripts/run_compare_dynamic_one_track_models.py",
"scripts/run_a_star.py",
]