Files
openpilot-evo/pyproject.toml
T
Jason Wen 7461f70fdb Merge commit 'b7c333cf3fee117779515c9ebfd7b2beb164fa81' into sync-20260813
# Conflicts:
#	README.md
#	SConstruct
#	conftest.py
#	docs/CARS.md
#	msgq_repo
#	opendbc_repo
#	openpilot/common/params_keys.h
#	openpilot/common/params_pyx.pyx
#	openpilot/common/tests/test_swaglog.cc
#	openpilot/selfdrive/car/card.py
#	openpilot/selfdrive/car/tests/test_car_interfaces.py
#	openpilot/selfdrive/car/tests/test_cruise_speed.py
#	openpilot/selfdrive/car/tests/test_models.py
#	openpilot/selfdrive/controls/controlsd.py
#	openpilot/selfdrive/controls/lib/latcontrol_torque.py
#	openpilot/selfdrive/controls/lib/longitudinal_planner.py
#	openpilot/selfdrive/controls/plannerd.py
#	openpilot/selfdrive/controls/radard.py
#	openpilot/selfdrive/controls/tests/test_longcontrol.py
#	openpilot/selfdrive/locationd/torqued.py
#	openpilot/selfdrive/modeld/modeld.py
#	openpilot/selfdrive/monitoring/dmonitoringd.py
#	openpilot/selfdrive/monitoring/test_monitoring.py
#	openpilot/selfdrive/selfdrived/selfdrived.py
#	openpilot/selfdrive/selfdrived/tests/test_alertmanager.py
#	openpilot/selfdrive/test/longitudinal_maneuvers/plant.py
#	openpilot/selfdrive/test/process_replay/migration.py
#	openpilot/selfdrive/test/process_replay/process_replay.py
#	openpilot/selfdrive/ui/feedback/feedbackd.py
#	openpilot/selfdrive/ui/layouts/settings/device.py
#	openpilot/selfdrive/ui/layouts/settings/toggles.py
#	openpilot/selfdrive/ui/mici/layouts/onboarding.py
#	openpilot/selfdrive/ui/onroad/augmented_road_view.py
#	openpilot/selfdrive/ui/tests/test_soundd.py
#	openpilot/selfdrive/ui/translations/app.pot
#	openpilot/selfdrive/ui/translations/app_de.po
#	openpilot/selfdrive/ui/translations/app_en.po
#	openpilot/selfdrive/ui/translations/app_es.po
#	openpilot/selfdrive/ui/translations/app_fr.po
#	openpilot/selfdrive/ui/translations/app_ja.po
#	openpilot/selfdrive/ui/translations/app_ko.po
#	openpilot/selfdrive/ui/translations/app_pt-BR.po
#	openpilot/selfdrive/ui/translations/app_th.po
#	openpilot/selfdrive/ui/translations/app_tr.po
#	openpilot/selfdrive/ui/translations/app_uk.po
#	openpilot/selfdrive/ui/translations/app_zh-CHS.po
#	openpilot/selfdrive/ui/translations/app_zh-CHT.po
#	openpilot/system/athena/athenad.py
#	openpilot/system/hardware/hardwared.py
#	openpilot/system/loggerd/deleter.py
#	openpilot/system/manager/process_config.py
#	openpilot/system/ui/lib/application.py
#	panda
#	pyproject.toml
#	tinygrad_repo
#	uv.lock
2026-08-14 15:35:10 -04:00

208 lines
5.8 KiB
TOML

