2024-08-02 07:40:51 +08:00
|
|
|
[project]
|
2023-06-14 22:55:49 +08:00
|
|
|
name = "opendbc"
|
2023-06-18 23:06:42 +08:00
|
|
|
version = "1.0.0"
|
|
|
|
description = "CAN bus databases and tools"
|
2024-08-02 07:40:51 +08:00
|
|
|
license = { file = "LICENSE" }
|
|
|
|
authors = [{ name = "Vehicle Researcher", email = "user@comma.ai" }]
|
2023-06-14 22:55:49 +08:00
|
|
|
readme = "README.md"
|
2024-08-02 07:40:51 +08:00
|
|
|
requires-python = ">=3.9"
|
|
|
|
|
|
|
|
urls = { "homepage" = "https://github.com/commaai/opendbc" }
|
2023-06-14 22:55:49 +08:00
|
|
|
|
2024-10-05 04:12:17 +08:00
|
|
|
# setuptools includes distutils which is needed by Cython and pre-commit.
|
|
|
|
# distutils was removed in python3.12 from the standard library.
|
2024-08-18 03:04:46 +08:00
|
|
|
dependencies = [
|
|
|
|
"scons",
|
|
|
|
"numpy",
|
|
|
|
"Cython",
|
|
|
|
"crcmod",
|
2024-08-19 03:08:53 +08:00
|
|
|
"tqdm",
|
2024-10-04 07:38:53 +08:00
|
|
|
"pycapnp",
|
2024-08-18 03:04:46 +08:00
|
|
|
"pandacan@git+https://github.com/commaai/panda.git@master",
|
2024-10-05 04:12:17 +08:00
|
|
|
"setuptools",
|
|
|
|
"pycryptodome",
|
2024-08-18 03:04:46 +08:00
|
|
|
]
|
|
|
|
|
|
|
|
[project.optional-dependencies]
|
|
|
|
testing = [
|
|
|
|
"ruff",
|
|
|
|
"pytest",
|
|
|
|
"pytest-mock",
|
|
|
|
"pytest-xdist",
|
|
|
|
"pytest-subtests",
|
|
|
|
"hypothesis==6.47.*",
|
|
|
|
"parameterized>=0.8,<0.9",
|
|
|
|
"pre-commit",
|
|
|
|
]
|
|
|
|
docs = [
|
|
|
|
"Jinja2",
|
|
|
|
"natsort",
|
|
|
|
]
|
2024-08-30 06:12:44 +08:00
|
|
|
examples = [
|
|
|
|
"inputs",
|
2024-08-31 04:48:13 +08:00
|
|
|
"matplotlib",
|
2024-08-30 06:12:44 +08:00
|
|
|
]
|
2024-08-18 03:04:46 +08:00
|
|
|
|
2024-08-17 13:24:44 +08:00
|
|
|
[tool.pytest.ini_options]
|
2024-08-17 15:38:33 +08:00
|
|
|
addopts = "--ignore=panda/ -Werror --strict-config --strict-markers --durations=10 -n auto"
|
2024-08-17 13:24:44 +08:00
|
|
|
python_files = "test_*.py"
|
|
|
|
testpaths = [
|
|
|
|
"opendbc"
|
|
|
|
]
|
|
|
|
|
|
|
|
[tool.codespell]
|
|
|
|
quiet-level = 3
|
2024-10-30 16:11:34 +08:00
|
|
|
ignore-words-list = "alo,ba,bu,deque,hda,grey,arange"
|
2024-08-17 13:24:44 +08:00
|
|
|
builtin = "clear,rare,informal,code,names,en-GB_to_en-US"
|
|
|
|
check-hidden = true
|
|
|
|
|
2023-06-14 22:55:49 +08:00
|
|
|
[tool.cython-lint]
|
|
|
|
max-line-length = 120
|
|
|
|
ignore = ["E111", "E114"]
|
2023-08-08 06:26:46 +08:00
|
|
|
|
2024-08-01 13:46:43 +08:00
|
|
|
[tool.mypy]
|
2024-08-17 13:24:44 +08:00
|
|
|
# helpful warnings
|
|
|
|
warn_redundant_casts=true
|
|
|
|
warn_unreachable=true
|
|
|
|
warn_unused_ignores=true
|
|
|
|
|
|
|
|
# restrict dynamic typing
|
|
|
|
warn_return_any=true
|
|
|
|
|
2024-08-17 15:38:33 +08:00
|
|
|
# allow implicit optionals for default args
|
|
|
|
implicit_optional = true
|
|
|
|
|
2024-08-01 13:46:43 +08:00
|
|
|
explicit_package_bases=true
|
|
|
|
|
2023-08-08 06:26:46 +08:00
|
|
|
# https://beta.ruff.rs/docs/configuration/#using-pyprojecttoml
|
|
|
|
[tool.ruff]
|
|
|
|
line-length = 160
|
2024-08-17 13:24:44 +08:00
|
|
|
indent-width = 2
|
2023-08-15 03:52:47 +08:00
|
|
|
target-version="py311"
|
2024-08-02 14:17:16 +08:00
|
|
|
|
|
|
|
[tool.ruff.lint]
|
2024-08-17 13:24:44 +08:00
|
|
|
select = [
|
|
|
|
"E", "F", "W", "PIE", "C4", "ISC", "A", "B",
|
|
|
|
"NPY", # numpy
|
|
|
|
"UP", # pyupgrade
|
|
|
|
"TRY302", "TRY400", "TRY401", # try/excepts
|
|
|
|
"RUF008", "RUF100",
|
|
|
|
"TID251",
|
|
|
|
"PLR1704",
|
2024-11-11 12:33:38 +08:00
|
|
|
"INP001",
|
2024-08-17 13:24:44 +08:00
|
|
|
]
|
2024-08-17 15:38:33 +08:00
|
|
|
ignore = [
|
|
|
|
"W292",
|
|
|
|
"E741",
|
|
|
|
"E402",
|
|
|
|
"C408",
|
|
|
|
"ISC003",
|
|
|
|
"B027",
|
|
|
|
"B024",
|
|
|
|
"NPY002", # new numpy random syntax is worse
|
|
|
|
]
|
2023-08-15 03:52:47 +08:00
|
|
|
flake8-implicit-str-concat.allow-multiline=false
|
2024-08-21 06:45:43 +08:00
|
|
|
|
|
|
|
[tool.ruff.lint.flake8-tidy-imports.banned-api]
|
|
|
|
"pytest.main".msg = "pytest.main requires special handling that is easy to mess up!"
|
|
|
|
"unittest".msg = "Use pytest"
|