Commit Graph

49 Commits

Author SHA1 Message Date
Adeeb Shihadeh
ff84a098df consolidate libsafety files (#2808)
* consolidate libsafety files

* cleanup

* even less

* E is silly
2025-09-27 16:50:05 -07:00
Shane Smiskol
c70bd060c6 Revert "Capnp memoryview (#2793)"
This reverts commit 0c8676f74c.
2025-09-19 17:17:52 -07:00
Shane Smiskol
0c8676f74c Capnp memoryview (#2793)
* rm power

* do this

* start

* unpin

* convert to bytes
2025-09-19 16:43:08 -07:00
DevTekVE
5c0049dbc3 CI: bugfix of tests by pinning pycapnp to 2.1.0 (#2790)
Pin pycapnp to 2.1.0
2025-09-15 12:46:50 -04:00
Shane Smiskol
1302e1bb25 ruff: enable preview rules (#2621)
* preview

* fmt

* fix formatting!

* Revert "fix formatting!"

This reverts commit 559d291cfa27c3500e5fa3105ffdea809bdd1b27.

* some of these are good, but can enable in steps

* and

* ruff check --fix

* preview

* format
2025-08-04 15:38:04 -07:00
Shane Smiskol
e196c9f1db interfaces: remove numpy.mean usage (#2612)
* ban numpy mean

* try first

* fix

* fix
2025-08-01 23:33:09 -07:00
Shane Smiskol
5e58025dc5 latest xdist 2025-07-25 20:44:51 -07:00
Shane Smiskol
34d766e825 pytest: faster xdist startup (#2565)
* messy pitch compensation

* cmt

* fix

* before

* back

* prob good

* fix test

* fix test

* fix

* 1s is enough

* clean up

* more

* 1.5 probably perfect

* safe clip

* clean up

* stopping

* some llm trash and some ssh magic

* revert

* revert

* try this now

* update package

* update package

* bump

* bump

* bump
2025-07-25 20:32:55 -07:00
Adeeb Shihadeh
b32f4f099a CANParser: python rewrite (#2539)
* Add pure Python CAN parser

* cleanup

* lil more

* rm cython

* cleanup
2025-07-23 16:06:54 -07:00
Adeeb Shihadeh
58f4b86121 pre-commit -> lefthook (#2278)
* pre-commit -> lefthook

* fix cpplint

* cleanupg
2025-05-20 12:01:27 -07:00
Adeeb Shihadeh
51203122f3 rename safety/safety/safety_* to safety/modes/* (#2261) 2025-05-17 19:40:10 -07:00
Adeeb Shihadeh
45bf6c8f54 Add safety headers to package (#2258)
* Add safety headers to package

* include path

* it's for the whole project

* update

* guard
2025-05-17 18:52:21 -07:00
Adeeb Shihadeh
efdcb38693 add ty (#2235)
one day...
2025-05-14 08:41:57 -07:00
Shane Smiskol
c7698609c0 fix ruff failure (#1996)
* test

* seems less readable

* Revert "seems less readable"

This reverts commit f98d3e699e67d103d4ba6f923aae682335dc6768.

* ignore
2025-03-13 20:52:25 -07:00
chris dunder
785b5ec1a6 Replace gcov & lcov with gcovr (#1867)
Use gcovr instead of gcov to support exclusion markers.

This also replaces lcov, since gcov has far fewer dependencies,
can be installed via uv (and looks better if anything).
2025-03-02 09:11:03 -08:00
Shane Smiskol
6f83fdf9b9 Move car safety modes to opendbc (#1713)
* move safety tests

* move libsafety

* move safety

* rename imports

* copy over needed (minimalized) board and driver code

* dont test safety here

* add new job for safety tests

fix

* try fix

* ubsan

* ?

?

* missing cffi

* should be final fix

* mac fix

* no mac

* use setup script

* no cd

* this is the correct way to do it

* add misra

* misra fixes

* run

* setup misra

* add missing files

* is this used?

* add that

* Revert "is this used?"

This reverts commit 2f34762dfa65821e1ee398675bf62d1a256ebec8.

* need this

* misra mutation test

* fix

* no race conditions

* test

* cache cppcheck

fix

* setup

* good timeouts

* mutation test

* fix

* no

* Revert "no"

This reverts commit 39e10a045a4a5411a64de791ae463461f8a5f37b.

* already tested

* move Safety Model readme section to opendbc

* fix

* fix

* disable mutation tests for merge

* namespace

* test no cache

* 1m

1m
2025-02-19 17:19:31 -08:00
Shane Smiskol
4055444c43 Fix package (#1709)
* test this

* need this

* ?

* test

* doesn't really test anything

* bump
2025-02-10 18:02:55 -08:00
Shane Smiskol
382d1cca41 simple RELEASES.md 2025-02-10 16:54:06 -08:00
Shane Smiskol
0c178567cc bump version to 0.1.1 2025-02-10 16:44:45 -08:00
Shane Smiskol
6a9422b107 rm panda as dependency (#1708)
rm panda
2025-02-10 16:44:08 -08:00
Shane Smiskol
80eb006262 PyPI publishing (#1707)
* set up

* try

* debug

* try

* ?

* hmm

* whoops

* debug

* ?!

* fix

* f

* test

* just see if works!

* works!

* back to release
2025-02-10 15:02:26 -08:00
Shane Smiskol
9517dfc189 match PyPI version 2025-02-10 13:59:39 -08:00
Adeeb Shihadeh
fd8471dc0d remove test_generator; doesn't make sense now that we're building it in SCons 2024-12-15 10:14:30 -08:00
Adeeb Shihadeh
192f54d05f CI: just use ./test.sh (#1582)
* CI: just use ./test.sh

* make sure this works

* how much of this is pre-commit

* should be good

* rm that
2024-12-14 23:35:26 -08:00
Louis Velez
e57375f1e2 CI: fix macOS test running (#1516)
* CI: fixes MacOS test running

* CI: adds coreutils for nproc

* CI: fixes based on PR

* cleanup

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2024-11-21 14:16:17 -08:00
Shane Smiskol
7cb3d4c021 ruff: ignore site_scons 2024-11-10 20:34:11 -08:00
Shane Smiskol
b0a5cb3060 Add missing __init__.py 2024-11-10 20:33:38 -08:00
Shane Smiskol
359aa38656 Ford: cluster radar points (#1427)
* messy first draft with dbscan

* points -> keys

* not sure if necessary

* doesn't work

* it was a reference!!!!!!!!!1111!!!!1111111!!!!!!111 ugh

* todos

* more

* nope

* just want to test in-car

* Revert "just want to test in-car"

This reverts commit b280019da641e07db925eaeb4a03f75f672f74a0.

* simple clustering

* no print

* hold points

* little faster

* ~4x faster

* little more

* now this matters

* cached property

* argmin

* no to_dict

* calculate means for new cluster once

* no need for deepcopy anymore!

* don't store points, pre-check length

* fix that

* comment

* hmm this is promising

* unused

* no np

* works pretty well

* store cluster center

* whoops

* >2x speedup on pc

* forgot this

* vectorize

* no pts

* more optimization

* 5x faster

* a list

* try

* fix

* fix radar errors

* fix

* fixes to pass checklist

* remove old stuff

* is this faster?

fix

* Revert "is this faster?"

This reverts commit 89f6cd39358eee54c153deb672016d65a96eec9b.

* some clean up

* more clean up

* simplify

* no vals

* see if this is faster

* make it a fixme

* clean up

fix

* more

* final

* sheesh fix dRel

* fix static analysis

* fix more static
2024-10-30 01:11:34 -07:00
Jason Young
c90858514c 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 16:12:17 -04:00
Shane Smiskol
ff2ac79e07 move car.capnp to opendbc (#1339)
* move car.capnp to opendbc

* actuators and some types

* fix all tests!

* not needed

* lint stuff

* missing
2024-10-03 16:38:53 -07:00
Maxime Desroches
6619c18f1f distutils comment (#1222)
comment
2024-09-04 14:48:02 -07:00
Maxime Desroches
1e6e045f64 add setuptools for python3.12 (#1221)
setuptools
2024-09-04 14:20:59 -07:00
Shane Smiskol
ebb6d22ede Revert "pytest: add default fixture option for pytest-asyncio"
This reverts commit 81b081bbc2.
2024-09-04 14:11:29 -07:00
Shane Smiskol
81b081bbc2 pytest: add default fixture option for pytest-asyncio
https://github.com/commaai/openpilot/pull/33442
2024-09-04 13:59:50 -07:00
Adeeb Shihadeh
f2fa755ab7 longitudinal profile runner (#1197)
* long profiles

* start with creep

* lil cleanup

* corolla updates

* cleanup

* 2s

* plot is a little nicer

* strict mode

* cleanup

* unused

* fix that

---------

Co-authored-by: Comma Device <device@comma.ai>
2024-08-30 13:48:13 -07:00
Adeeb Shihadeh
cbad7f0066 simple joystick example (#1200)
* setup runner

* port over joystickd

* fix mypy

* set accel and steer
2024-08-29 15:12:44 -07:00
Shane Smiskol
7d6f7cbe71 add banned apis 2024-08-20 15:45:43 -07:00
Adeeb Shihadeh
8866aa7a75 this was getting installed from panda 2024-08-18 12:08:53 -07:00
Adeeb Shihadeh
d377af6c2d pyyaml is unused 2024-08-18 11:01:09 -07:00
Adeeb Shihadeh
3537404a18 no docker (#1081)
* cleanup dependencies

* all

* install

* less

* try this

* slimmm

* skip docker

* silence that one

* disable for now

* e

* fix build

* bring that back

* not ready yet
2024-08-17 12:04:46 -07:00
Shane Smiskol
9a53f08080 move selfdrive/car to opendbc (#1049)
* move most of /car

* rename selfdrive.car imports to opendbc.car

* move some car tests

move some car tests

* fix car tests

* fix actions?

* add panda ignore to pytest

* need these ignores from openpilot

* fix tests for outside pip install (openpilot/local)

forgot
2024-08-17 00:38:33 -07:00
Shane Smiskol
132b1a66b0 Bump pre-commit hooks, more coverage (similar to openpilot) (#1078)
* pytest defaults

* move some stuff to pyproject

* bump codespell

* more like openpilot
2024-08-16 22:24:44 -07:00
Adeeb Shihadeh
1e9f853615 fix ruff warnings 2024-08-01 23:17:16 -07:00
Shane Smiskol
5c16f7ec29 define project (#1073)
* define project

* spacing

* cleanup
2024-08-01 16:40:51 -07:00
Shane Smiskol
a40652d341 move to nested opendbc/ (#1069)
* move to nested opendbc/

* get CI working / similar to msgq

* move dbcs to dbc/

* run pre-commit outside docker

* move generator to dbc/

* fix path in print
2024-07-31 22:46:43 -07:00
Justin Newberry
98c2b11378 Ruff: propogate config from OP (#916) 2023-08-14 12:52:47 -07:00
Justin Newberry
4b44eb6c3c CI: Pylint to ruff (#911) 2023-08-07 15:26:46 -07:00
Cameron Clough
aa044ea945 add poetry pyproject required fields 2023-06-18 16:06:42 +01:00
Cameron Clough
7e1f7d5b7e setup cython linting (#851) 2023-06-14 15:55:49 +01:00