[project] name = "iqpilot" requires-python = ">= 3.12.3, < 3.13" license = {text = "Copyright © IQ.Lvbs, apart of Project Teal Lvbs, All Rights Reserved, licensed under https://konn3kt.com/tos"} version = "0.1.0" description = "an advanced 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", "crcmod-plus", # cars + qcomgpsd "tqdm", # cars (fw_versions.py) on start + many one-off uses # core "cffi", "scons", "pycapnp==2.1.0", "Cython", "setuptools", "numpy >=2.0", "msgq", "iqdbc", "panda", "teleoprtc", "tinygrad", # body / webrtcd "aiohttp", "aiortc", "libdatachannel-py>=2026.1.0.dev2", # 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", # logging "pyzmq", "sentry-sdk", "xattr ; sys_platform != 'win32'", # used in place of 'os.getxattr' for macOS compatibility # athena "PyJWT", "json-rpc", "websocket_client", # acados deps "casadi >=3.6.6", # 3.12 fixed in 3.6.6 # joystickd "inputs", # these should be removed "psutil", "pycryptodome", # used in updated/casync, panda, body, and a test "cryptography", # proprietary bundle signing / verification "setproctitle", # logreader "zstandard", # ui "raylib > 5.5.0.3", "pyzbar @ git+https://github.com/greatgitsby/op-dependencies.git@release-pyzbar#subdirectory=pyzbar ; sys_platform == 'linux'", "qrcode", "mapbox-earcut", "jeepney", ] [project.optional-dependencies] testing = [ "coverage", "hypothesis ==6.47.*", "jinja2", "ty", "pytest", "pytest-cpp", "pytest-subtests", # https://github.com/pytest-dev/pytest-xdist/pull/1229 "pytest-xdist @ git+https://github.com/sshane/pytest-xdist@2b4372bd62699fb412c4fe2f95bf9f01bd2018da", "pytest-timeout", "pytest-asyncio", "pytest-mock", "pytest-repeat", "ruff", "codespell", "pre-commit-hooks", ] dev = [ "av", "azure-identity", "azure-storage-blob", "dictdiffer", "matplotlib", "opencv-python-headless", "parameterized >=0.8, <0.9", "pyautogui", "pywinctl", "tabulate", ] tools = [ "imgui @ git+https://git.konn3kt.com/IQ.Lvbs/dependencies.git@release-imgui#subdirectory=imgui", "libusb @ git+https://git.konn3kt.com/IQ.Lvbs/dependencies.git@release-libusb#subdirectory=libusb", ] [project.urls] Homepage = "https://konn3kt.com" [build-system] requires = ["hatchling"] build-backend = "hatchling.build" [tool.hatch.build.targets.wheel] packages = [ ".", ] [tool.hatch.metadata] allow-direct-references = true [tool.uv.extra-build-dependencies] panda = ["iqdbc"] [tool.pytest.ini_options] minversion = "6.0" addopts = "--ignore=iqpilot/third_party -Werror --strict-config --strict-markers --durations=10" pythonpath = ["."] cpp_files = "test_*" cpp_harness = ".venv/bin/python3 iqpilot/selfdrive/test/cpp_harness.py" python_files = "test_*.py" asyncio_default_fixture_loop_scope = "function" xfail_strict = true #timeout = "30" # you get this long by default markers = [ "car_ports: public car-port integration tests run in the dedicated parallel lane", "linux: tests that require Linux services or IPC", "model_validation: model compilation or inference validation excluded from the current matrix", "release: tests that run against a release checkout", "slow: tests that run in the dedicated ARM64 slow lane", "tici: tests that are only meant to run on the C3/C3X", "skip_tici_setup: mark test to skip tici setup fixture" ] testpaths = [ "iqpilot/common", "iqpilot/selfdrive", "iqpilot/system", "iqpilot/tools", "iqpilot/cereal", "iqpilot", ] [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" builtin = "clear,rare,informal,code,names,en-GB_to_en-US" skip = "./iqpilot/third_party/*, *.po, uv.lock, *.onnx, ./iqpilot/cereal/gen/*, */c_generated_code/*, iqpilot/selfdrive/assets/offroad/mici_fcc.html, iqpilot/selfdrive/assets/*" # 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 "TRY203", "TRY400", "TRY401", # try/excepts "RUF008", "RUF100", "TID251", "PLE", "PLR1704", ] lint.ignore = [ "E741", "E402", "C408", "ISC003", "B027", "B024", "NPY002", # new numpy random syntax is worse "UP045", "UP007", # these don't play nice with raylib atm ] line-length = 160 target-version ="py311" exclude = [ "body", "cereal", "third_party", "*.ipynb", "generated", ] lint.flake8-implicit-str-concat.allow-multiline = false [tool.ruff.lint.flake8-tidy-imports.banned-api] "selfdrive".msg = "Use iqpilot.selfdrive" "common".msg = "Use iqpilot.common" "system".msg = "Use iqpilot.system" "third_party".msg = "Use iqpilot.third_party" "tools".msg = "Use iqpilot.tools" "pytest.main".msg = "pytest.main requires special handling that is easy to mess up!" "unittest".msg = "Use pytest" "time.time".msg = "Use time.monotonic" # raylib banned APIs "pyray.measure_text_ex".msg = "Use iqpilot.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" [tool.ruff.format] quote-style = "preserve" [tool.ty.src] exclude = [ "iqpilot/cereal/", "iqpilot/third_party/", ] [tool.ty.rules] # Ignore unresolved imports for Cython-compiled modules (.pyx) unresolved-import = "ignore" # Ignore unresolved attributes - many from capnp and Cython modules unresolved-attribute = "ignore" # Ignore invalid method overrides - signature variance issues invalid-method-override = "ignore" # Ignore possibly-missing-attribute - too many false positives possibly-missing-attribute = "ignore" # Ignore invalid assignment - often intentional monkey-patching invalid-assignment = "ignore" # Ignore no-matching-overload - numpy/ctypes overload matching issues no-matching-overload = "ignore" # Ignore invalid-argument-type - many false positives from raylib, ctypes, numpy invalid-argument-type = "ignore" # Ignore call-non-callable - false positives from dynamic types call-non-callable = "ignore" # Ignore unsupported-operator - false positives from dynamic types unsupported-operator = "ignore" # Ignore not-subscriptable - false positives from dynamic types not-subscriptable = "ignore" # not-iterable errors are now fixed [tool.uv.sources] msgq = { path = "artifacts/package_sources/msgq" } iqdbc = { path = "artifacts/package_sources/iqdbc" } panda = { path = "artifacts/package_sources/panda" } teleoprtc = { path = "artifacts/package_sources/teleoprtc" } tinygrad = { path = "artifacts/package_sources/tinygrad" }