Files
opendbc-meb/pyproject.toml

149 lines
3.7 KiB
TOML
Raw Normal View History

[project]
2023-06-14 07:55:49 -07:00
name = "opendbc"
version = "0.2.1"
2023-06-18 16:06:42 +01:00
description = "CAN bus databases and tools"
license = "MIT"
authors = [{ name = "Vehicle Researcher", email = "user@comma.ai" }]
2023-06-14 07:55:49 -07:00
readme = "README.md"
requires-python = ">=3.11,<3.13" # pycapnp doesn't work with 3.13
urls = { "homepage" = "https://github.com/commaai/opendbc" }
2023-06-14 07:55:49 -07:00
dependencies = [
"scons",
"numpy",
2025-12-29 16:25:33 -08:00
"crcmod-plus",
2024-08-18 12:08:53 -07:00
"tqdm",
"pycapnp==2.1.0",
Toyota: 2021-23 RAV4 Prime (#1287) * from @pd0wm commaai/opendbc#1005 * from @pd0wm commaai/openpilot#31179 * we did need that flag rename * those flags were numbered like that for a reason * no more bustime * add secOCKey to structs * hack around new pitch value for now * secOCKey placeholder * help the test along for now * codespell disapproves of my creative vision * add crypto dependency * the other one * the other other one * temp use SecOC branch of Panda * i am the panda, for now * propitiate static type checker * on second thought, moving car.capnp is a good idea * remove the SecOC key from CarParams * remove SecOC key reading from Toyota port * add secoc_key to CS/CC * update SecOC key references * default key in interfaces for tests * more CarParams.SecurityConfig * set secOcRequired at startup for SecOC car * see if type checker likes this better * santa please bring car.capnp back soon * list -> flag * diff reduction: won't need the flag rename * add IDLE_COAST signal * regen RAV4 DBC * consolidate and remove ALT_GAS_MSG flag * consolidate and remove GEAR_PACKET_HYBRID flag * cleanup pitch signal * cleanup can_gear * cleanup SECOC_SYNCHRONIZATION * more cleanup * cleanup Mirai * FLAG.value consistency, in case capnp move needs this * not necessary, reduce diff with master * prettier * validation like this should be an offline test * match non-SecOC LTA message * follow secoc library move * repack flag values * whitespace fix * cleanup stockAeb * comment not necessary * add explicit FIXME for pandacan ref * how did that sneak back in * mention why CarDocs are missing * use carlog to note wrong key problems * limit logging volume * prep for new CARS.md infra * pandacan back to panda master
2024-10-04 13:12:17 -07:00
"pycryptodome",
]
[project.optional-dependencies]
testing = [
Car diff (#3024) * Opendbc replay (#6) * add replay POC * compare HEAD to master * split in compare and worker * copy worker.py * cleanup * fix * apply tesla brake PR * fix * fix mutation test * add panda * add timestamps * simplify * add falling edge * add remaining carstate * simple lines * bump * rename * use zst as ref * ref commit * cleanup * formatting * no failing * fix git * clean * use pool.map * fix docker build * clean * Revert "fix docker build" This reverts commit da3577441eaa4b7fdc5763f73e779dd32c03a3c3. * use flat paths * format * use azure test instance * print full diff * no stderr output * use GIT_REF * Revert "apply tesla brake PR" This reverts commit f377e21f3865c574db5d618be20b4efa86fba66f. * allow overwrite blobs * supress stderr * add error on failed generation (#8) * Opendbc replay (#129) * add replay POC * compare HEAD to master * split in compare and worker * copy worker.py * cleanup * fix * apply tesla brake PR * fix * fix mutation test * add panda * add timestamps * simplify * add falling edge * add remaining carstate * simple lines * bump * rename * use zst as ref * ref commit * cleanup * formatting * no failing * fix git * clean * use pool.map * fix docker build * clean * Revert "fix docker build" This reverts commit da3577441eaa4b7fdc5763f73e779dd32c03a3c3. * use flat paths * format * use azure test instance * print full diff * no stderr output * use GIT_REF * Revert "apply tesla brake PR" This reverts commit f377e21f3865c574db5d618be20b4efa86fba66f. * allow overwrite blobs * supress stderr * print upload refs * add error on failed generation * Revert "use azure test instance" This reverts commit ba969ccda452a4841934440d3ced22829861f70f. * Revert "fix mutation test" This reverts commit 8f5e01de7743ee38c340df90751cf370634fe2b2. * detect safety changes * use logReader * only use valid platforms * use local database * Revert "use local database" This reverts commit 4ebe9fe0800fb1631efe8672817a8c21b8780b65. * Reapply "use azure test instance" This reverts commit e9968a04e4ddee00b69174fd30ee1cdcdfa506fb. * cutoff diff * parallel downloads * enable stderr * fix interface * logprint errors * add comment to PR * fix * FORMAT: lines * FORMAT: plots * FORMAT: fix * modules * Revert "use azure test instance" This reverts commit ba969ccda452a4841934440d3ced22829861f70f. * build on forks * clean * rename * replace azure with ci-artifacts * auto bootstrap * help * FORK TEST * Revert "FORMAT: fix" This reverts commit 0262b1fad446691d594adef6baf284938d2d115d. * Revert "FORMAT: plots" This reverts commit 314417db1fb4c01206d8b3880f240a44d70b5a7e. * Revert "FORMAT: lines" This reverts commit 5cdd4c567f0440874a74678ca7cb3b6f909bc0ba. * clean * no comment on empty output * output errors * fix pr comment * fix diff more * increase tolerance * less files * one file * Revert "FORK TEST" This reverts commit fc691b500c58e76a41c8f5785b6acf89ff4e1573. * Revert "fix mutation test" This reverts commit 8f5e01de7743ee38c340df90751cf370634fe2b2. * fix comment * fix comment * move car_diff.py * Revert "fix mutation test" This reverts commit 8f5e01de7743ee38c340df90751cf370634fe2b2. * move car_diff.py * inline helpers * inline helpers * fix ruff * fix ruff * use all carstate fields * add --all * use all carstate fields * add --all * bootstrap * bootstrap * Revert "bootstrap" This reverts commit c3c2ba41e8d1dbdeb74cef8498caf9fd13325fe3. * add line formatting * commit workflow * adjust formatting * return err * subprocess * comma_car_segments * dead code * minimal logreader * remove openpilot * add deps * remove all deps * fix source * request * less parallel * fix push * bootstrap * Revert "bootstrap" This reverts commit b4af0d3bbd31f119ed3f18933329dcc64c9cf634. * fix graph * push * regex * optimize dict_diff * reduce tolerance * use comma_car_segments * remove * use requests * timestamps * frame_ms * id * logreader * align logreader * use logreader * remove requests * return * more line * ruff * use test pip package * push on commaai * use zstandard lib * clean * rename * use decompress * fix * index * lr filter * union types * find edges * group frames * render waveform * format timing * signals * numeric diff * boolean diff * real timestamp * impreza fingerprint * Revert "impreza fingerprint" This reverts commit 692e34c7f8df6540c26eca79799a8eac47f352bc. * apply tesla brake PR * honda clear startup fault * Revert "honda clear startup fault" This reverts commit 91c4a5d3c896cf0936c5cf00a484127b9665d21c. * skip unrelated edges * fix exit * fix down edge * use hf pip package * comment on fail * fix * comment * no exit 1 in CI
2026-01-19 14:31:20 -08:00
"comma-car-segments @ https://huggingface.co/datasets/commaai/commaCarSegments/resolve/main/dist/comma_car_segments-0.1.0-py3-none-any.whl",
"cffi",
"gcovr",
# FIXME: pytest 9.0.0 doesn't support unittest.SkipTest
"pytest==8.4.2",
"pytest-coverage",
"pytest-mock",
"pytest-randomly",
# https://github.com/pytest-dev/pytest-xdist/pull/1229
2025-07-25 20:44:51 -07:00
"pytest-xdist @ git+https://github.com/sshane/pytest-xdist@2b4372bd62699fb412c4fe2f95bf9f01bd2018da",
"pytest-subtests",
"hypothesis==6.47.*",
"parameterized>=0.8,<0.9",
Car diff (#3024) * Opendbc replay (#6) * add replay POC * compare HEAD to master * split in compare and worker * copy worker.py * cleanup * fix * apply tesla brake PR * fix * fix mutation test * add panda * add timestamps * simplify * add falling edge * add remaining carstate * simple lines * bump * rename * use zst as ref * ref commit * cleanup * formatting * no failing * fix git * clean * use pool.map * fix docker build * clean * Revert "fix docker build" This reverts commit da3577441eaa4b7fdc5763f73e779dd32c03a3c3. * use flat paths * format * use azure test instance * print full diff * no stderr output * use GIT_REF * Revert "apply tesla brake PR" This reverts commit f377e21f3865c574db5d618be20b4efa86fba66f. * allow overwrite blobs * supress stderr * add error on failed generation (#8) * Opendbc replay (#129) * add replay POC * compare HEAD to master * split in compare and worker * copy worker.py * cleanup * fix * apply tesla brake PR * fix * fix mutation test * add panda * add timestamps * simplify * add falling edge * add remaining carstate * simple lines * bump * rename * use zst as ref * ref commit * cleanup * formatting * no failing * fix git * clean * use pool.map * fix docker build * clean * Revert "fix docker build" This reverts commit da3577441eaa4b7fdc5763f73e779dd32c03a3c3. * use flat paths * format * use azure test instance * print full diff * no stderr output * use GIT_REF * Revert "apply tesla brake PR" This reverts commit f377e21f3865c574db5d618be20b4efa86fba66f. * allow overwrite blobs * supress stderr * print upload refs * add error on failed generation * Revert "use azure test instance" This reverts commit ba969ccda452a4841934440d3ced22829861f70f. * Revert "fix mutation test" This reverts commit 8f5e01de7743ee38c340df90751cf370634fe2b2. * detect safety changes * use logReader * only use valid platforms * use local database * Revert "use local database" This reverts commit 4ebe9fe0800fb1631efe8672817a8c21b8780b65. * Reapply "use azure test instance" This reverts commit e9968a04e4ddee00b69174fd30ee1cdcdfa506fb. * cutoff diff * parallel downloads * enable stderr * fix interface * logprint errors * add comment to PR * fix * FORMAT: lines * FORMAT: plots * FORMAT: fix * modules * Revert "use azure test instance" This reverts commit ba969ccda452a4841934440d3ced22829861f70f. * build on forks * clean * rename * replace azure with ci-artifacts * auto bootstrap * help * FORK TEST * Revert "FORMAT: fix" This reverts commit 0262b1fad446691d594adef6baf284938d2d115d. * Revert "FORMAT: plots" This reverts commit 314417db1fb4c01206d8b3880f240a44d70b5a7e. * Revert "FORMAT: lines" This reverts commit 5cdd4c567f0440874a74678ca7cb3b6f909bc0ba. * clean * no comment on empty output * output errors * fix pr comment * fix diff more * increase tolerance * less files * one file * Revert "FORK TEST" This reverts commit fc691b500c58e76a41c8f5785b6acf89ff4e1573. * Revert "fix mutation test" This reverts commit 8f5e01de7743ee38c340df90751cf370634fe2b2. * fix comment * fix comment * move car_diff.py * Revert "fix mutation test" This reverts commit 8f5e01de7743ee38c340df90751cf370634fe2b2. * move car_diff.py * inline helpers * inline helpers * fix ruff * fix ruff * use all carstate fields * add --all * use all carstate fields * add --all * bootstrap * bootstrap * Revert "bootstrap" This reverts commit c3c2ba41e8d1dbdeb74cef8498caf9fd13325fe3. * add line formatting * commit workflow * adjust formatting * return err * subprocess * comma_car_segments * dead code * minimal logreader * remove openpilot * add deps * remove all deps * fix source * request * less parallel * fix push * bootstrap * Revert "bootstrap" This reverts commit b4af0d3bbd31f119ed3f18933329dcc64c9cf634. * fix graph * push * regex * optimize dict_diff * reduce tolerance * use comma_car_segments * remove * use requests * timestamps * frame_ms * id * logreader * align logreader * use logreader * remove requests * return * more line * ruff * use test pip package * push on commaai * use zstandard lib * clean * rename * use decompress * fix * index * lr filter * union types * find edges * group frames * render waveform * format timing * signals * numeric diff * boolean diff * real timestamp * impreza fingerprint * Revert "impreza fingerprint" This reverts commit 692e34c7f8df6540c26eca79799a8eac47f352bc. * apply tesla brake PR * honda clear startup fault * Revert "honda clear startup fault" This reverts commit 91c4a5d3c896cf0936c5cf00a484127b9665d21c. * skip unrelated edges * fix exit * fix down edge * use hf pip package * comment on fail * fix * comment * no exit 1 in CI
2026-01-19 14:31:20 -08:00
"zstandard",
# static analysis
"ruff",
"ty",
"lefthook",
"cpplint",
"codespell",
]
docs = [
"Jinja2",
]
examples = [
"inputs",
"matplotlib",
]
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[tool.pytest.ini_options]
addopts = "-Werror --strict-config --strict-markers --durations=10 -n auto"
python_files = "test_*.py"
testpaths = [
"opendbc"
]
[tool.codespell]
quiet-level = 3
ignore-words-list = "alo,ba,bu,deque,hda,grey,arange"
builtin = "clear,rare,informal,code,names,en-GB_to_en-US"
check-hidden = true
2023-08-07 15:26:46 -07:00
# https://beta.ruff.rs/docs/configuration/#using-pyprojecttoml
[tool.ruff]
line-length = 160
indent-width = 2
2023-08-14 12:52:47 -07:00
target-version="py311"
2024-08-01 23:17:16 -07:00
[tool.ruff.lint]
preview = true
select = [
"E", "F", "W", "PIE", "C4", "ISC", "A", "B",
"NPY", # numpy
"UP", # pyupgrade
"TRY203", "TRY400", "TRY401", # try/excepts
"RUF008", "RUF100",
"TID251",
"PLR1704",
2024-11-10 20:33:38 -08:00
"INP001",
]
ignore = [
"E302", "E305", # too restrictive
"W292",
"E741",
"E402",
"C408",
"ISC003",
"B027",
"B024",
"UP031",
"NPY002", # new numpy random syntax is worse
"C420",
"E111", "E114", "E226", "E241",
"E221", "E265", "E266", "E261",
"E252", "E251", "E231", "E225",
"E262", "C419",
]
2023-08-14 12:52:47 -07:00
flake8-implicit-str-concat.allow-multiline=false
2024-08-20 15:45:43 -07:00
2024-11-10 20:34:11 -08:00
[tool.ruff.lint.per-file-ignores]
"site_scons/*" = ["ALL"]
2024-08-20 15:45:43 -07:00
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"pytest.main".msg = "pytest.main requires special handling that is easy to mess up!"
"numpy.mean".msg = "Sum and divide. np.mean is slow"
# TODO: re-enable when all tests are converted to pytest
#"unittest".msg = "Use pytest"
2025-12-28 00:26:14 -08:00
[tool.ty.rules]
# Ignore rules that produce false positives due to:
# - Dynamic attributes on LibSafety (loaded from compiled C library)
# - External dependencies not installed (panda, cereal, openpilot)
# - capnp dynamically generated types
possibly-missing-attribute = "ignore"
unresolved-attribute = "ignore"
unresolved-import = "ignore"
# Intentional LSP violations in subclass method signatures
invalid-method-override = "ignore"
# Optional callables called without None checks in test code
call-non-callable = "ignore"
# Complex type narrowing ty doesn't handle well (isinstance with abstract types)
invalid-argument-type = "ignore"
# Dynamic type patterns (e.g., values converted from Number to list in __init__)
not-subscriptable = "ignore"
2025-12-28 00:26:14 -08:00
unsupported-operator = "ignore"
# Return types with complex callable signatures
invalid-return-type = "ignore"
# Test class method signature differences
too-many-positional-arguments = "ignore"
[tool.setuptools]
include-package-data = true
[tool.setuptools.package-data]
"opendbc.safety" = ["*.h", "board/*.h", "board/drivers/*.h", "modes/*.h"]