tsl/pyproject.toml

206 lines
4.9 KiB
TOML
Raw Normal View History

[tool.pytest.ini_options]
minversion = "6.0"
addopts = "--ignore=openpilot/ --ignore=cereal/ --ignore=opendbc/ --ignore=panda/ --ignore=rednose_repo/ --ignore=tinygrad_repo/ -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"
#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/athena",
"selfdrive/boardd",
"selfdrive/car",
"selfdrive/controls",
"selfdrive/locationd",
"selfdrive/monitoring",
"selfdrive/thermald",
"selfdrive/test/longitudinal_maneuvers",
"system/hardware/tici",
"system/loggerd",
"system/proclogd",
"system/tests",
"system/ubloxd",
webrtcd: webrtc streaming server (audio/video/cereal) (#30186) * WebRTCClient and WebRTCServer abstractions * webrtc client implementation * Interactive test scripts * Send localDescriptions as offer/asnwer, as they are different * Tracks need to be added after setting remote description for multi-cam streaming to work * Remove WebRTCStreamingMetadata * Wait for tracks * Move stuff to separate files, rename some things * Refactor everything, create WebRTCStreamBuilder for both offer and answers * ta flight done time to grind * wait for incoming tracks and channels * Dummy track and frame reader track. Fix timing. * dt based on camera type * first trial of the new api * Fix audio track * methods for checking for incoming tracks * Web migration part 2 * Fixes for stream api * use rtc description for web.py * experimental cereal proxy * remove old code from bodyav * fix is_started * serialize session description * fix audio * messaging channel wrapper * fix audiotrack * h264 codec preference * Add codec preference to tracks * override sdp codecs * add logging * Move cli stuff to separate file * slight cleanup * Fix audio track * create codec_mime inside force_codec function * fix incoming media estimation * move builders to __init__ * stream updates following builders * Update example script * web.py support for new builder * web speaker fixes * StreamingMediaInfo API * Move things around * should_add_data_channel rename * is_connected_and_ready * fix linter errors * make cli executable * remove dumb comments * logging support * fix parse_info_from_offer * improve type annotations * satisfy linters * Support for waiting for disconnection * Split device tracks into video/audio files. Move audio speaker to audio.py * default dt for dummy video track * Fix cli * new speaker fixes * Remove almost all functionality from web.py * webrtcd * continue refactoring web.py * after handling joystick reset in controlsd with #30409, controls are not necessary anymore * ping endpoint * Update js files to at least support what worked previously * Fixes after some tests on the body * Streaming fixes * Remove the use of WebRTCStreamBuilder. Subclass use is now required * Add todo * delete all streams on shutdown * Replace lastPing with lastChannelMessageTime * Update ping text only if rtc is still on * That should affect the chart too * Fix paths in web * use protocol in SSLContext * remove warnings since aiortc is not used directly anymore * check if task is done in stop * remove channel handler wrapper, since theres only one channel * Move things around * Moved webrtc abstractions to separate repository * Moved webrtcd to tools/webrtc * Update imports * Add bodyrtc as dependency * Add webrtcd to process_config * Remove usage of DummyVideoStreamTrack * Add main to webrtcd * Move webrtcd to system * Fix imports * Move cereal proxy logic outside of runner * Incoming proxy abstractions * Add some tests * Make it executable * Fix process config * Fix imports * Additional tests. Add tests to pyproject.toml * Update poetry lock * New line * Bump aiortc to 1.6.0 * Added teleoprtc_repo as submodule, and linked its source dir * Add init file to webrtc module * Handle aiortc warnings * Ignore deprecation warnings * Ignore resource warning too * Ignore the warnings * find free port for test_webrtcd * Start process inside the test case * random sleep test * test 2 * Test endpoint function instead * Update comment * Add system/webrtc to release * default arguments for body fields * Add teleoprtc to release * Bump teleoprtc * Exclude teleoprtc from static analysis * Use separate event loop for stream session tests old-commit-hash: f058b5d64eed31878533a85f25eb53386ff9e330
2023-12-02 13:13:37 +08:00
"system/webrtc",
"tools/lib/tests",
"tools/replay",
"tools/cabana"
]
[tool.mypy]
python_version = "3.11"
plugins = [
"numpy.typing.mypy_plugin",
]
exclude = [
"body/",
"cereal/",
"opendbc/",
"panda/",
"rednose/",
"rednose_repo/",
"tinygrad/",
"tinygrad_repo/",
webrtcd: webrtc streaming server (audio/video/cereal) (#30186) * WebRTCClient and WebRTCServer abstractions * webrtc client implementation * Interactive test scripts * Send localDescriptions as offer/asnwer, as they are different * Tracks need to be added after setting remote description for multi-cam streaming to work * Remove WebRTCStreamingMetadata * Wait for tracks * Move stuff to separate files, rename some things * Refactor everything, create WebRTCStreamBuilder for both offer and answers * ta flight done time to grind * wait for incoming tracks and channels * Dummy track and frame reader track. Fix timing. * dt based on camera type * first trial of the new api * Fix audio track * methods for checking for incoming tracks * Web migration part 2 * Fixes for stream api * use rtc description for web.py * experimental cereal proxy * remove old code from bodyav * fix is_started * serialize session description * fix audio * messaging channel wrapper * fix audiotrack * h264 codec preference * Add codec preference to tracks * override sdp codecs * add logging * Move cli stuff to separate file * slight cleanup * Fix audio track * create codec_mime inside force_codec function * fix incoming media estimation * move builders to __init__ * stream updates following builders * Update example script * web.py support for new builder * web speaker fixes * StreamingMediaInfo API * Move things around * should_add_data_channel rename * is_connected_and_ready * fix linter errors * make cli executable * remove dumb comments * logging support * fix parse_info_from_offer * improve type annotations * satisfy linters * Support for waiting for disconnection * Split device tracks into video/audio files. Move audio speaker to audio.py * default dt for dummy video track * Fix cli * new speaker fixes * Remove almost all functionality from web.py * webrtcd * continue refactoring web.py * after handling joystick reset in controlsd with #30409, controls are not necessary anymore * ping endpoint * Update js files to at least support what worked previously * Fixes after some tests on the body * Streaming fixes * Remove the use of WebRTCStreamBuilder. Subclass use is now required * Add todo * delete all streams on shutdown * Replace lastPing with lastChannelMessageTime * Update ping text only if rtc is still on * That should affect the chart too * Fix paths in web * use protocol in SSLContext * remove warnings since aiortc is not used directly anymore * check if task is done in stop * remove channel handler wrapper, since theres only one channel * Move things around * Moved webrtc abstractions to separate repository * Moved webrtcd to tools/webrtc * Update imports * Add bodyrtc as dependency * Add webrtcd to process_config * Remove usage of DummyVideoStreamTrack * Add main to webrtcd * Move webrtcd to system * Fix imports * Move cereal proxy logic outside of runner * Incoming proxy abstractions * Add some tests * Make it executable * Fix process config * Fix imports * Additional tests. Add tests to pyproject.toml * Update poetry lock * New line * Bump aiortc to 1.6.0 * Added teleoprtc_repo as submodule, and linked its source dir * Add init file to webrtc module * Handle aiortc warnings * Ignore deprecation warnings * Ignore resource warning too * Ignore the warnings * find free port for test_webrtcd * Start process inside the test case * random sleep test * test 2 * Test endpoint function instead * Update comment * Add system/webrtc to release * default arguments for body fields * Add teleoprtc to release * Bump teleoprtc * Exclude teleoprtc from static analysis * Use separate event loop for stream session tests old-commit-hash: f058b5d64eed31878533a85f25eb53386ff9e330
2023-12-02 13:13:37 +08:00
"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
Pipenv -> poetry (#24858) * Try poetry * Remove casadi for now * Update docker * Copy pipfiles * add casadi back * Too many slashes * New poetry api * Install system * Try again * No more pipenv * new dependencies * updates * poetry 1.2.1, install dev dependencies * keep install pipenv for xx for now? * add pre-commit checks for poetry * poetry lock is too slow * update pip * migrate to poetry groups * update lockfile * don't need to specify dev group unless it is made optional * always install poetry * set POETRY_VIRTUALENVS_CREATE instead, and use pipenv for xx * use env for docs docker image * alphabetical * poetry 1.2.2 * add dev dependencies for typing added in aacf6ae3 * remove constraint * fix PIPENV_SYSTEM * remove constraint * don't need this here * bump * bump pipenv adds support for installing local pyprojects (can add openpilot as dependency of xx) * README improvements * probably not necessary * bump pip * maybe not necessary? * revert * don't install openpilot itself into the virtual env * remove PySide2 and shiboken2 reverts 3e41c775cbf670740ac648a8614d2d6b433312fe * remove Pipenv, add xx dependencies, sync system python * add pipenv as xx dep * semver package constraints, use old lockfile versions * fix casadi * remove whitespace Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * disable poetry cache * cleanup * prefer config file Co-authored-by: Cameron Clough <cameronjclough@gmail.com> Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> old-commit-hash: a98d105cb95a445f5ec69e783585c56604b09449
2022-10-22 07:23:56 +08:00
[tool.poetry]
name = "openpilot"
version = "0.1.0"
description = "an open source driver assistance system"
authors = ["Vehicle Researcher <user@comma.ai>"]
license = "MIT"
readme = "README.md"
repository = "https://github.com/commaai/openpilot"
documentation = "https://docs.comma.ai"
[tool.poetry.dependencies]
python = "~3.11"
atomicwrites = "*"
aiohttp = "*"
aiortc = "*"
macOS: fix build issues & re-enable CI (#28258) * Uncomment build_mac job * Add PYCURL_CURL_CONFIG * Acados universal binary * Remove x86 macos references from sconscript * Add missing include in cabana * Update cereal * Update workflow * Remove unnecessary libpaths for darwin * Add missing path to cached dirs * Fix path in cache preparation step * Add poetry caches to CI cache * Compile acados with lower deployment target for CI * Update cereal * Pass -rpath in linker flags as scons doed not support RPATH on macos * Use scons api instead of os * @rpath in install name of acados dylibs * SConstruct cleanup * fix liblocationd tests by adding lib suffix based on platform * Update cereal * Update opendbc * Update opendbc * Add acados gitignore to release files * Update cereal * Update cereal * Add scons_cache to build cache * Add Caskroom to cache * Fix typo * Link all packages at once, instead of one by one * Run cleanup stage using poetry * Remove casks from cache * Move scons cache to separate cache step * Save scons cache only on master * Remove restore-keys from save-scons-cache step * Uncomment if conditions for scons save * Add gcc-arm-embedded cask cache to cache * Custom handling of gcc-arm-embedded toolchain cache * Rename dep cache key * Exclude .fseventsd from cache * Fix glob pattern * Remove .feventsd before caching * Run mac_setup only if dependency cache-hit != true * Update cereal to master * Add overwrite flag to brew link * Remove manual casadi build from mac_setup * Remove restore-keys from dependency cache * Remove linux requirement for casadi * Restore restore-keys to dependency cache old-commit-hash: 45a6834a744e13833e702ed6eb3c5483391cf899
2023-06-22 04:14:20 +08:00
casadi = "==3.6.3"
cffi = "*"
control = "*"
crcmod = "*"
cryptography = "*"
Cython = "*"
future-fstrings = "*" # for acados
hexdump = "*"
Jinja2 = "*"
json-rpc = "*"
libusb1 = "*"
numpy = "*"
onnx = ">=1.14.0"
onnxruntime = { version = ">=1.15.1", platform = "linux", markers = "platform_machine == 'aarch64'" }
onnxruntime-gpu = { version = ">=1.15.1", platform = "linux", markers = "platform_machine == 'x86_64'" }
psutil = "*"
pyaudio = "*"
pycapnp = "*"
pycryptodome = "*"
pycurl = "*"
pydub = "*"
PyJWT = "*"
pyopencl = "*"
pyserial = "*"
PyYAML = "*"
pyzmq = "*"
requests = "*"
scons = "*"
sentry-sdk = "==1.28.1" # needs to be updated with AGNOS
setproctitle = "*"
smbus2 = "*"
sounddevice = "*"
spidev = { version = "*", platform = "linux" }
sympy = "*"
timezonefinder = "*"
tqdm = "*"
websocket_client = "*"
polyline = "*"
sconscontrib = {git = "https://github.com/SCons/scons-contrib.git"}
Pipenv -> poetry (#24858) * Try poetry * Remove casadi for now * Update docker * Copy pipfiles * add casadi back * Too many slashes * New poetry api * Install system * Try again * No more pipenv * new dependencies * updates * poetry 1.2.1, install dev dependencies * keep install pipenv for xx for now? * add pre-commit checks for poetry * poetry lock is too slow * update pip * migrate to poetry groups * update lockfile * don't need to specify dev group unless it is made optional * always install poetry * set POETRY_VIRTUALENVS_CREATE instead, and use pipenv for xx * use env for docs docker image * alphabetical * poetry 1.2.2 * add dev dependencies for typing added in aacf6ae3 * remove constraint * fix PIPENV_SYSTEM * remove constraint * don't need this here * bump * bump pipenv adds support for installing local pyprojects (can add openpilot as dependency of xx) * README improvements * probably not necessary * bump pip * maybe not necessary? * revert * don't install openpilot itself into the virtual env * remove PySide2 and shiboken2 reverts 3e41c775cbf670740ac648a8614d2d6b433312fe * remove Pipenv, add xx dependencies, sync system python * add pipenv as xx dep * semver package constraints, use old lockfile versions * fix casadi * remove whitespace Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * disable poetry cache * cleanup * prefer config file Co-authored-by: Cameron Clough <cameronjclough@gmail.com> Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> old-commit-hash: a98d105cb95a445f5ec69e783585c56604b09449
2022-10-22 07:23:56 +08:00
[tool.poetry.group.dev.dependencies]
av = "*"
azure-identity = "*"
azure-storage-blob = "*"
breathe = "*"
coverage = "*"
dictdiffer = "*"
ft4222 = "*"
hypothesis = "~6.47"
inputs = "*"
lru-dict = "*"
markdown-it-py = "*"
matplotlib = "*"
metadrive-simulator = { git = "https://github.com/metadriverse/metadrive.git", rev ="72e842cd1d025bf676e4af8797a01e4aa282109f", markers = "platform_machine != 'aarch64'" } # no linux/aarch64 wheels for certain dependencies
mpld3 = "*"
mypy = "*"
myst-parser = "*"
natsort = "*"
opencv-python-headless = "*"
pandas = "*"
parameterized = "^0.8"
pprofile = "*"
pre-commit = "*"
pygame = "*"
pympler = "*"
pyprof2calltree = "*"
pytest = "*"
pytest-cov = "*"
pytest-cpp = "*"
pytest-subtests = "*"
pytest-xdist = "*"
pytest-timeout = "*"
pytest-timeouts = "*"
pytest-random-order = "*"
ruff = "*"
scipy = "*"
sphinx = "*"
sphinx-rtd-theme = "*"
sphinx-sitemap = "*"
tabulate = "*"
tenacity = "*"
types-atomicwrites = "*"
types-pycurl = "*"
types-PyYAML = "*"
types-requests = "*"
types-tabulate = "*"
# this is only pinned since 5.15.11 is broken
pyqt5 = { version = "==5.15.2", markers = "platform_machine == 'x86_64'" } # no aarch64 wheels for macOS/linux
Pipenv -> poetry (#24858) * Try poetry * Remove casadi for now * Update docker * Copy pipfiles * add casadi back * Too many slashes * New poetry api * Install system * Try again * No more pipenv * new dependencies * updates * poetry 1.2.1, install dev dependencies * keep install pipenv for xx for now? * add pre-commit checks for poetry * poetry lock is too slow * update pip * migrate to poetry groups * update lockfile * don't need to specify dev group unless it is made optional * always install poetry * set POETRY_VIRTUALENVS_CREATE instead, and use pipenv for xx * use env for docs docker image * alphabetical * poetry 1.2.2 * add dev dependencies for typing added in aacf6ae3 * remove constraint * fix PIPENV_SYSTEM * remove constraint * don't need this here * bump * bump pipenv adds support for installing local pyprojects (can add openpilot as dependency of xx) * README improvements * probably not necessary * bump pip * maybe not necessary? * revert * don't install openpilot itself into the virtual env * remove PySide2 and shiboken2 reverts 3e41c775cbf670740ac648a8614d2d6b433312fe * remove Pipenv, add xx dependencies, sync system python * add pipenv as xx dep * semver package constraints, use old lockfile versions * fix casadi * remove whitespace Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * disable poetry cache * cleanup * prefer config file Co-authored-by: Cameron Clough <cameronjclough@gmail.com> Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> old-commit-hash: a98d105cb95a445f5ec69e783585c56604b09449
2022-10-22 07:23:56 +08:00
[tool.poetry.group.carla]
optional = true
[tool.poetry.group.carla.dependencies]
carla = { url = "https://github.com/commaai/carla/releases/download/3.11.4/carla-0.9.14-cp311-cp311-linux_x86_64.whl", platform = "linux", markers = "platform_machine == 'x86_64'" }
Pipenv -> poetry (#24858) * Try poetry * Remove casadi for now * Update docker * Copy pipfiles * add casadi back * Too many slashes * New poetry api * Install system * Try again * No more pipenv * new dependencies * updates * poetry 1.2.1, install dev dependencies * keep install pipenv for xx for now? * add pre-commit checks for poetry * poetry lock is too slow * update pip * migrate to poetry groups * update lockfile * don't need to specify dev group unless it is made optional * always install poetry * set POETRY_VIRTUALENVS_CREATE instead, and use pipenv for xx * use env for docs docker image * alphabetical * poetry 1.2.2 * add dev dependencies for typing added in aacf6ae3 * remove constraint * fix PIPENV_SYSTEM * remove constraint * don't need this here * bump * bump pipenv adds support for installing local pyprojects (can add openpilot as dependency of xx) * README improvements * probably not necessary * bump pip * maybe not necessary? * revert * don't install openpilot itself into the virtual env * remove PySide2 and shiboken2 reverts 3e41c775cbf670740ac648a8614d2d6b433312fe * remove Pipenv, add xx dependencies, sync system python * add pipenv as xx dep * semver package constraints, use old lockfile versions * fix casadi * remove whitespace Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * disable poetry cache * cleanup * prefer config file Co-authored-by: Cameron Clough <cameronjclough@gmail.com> Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> old-commit-hash: a98d105cb95a445f5ec69e783585c56604b09449
2022-10-22 07:23:56 +08:00
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
# https://beta.ruff.rs/docs/configuration/#using-pyprojecttoml
[tool.ruff]
select = ["E", "F", "W", "PIE", "C4", "ISC", "RUF008", "RUF100", "A", "B", "TID251"]
ignore = ["E741", "E402", "C408", "ISC003", "B027", "B024"]
line-length = 160
target-version="py311"
exclude = [
"panda",
"opendbc",
"rednose_repo",
"tinygrad_repo",
webrtcd: webrtc streaming server (audio/video/cereal) (#30186) * WebRTCClient and WebRTCServer abstractions * webrtc client implementation * Interactive test scripts * Send localDescriptions as offer/asnwer, as they are different * Tracks need to be added after setting remote description for multi-cam streaming to work * Remove WebRTCStreamingMetadata * Wait for tracks * Move stuff to separate files, rename some things * Refactor everything, create WebRTCStreamBuilder for both offer and answers * ta flight done time to grind * wait for incoming tracks and channels * Dummy track and frame reader track. Fix timing. * dt based on camera type * first trial of the new api * Fix audio track * methods for checking for incoming tracks * Web migration part 2 * Fixes for stream api * use rtc description for web.py * experimental cereal proxy * remove old code from bodyav * fix is_started * serialize session description * fix audio * messaging channel wrapper * fix audiotrack * h264 codec preference * Add codec preference to tracks * override sdp codecs * add logging * Move cli stuff to separate file * slight cleanup * Fix audio track * create codec_mime inside force_codec function * fix incoming media estimation * move builders to __init__ * stream updates following builders * Update example script * web.py support for new builder * web speaker fixes * StreamingMediaInfo API * Move things around * should_add_data_channel rename * is_connected_and_ready * fix linter errors * make cli executable * remove dumb comments * logging support * fix parse_info_from_offer * improve type annotations * satisfy linters * Support for waiting for disconnection * Split device tracks into video/audio files. Move audio speaker to audio.py * default dt for dummy video track * Fix cli * new speaker fixes * Remove almost all functionality from web.py * webrtcd * continue refactoring web.py * after handling joystick reset in controlsd with #30409, controls are not necessary anymore * ping endpoint * Update js files to at least support what worked previously * Fixes after some tests on the body * Streaming fixes * Remove the use of WebRTCStreamBuilder. Subclass use is now required * Add todo * delete all streams on shutdown * Replace lastPing with lastChannelMessageTime * Update ping text only if rtc is still on * That should affect the chart too * Fix paths in web * use protocol in SSLContext * remove warnings since aiortc is not used directly anymore * check if task is done in stop * remove channel handler wrapper, since theres only one channel * Move things around * Moved webrtc abstractions to separate repository * Moved webrtcd to tools/webrtc * Update imports * Add bodyrtc as dependency * Add webrtcd to process_config * Remove usage of DummyVideoStreamTrack * Add main to webrtcd * Move webrtcd to system * Fix imports * Move cereal proxy logic outside of runner * Incoming proxy abstractions * Add some tests * Make it executable * Fix process config * Fix imports * Additional tests. Add tests to pyproject.toml * Update poetry lock * New line * Bump aiortc to 1.6.0 * Added teleoprtc_repo as submodule, and linked its source dir * Add init file to webrtc module * Handle aiortc warnings * Ignore deprecation warnings * Ignore resource warning too * Ignore the warnings * find free port for test_webrtcd * Start process inside the test case * random sleep test * test 2 * Test endpoint function instead * Update comment * Add system/webrtc to release * default arguments for body fields * Add teleoprtc to release * Bump teleoprtc * Exclude teleoprtc from static analysis * Use separate event loop for stream session tests old-commit-hash: f058b5d64eed31878533a85f25eb53386ff9e330
2023-12-02 13:13:37 +08:00
"teleoprtc",
"teleoprtc_repo",
"third_party",
]
flake8-implicit-str-concat.allow-multiline=false
[tool.ruff.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"
[tool.coverage.run]
concurrency = ["multiprocessing", "thread"]