[project]
name = "openpilot"
requires-python = ">= 3.12.3, < 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"}
]
# ------------------------------------------
# > this dependencies list *only* goes down.
# ------------------------------------------
# Linux and Python is all we need, otherwise
# we write and own the lines ourselves.
# ------------------------------------------
dependencies = [
# multiple users
"sounddevice", # micd + soundd
"requests", # many one-off uses
"tqdm", # cars (fw_versions.py) on start + many one-off uses
# core
"scons",
"pycapnp==2.1.0", # 2.2 introduces a memory leak due to cyclic references
"numpy >=2.0",
# vendored native dependencies
"comma-deps-capnproto",
"comma-deps-acados",
"comma-deps-ffmpeg",
"comma-deps-zstd",
"comma-deps-zeromq",
"comma-deps-json11",
"comma-deps-git-lfs",
"comma-deps-gcc-arm-none-eabi",
# athena
"PyJWT[crypto]",
"websocket_client",
# joystickd
"inputs",
# these should be removed
"pyzmq",
"sentry-sdk",
"setproctitle",
"jeepney",
"zstandard", # this can go once we're on Python 3.14+
# ui
"comma-deps-raylib",
]
[project.optional-dependencies]
docs = [
"zensical",
]
dev = [
"huggingface_hub",
]
testing = [
"coverage",
"ty",
"pytest",
"pytest-cpp",
"pytest-subtests",
"pytest-xdist @ git+https://github.com/sshane/pytest-xdist@2b4372bd62699fb412c4fe2f95bf9f01bd2018da",
"pytest-mock",
"ruff",
"codespell",
]
tools = [
"matplotlib",
"comma-deps-imgui",
"comma-deps-bootstrap-icons",
"comma-deps-libusb",
"comma-deps-ncurses",
# this can be added back once it's stripped down some more
#"metadrive-simulator @ git+https://github.com/commaai/metadrive.git@minimal ; (platform_machine != 'aarch64')",
]
submodules = [
"msgq",
"opendbc",
"pandacan",
"rednose",
"teleoprtc",
"tinygrad",
]
[project.urls]
Homepage = "https://github.com/commaai/openpilot"
[dependency-groups]
standalone = [
"openpilot[submodules]",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = [
"openpilot",
]
[tool.hatch.metadata]
allow-direct-references = true
# TODO-SP: upstream replaced pytest with a custom unittest runner (tools/test_runner.py).
# Remove this section and the pytest deps once sunnypilot tests are migrated to unittest.
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-Werror --strict-config --strict-markers --durations=10 -n auto --dist=loadgroup"
python_files = "test_*.py"
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",
"skip_tici_setup: mark test to skip tici setup fixture",
"nocapture: don't capture test output",
"shared_download_cache: share download cache between tests",
"xdist_group_class_property: group tests by a property of the class that contains them",
]
testpaths = [
"openpilot",
]
[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,TGE,abl,lite,ser"
builtin = "clear,rare,informal,code,names,en-GB_to_en-US"
skip = "*.po, uv.lock, *.onnx, *.pem, */c_generated_code/*, docs/assets/*, openpilot/tools/plotjuggler/layouts/*, openpilot/selfdrive/assets/offroad/mici_fcc.html, ./openpilot/third_party/*, ./openpilot/cereal/gen/*"
# https://docs.astral.sh/ruff/configuration/#using-pyprojecttoml
[tool.ruff]
indent-width = 2
lint.select = [
"E", "F", "W", "PIE", "C4", "ISC", "A", "B",
"NPY", # numpy
"UP", # pyupgrade
"ASYNC",
"B904", "B905",
"PLC0207",
"TRY203", "TRY400", "TRY401", # try/excepts
"RUF006", "RUF008", "RUF009", "RUF061", "RUF064", "RUF100", "RUF102", "RUF103", "RUF104",
"TID251",
"PLE", "PLR1704",
]
lint.ignore = [
"E741",
"E402",
"B027",
"UP007", # this doesn't play nice with raylib atm
]
line-length = 160
exclude = [
"openpilot/cereal",
"openpilot/third_party",
"*.ipynb",
"generated",
]
lint.flake8-implicit-str-concat.allow-multiline = false
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"pytest.main".msg = "pytest.main requires special handling that is easy to mess up!"
"time.time".msg = "Use time.monotonic. time.time can skip due to its reference clock, you probably want a monotonic clock"
"pyray.measure_text_ex".msg = "Use openpilot.system.ui.lib.text_measure"
"pyray.is_mouse_button_pressed".msg = "This can miss events. Use Widget._handle_mouse_press"
"pyray.is_mouse_button_released".msg = "This can miss events. Use Widget._handle_mouse_release"
"pyray.draw_text".msg = "Use a function (such as rl.draw_font_ex) that takes font as an argument"
"pyray.draw_texture".msg = "Use rl.draw_texture_ex for float position support"
[tool.ruff.format]
quote-style = "preserve"
[tool.ty.src]
exclude = [
"openpilot/third_party/",
]
[tool.ty.rules]
unresolved-import = "ignore" # Cython-compiled modules (.pyx)
unresolved-attribute = "ignore" # many from capnp and Cython modules
[tool.uv]
python-preference = "only-managed"
default-groups = ["standalone"]
override-dependencies = [
"opendbc", # panda pins opendbc from git for standalone use; always use our submodule
]
[tool.uv.sources]
msgq = { path = "msgq_repo", editable = true }
opendbc = { path = "opendbc_repo", editable = true }
pandacan = { path = "panda", editable = true }
rednose = { path = "rednose_repo", editable = true }
teleoprtc = { path = "teleoprtc_repo", editable = true }
tinygrad = { path = "tinygrad_repo", editable = true }