mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-06-24 16:32:08 +08:00
ee5c1c4507
* allow re-regage * bump opendbc * bump panda * apply pause/resume fix for hyundai (should do this in a separate PR) * bump opendbc * fix * rename * Fix? * make sure to disengage for allow always cars * fix * combine * more fix * not needed * check if engagement is from openpilot's state machine * Rename * fix panda safety * fix * no fake lfa button for @devtekve ;) * fix non drive gear re-engage * fix settings * combine * add replace method * use replace * remoev already checks if it exists * fix * group * add todo * reserve events * cleaner * hyundai: only allow for cars with lfa button * sunnyParams * make sure it's car only * Move car-specific changes to opendbc * no need * bump opendbc * more fixes * no more available * more! * final? * always emit user disable * no longer needed * move unit test * add sunnypilot to unit tests * bump opendbc * use new cereal * bump opendbc * static analysis * no unittest * no need available * UI border update * show MADS updates * Add TODO * no longer needed * fix changed events * fix cluster enabled * don't add pre enable if not long * should use enabled * enabled <-> active * better format * bump opendbc * static analysis * static analysis * Rename test as collector was dying * Show our overriding * Revert "show MADS updates" This reverts commitdaf0ad62Revert "fix changed events" This reverts commit31d8c97f* ignoring reserved events * adjusting creation delays * back to stock removing allow_cancel * should be enabled * revert * silent lkas disable * no need * user disable tests * just warning * MUST REMOVE test process replay * fix no entry * fixme * bump opendbc * need this check * cleanup * allow entering paused state if no entry from disabled * brake hold should apply to all * in lists * update unit test * simpler * unused * same thing * fix * only mads in enabled state and long in disabled state * unify silent enable * do this for dlob * bump submodules * fix * bump submodules * bump opendbc * less frequent * more events * fix * allow no entry to paused for non-drive gears * fix * use cereal * Revert "allow no entry to paused for non-drive gears" This reverts commit6d64a4dd9c. * allow in all * Revert "allow in all" This reverts commit6375f14891. * should not be all! * rename for clarity * silent park brake * flipped * bump submodules * Bump to latest mads-new panda * bump panda * more nissan * bump panda * bump msgq * bump panda * bump submodules * bump opendbc * bump opendbc * improving the state * Revert "PlayStation® model (#34133)" This reverts commit5160bee543. * should be none * bump panda * bump opendbc * Apply suggestions from code review * bump panda * bump ref panda * add todo-sp * bump panda ref * bump more panda * changing refs * nuke nuke nuke * use sunny's newer states * bump with new panda * bump panda * Parse more flags from alt exp, more tests, hyundai main cruise allowed * Parse more flags from alt exp, more tests, hyundai main cruise allowed * missed * mutation for controls allowed rising edge * ford mutation * license * remove * unused * bump submodules * use always allowed mads button alt exp * fix * whitelist jason's lastname to codespell * test_processes: update ref logs to82c0278* bump submodules * bump submodules * bump submodules * bump panda * add controls mismatch lateral event * Simplify lateral disengagement logic for MADS configuration Reversed the conditional to align the logic with the `disengage_lateral_on_brake` parameter. This ensures that lateral disengagement behavior is more intuitive and matches the expected configuration. Improves code readability and reduces potential misconfigurations. * remove unified engagement mode in panda * controls allow should be allowed at all times * squash! treat MADS button as user entry * heartbeat for mads * heartbeat mismatch exit control * remove always allow mads button from alt * move to safety_mads * remove main cruise allowed from alt * bump panda * heartbeat engaged mads mismatch mutation test * bump panda * use mads the third panda * ignore pre enable with mads * only force exit if actually actuating * use brake signal instead of pedal events when dlob is active * fix tests * fix panda tests * bump panda * new events to retain long blocks * format * uem: do not engage mads if long is engaged * bump submodules * fix not allowed engaged bug * block uem from engaging * flipped * use different heartbeat check if dlob * hard code to skip heartbeat check * remove toyota lta status for lkas, causes weird behaviors * block tesla * bump panda * bump to merged panda * bump opendbc * bump opendbc * bump opendbc * bump opendbc * Apply suggestions from code review * code ignore spells * needs to be in carstate * Bump opendbc * Update MADS toggle descriptions for clarity. Added notes to clarify behavior of the "MadsMainCruiseAllowed" setting, particularly its impact on vehicles without LFA/LKAS buttons. This ensures users are informed about potential implications when disabling this feature. * Updating translations + Adding spanish * Disengage Lateral on Brake -> Pause Lateral on Brake * test_processes: update ref logs todd41005* Apply suggestions from code review * fix mads button not allowed * bump submodules * bump submodule * test_processes: update ref logs to0a0b998* has multiple lists * Revert "has multiple lists" This reverts commita37c1d26fe. * base * Reapply "has multiple lists" This reverts commitd1cd8dcc81. * migrate mads toggles to sp panel * this is why it keeps crashing * house keeping * more housekeeping * more housekeeping * don't show description by default (yet) * reset to main panel when clicked away * more * some more with interactions * don't stretch cause it looks weird with descriptions * simpler to handle offroad transition * some are toggleable while onroad * remove unused event * slight cleanup * default to true for HKG main cruise toggle * append to list after * add Customize MADS to UI preview * simpler * move to sp list * how tf was this removed * update mads settings button on show event * test_processes: update ref logs toefa9c32--------- Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
268 lines
6.0 KiB
TOML
268 lines
6.0 KiB
TOML
[project]
|
|
name = "openpilot"
|
|
requires-python = ">= 3.11, < 3.13"
|
|
license = {text = "MIT License"}
|
|
version = "0.1.0"
|
|
description = "an open source driver assistance system"
|
|
authors = [
|
|
{name ="Vehicle Researcher", email="user@comma.ai"}
|
|
]
|
|
|
|
dependencies = [
|
|
# multiple users
|
|
"sounddevice", # micd + soundd
|
|
"pyserial", # pigeond + qcomgpsd
|
|
"requests", # many one-off uses
|
|
"sympy", # rednose + friends
|
|
"crcmod", # cars + qcomgpsd
|
|
"tqdm", # cars (fw_versions.py) on start + many one-off uses
|
|
|
|
# hardwared
|
|
"smbus2", # configuring amp
|
|
|
|
# core
|
|
"cffi",
|
|
"scons",
|
|
"pycapnp",
|
|
"Cython",
|
|
"setuptools",
|
|
"numpy < 2.0.0",
|
|
|
|
# body / webrtcd
|
|
"aiohttp",
|
|
"aiortc",
|
|
# aiortc does not put an upper bound on pyopenssl and is now incompatible
|
|
# with the latest release
|
|
"pyopenssl < 24.3.0",
|
|
"pyaudio",
|
|
|
|
# panda
|
|
"libusb1",
|
|
"spidev; platform_system == 'Linux'",
|
|
|
|
# modeld
|
|
"onnx >= 1.14.0",
|
|
"onnxruntime >=1.16.3",
|
|
|
|
# logging
|
|
"pyzmq",
|
|
"sentry-sdk",
|
|
|
|
# athena
|
|
"PyJWT",
|
|
"json-rpc",
|
|
"websocket_client",
|
|
|
|
# acados deps
|
|
"casadi >=3.6.6", # 3.12 fixed in 3.6.6
|
|
"future-fstrings",
|
|
|
|
# joystickd
|
|
"inputs",
|
|
|
|
# these should be removed
|
|
"psutil",
|
|
"pycryptodome", # used in updated/casync, panda, body, and a test
|
|
"setproctitle",
|
|
|
|
# logreader
|
|
"zstandard",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
docs = [
|
|
"Jinja2",
|
|
"natsort",
|
|
"mkdocs",
|
|
]
|
|
|
|
testing = [
|
|
"coverage",
|
|
"hypothesis ==6.47.*",
|
|
"mypy",
|
|
"pytest",
|
|
"pytest-cov",
|
|
"pytest-cpp",
|
|
"pytest-subtests",
|
|
"pytest-xdist",
|
|
"pytest-timeout",
|
|
"pytest-randomly",
|
|
"pytest-asyncio",
|
|
"pytest-mock",
|
|
"pytest-repeat",
|
|
"ruff",
|
|
"codespell",
|
|
"pre-commit-hooks",
|
|
]
|
|
|
|
dev = [
|
|
"av",
|
|
"azure-identity",
|
|
"azure-storage-blob",
|
|
"dictdiffer",
|
|
"lru-dict",
|
|
"matplotlib",
|
|
"parameterized >=0.8, <0.9",
|
|
#"pprofile",
|
|
"pyautogui",
|
|
"pyopencl; platform_machine != 'aarch64'", # broken on arm64
|
|
"pytools < 2024.1.11; platform_machine != 'aarch64'", # pyopencl use a broken version
|
|
"pywinctl",
|
|
"pyprof2calltree",
|
|
"tabulate",
|
|
"types-requests",
|
|
"types-tabulate",
|
|
|
|
# this is only pinned since 5.15.11 is broken
|
|
"pyqt5 ==5.15.2; platform_machine == 'x86_64'", # no aarch64 wheels for macOS/linux
|
|
]
|
|
|
|
tools = [
|
|
"metadrive-simulator @ https://github.com/commaai/metadrive/releases/download/MetaDrive-minimal/metadrive_simulator-0.4.2.3-py3-none-any.whl ; (platform_machine != 'aarch64')",
|
|
"rerun-sdk >= 0.18",
|
|
]
|
|
|
|
[project.urls]
|
|
Homepage = "https://comma.ai"
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = [ "." ]
|
|
|
|
[tool.hatch.metadata]
|
|
allow-direct-references = true
|
|
|
|
[tool.pytest.ini_options]
|
|
minversion = "6.0"
|
|
addopts = "--ignore=openpilot/ --ignore=opendbc/ --ignore=panda/ --ignore=rednose_repo/ --ignore=tinygrad_repo/ --ignore=teleoprtc_repo/ --ignore=msgq/ -Werror --strict-config --strict-markers --durations=10 -n auto --dist=loadgroup"
|
|
cpp_files = "test_*"
|
|
cpp_harness = "selfdrive/test/cpp_harness.py"
|
|
python_files = "test_*.py"
|
|
asyncio_default_fixture_loop_scope = "function"
|
|
#timeout = "30" # you get this long by default
|
|
markers = [
|
|
"slow: tests that take awhile to run and can be skipped with -m 'not slow'",
|
|
"tici: tests that are only meant to run on the C3/C3X",
|
|
]
|
|
testpaths = [
|
|
"common",
|
|
"selfdrive",
|
|
"system/updated",
|
|
"system/athena",
|
|
"system/camerad",
|
|
"system/hardware",
|
|
"system/loggerd",
|
|
"system/proclogd",
|
|
"system/tests",
|
|
"system/ubloxd",
|
|
"system/webrtc",
|
|
"tools/lib/tests",
|
|
"tools/replay",
|
|
"tools/cabana",
|
|
"cereal/messaging/tests",
|
|
"sunnypilot",
|
|
]
|
|
|
|
[tool.codespell]
|
|
quiet-level = 3
|
|
# if you've got a short variable name that's getting flagged, add it here
|
|
ignore-words-list = "bu,ro,te,ue,alo,hda,ois,nam,nams,ned,som,parm,setts,inout,warmup,bumb,nd,sie,preints,whit,indexIn,ws,uint,grey,deque,stdio,amin,BA,LITE,atEnd,UIs,errorString,arange,FocusIn,od,tim,relA,hist,copyable,jupyter,thead"
|
|
builtin = "clear,rare,informal,code,names,en-GB_to_en-US"
|
|
skip = "./third_party/*, ./tinygrad/*, ./tinygrad_repo/*, ./msgq/*, ./panda/*, ./opendbc/*, ./opendbc_repo/*, ./rednose/*, ./rednose_repo/*, ./teleoprtc/*, ./teleoprtc_repo/*, *.ts, uv.lock, *.onnx, ./cereal/gen/*, */c_generated_code/*"
|
|
|
|
[tool.mypy]
|
|
python_version = "3.11"
|
|
plugins = [
|
|
"numpy.typing.mypy_plugin",
|
|
]
|
|
exclude = [
|
|
"cereal/",
|
|
"msgq/",
|
|
"msgq_repo/",
|
|
"opendbc/",
|
|
"opendbc_repo/",
|
|
"panda/",
|
|
"rednose/",
|
|
"rednose_repo/",
|
|
"tinygrad/",
|
|
"tinygrad_repo/",
|
|
"teleoprtc/",
|
|
"teleoprtc_repo/",
|
|
"third_party/",
|
|
]
|
|
|
|
# third-party packages
|
|
ignore_missing_imports=true
|
|
|
|
# helpful warnings
|
|
warn_redundant_casts=true
|
|
warn_unreachable=true
|
|
warn_unused_ignores=true
|
|
|
|
# restrict dynamic typing
|
|
warn_return_any=true
|
|
|
|
# allow implicit optionals for default args
|
|
implicit_optional = true
|
|
|
|
local_partial_types=true
|
|
explicit_package_bases=true
|
|
disable_error_code = "annotation-unchecked"
|
|
|
|
# https://beta.ruff.rs/docs/configuration/#using-pyprojecttoml
|
|
[tool.ruff]
|
|
indent-width = 2
|
|
lint.select = [
|
|
"E", "F", "W", "PIE", "C4", "ISC", "A", "B",
|
|
"NPY", # numpy
|
|
"UP", # pyupgrade
|
|
"TRY302", "TRY400", "TRY401", # try/excepts
|
|
"RUF008", "RUF100",
|
|
"TID251",
|
|
"PLR1704",
|
|
]
|
|
lint.ignore = [
|
|
"E741",
|
|
"E402",
|
|
"C408",
|
|
"ISC003",
|
|
"B027",
|
|
"B024",
|
|
"NPY002", # new numpy random syntax is worse
|
|
"UP038", # (x, y) -> x|y for isinstance
|
|
]
|
|
line-length = 160
|
|
target-version ="py311"
|
|
exclude = [
|
|
"body",
|
|
"cereal",
|
|
"panda",
|
|
"opendbc",
|
|
"opendbc_repo",
|
|
"rednose_repo",
|
|
"tinygrad_repo",
|
|
"teleoprtc",
|
|
"teleoprtc_repo",
|
|
"third_party",
|
|
"*.ipynb",
|
|
]
|
|
lint.flake8-implicit-str-concat.allow-multiline = false
|
|
|
|
[tool.ruff.lint.flake8-tidy-imports.banned-api]
|
|
"selfdrive".msg = "Use openpilot.selfdrive"
|
|
"common".msg = "Use openpilot.common"
|
|
"system".msg = "Use openpilot.system"
|
|
"third_party".msg = "Use openpilot.third_party"
|
|
"tools".msg = "Use openpilot.tools"
|
|
"pytest.main".msg = "pytest.main requires special handling that is easy to mess up!"
|
|
"unittest".msg = "Use pytest"
|
|
|
|
[tool.coverage.run]
|
|
concurrency = ["multiprocessing", "thread"]
|
|
|
|
[tool.ruff.format]
|
|
quote-style = "preserve"
|