Commit Graph

30 Commits

Author SHA1 Message Date
cl0cks4fe
dd9d5d4528 Unittest to pytest (#32366)
* add pytest-asyncio

* switch common

* switch selfdrive

* switch system

* switch tools

* small fixes

* fix setUp and valgrind pytest

* switch to setup

* fix random

* switch mock

* switch test_lateral_limits

* revert test_ui

* fix poetry.lock

* add unittest to banned-api

* add inline ignores to remaining unittest imports

* revert test_models

* revert check_can_parser_performance

* one more skip

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2024-05-17 11:01:44 -07:00
Justin Newberry
b0eb3ba4f4 cars: platform enums -> prepend brand name (#31927)
* with brand name

* migrate

* Fix

* fixes

* more

* passes

* fix

* fix the doc

* collects

* these too

* more stuff

* body exception :/

* more

* hardcode i guess

* update ref

* toyota

* more toyota

* and here

* final!

* fix notebooks and ccs

* move this here
2024-03-19 17:29:50 -07:00
Justin Newberry
0b92f4e9ee more car info -> car docs (#31885) 2024-03-17 16:53:57 -07:00
Justin Newberry
655e5f7c3e rename CarInfo to CarDocs (#31879)
car info to car docs
2024-03-15 11:45:44 -07:00
Justin Newberry
25ccb2426c cars: remove CAR_INFO map (#31739)
* no carinfo map

* smaller diff

* not on mock
2024-03-06 11:22:12 -08:00
Cameron Clough
995250ae49 use pyupgrade to update to new typing syntax (#31580)
* add pyupgrade hook

* run pyupgrade (pre-commit run -a)

* ruff --fix

* Revert "add pyupgrade hook"

This reverts commit 56ec18bb6b8602a0b612f3803d96cdad14b52066.

* revert changes to third_party/

* manual type fixes

* explicit Optional wrapping capnp objects
2024-02-24 16:41:23 -08:00
Adeeb Shihadeh
a9626f95b6 add openpilot prefix to imports (#29498)
* add openpilot prefix to imports

* more

* more

* fix docs

* fix linter

* bump submodules

* fix patched tests

* update dynamic imports

* debug

* Revert "debug"

This reverts commit db5e13b9911cc74438bee123bc3430da6c31b24b.

* fix pm test
2023-08-20 20:49:55 -07:00
Justin Newberry
8793cbff40 Ruff: enable flake8-builtins (#29315)
* enable flake8-builtins

* replace any with contains

* fix typo in pack

* fix type

* format is from the parent module, has to be enabled

* item_id

* fix item_id

* disable for id since that's what the remote server returns
2023-08-10 18:58:22 -07:00
Justin Newberry
4a9afd7554 Ruff: comprehensions conventions (#29317)
ignore c408
2023-08-10 16:40:30 -07:00
Maxime Desroches
181b44b28e car docs: test print_docs_diff (#28459)
* test print docs

* delete

* remove this

* print
2023-06-09 14:13:22 -07:00
Shane Smiskol
024abe6455 car docs: document parts of parts (#28292)
* more stuff

* even more

* all parts func

* start to use it

* include self in parts

* use car_parts_new

* not used

* more usages

* remove get_parts

* remove more commented stuff

* remove iter

* clean up some more stuff

* more

more

* ford

* optional

optional

* nissan

* use new classes

* fix tests

* fix

* order

* no more required

* connector

* CARS.md

---------

Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
2023-05-31 21:30:50 -07:00
Maxime Desroches
9f5f8b603c car docs: list all needed hardware (#28212)
* generic car parts

* better carparts

* add part type

* more tests

* multiple enums

* unit tests

* just check isinstance

* better name

* remove _connector suffix

* remove those hyundai lines

* remove default arg

* Revert "remove default arg"

This reverts commit 139650a3b6b94358c3b9b12bb5fbe0a326d7abad.

* cleaner code structure

* use fingerprint

* review

* abstrac data class + common

* no more dataclass

* conflict

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-05-22 10:17:33 -07:00
Maxime Desroches
70677fe5fc add harness kit content to the doc (#28139)
* add harness kit content to the doc

* parts as enum

* nissan

* merge column

* rename column

* scaling

* scaling again

* 500px

* align text

* more px

* add style

* more width

* more

* more

* smaller text

* make all text smaller

* prev width

* default list

* remove hidden a ref

* try to remove again

* revert

* replace harness with harness_kit

* try fix

* cleaner

* center everything

* make pylint happy

* allow more than 1 of each parts

* use copy module

* review

* testing spacing

* revert

* bigger text

* formating

* split harness col lines

* remove print

* resolve

* rename to view

* keep formating in template

* simplify

* add unit test

* more generic way

* better

* harness connector only

* comment

* review

* put back harness parts

* missing dash

* too much space

* don't reload when clicking

* shorter comment

* only last line

* generate

---------

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-05-15 15:33:54 -07:00
Shane Smiskol
80e8d76d39 car docs: speedup test (#26337)
* faster

* faster
2022-11-02 20:40:42 -07:00
Shane Smiskol
6db9f051f7 Car docs: test no duplicate years (#25975)
* unit test

* clean up

* revert test

* clean up

* like this

like this

* no model model
2022-10-05 17:09:46 -07:00
Cameron Clough
06fb52c146 Kia: update required packages (#25824)
* Kia: LKAS is standard on Ceed 2019

https://www.downeys.co.uk/newmodels/Ceed_V3_24_09_2019.pdf

* Kia: delete Forte 2018

It doesn't appear that this vehicle has Adaptive/Smart Cruise Control in
any form, which was later added in 2019.

https://cdn.dealereprocess.org/cdn/brochures/kia/2018-forte.pdf
https://cdn.dealereprocess.org/cdn/brochures/kia/2019-forte.pdf

* Kia: LKAS is standard on Forte 2019+

https://cdn.dealereprocess.org/cdn/brochures/kia/2019-forte.pdf
https://cdn.dealereprocess.org/cdn/brochures/kia/2020-forte.pdf

* Kia: rename Niro Electric to EV

https://www.kia.com/us/en/niro

Co-authored-by: Shane Smiskol <shane@smiskol.com>

* Kia: LKAS is standard on Niro PHEV 2018+

https://cdn.dealereprocess.org/cdn/brochures/kia/2018-niro.pdf
https://cdn.dealereprocess.org/cdn/brochures/kia/2019-niro.pdf

* Kia: update required package on Optima 2017

The ACC package on the Optima 2017 is named "Advanced Smart Cruise
Control". It also doesn't have an LKAS package, only LDWS is available.

https://cdn.dealereprocess.org/cdn/brochures/kia/2017-optima.pdf

Co-authored-by: Shane Smiskol <shane@smiskol.com>

* Kia: LKAS is standard on Optima 2019

https://cdn.dealereprocess.org/cdn/brochures/kia/2019-optima.pdf

* Kia: revert package change to Seltos 2021

LKAS is NOT a standard package on the Seltos 2021

https://cdn.dealereprocess.org/cdn/brochures/kia/2021-seltos.pdf

* Kia: update required package on Sorento 2018

Similar to the Optima 2017, the ACC package on the Sorento 2018 is named
"Advanced Smart Cruise Control". It also doesn't have an LKAS package,
only LDWS.

SCC and LKAS were introduced in MY2019.

https://cdn.dealereprocess.org/cdn/brochures/kia/2018-sorento.pdf

Co-authored-by: Shane Smiskol <shane@smiskol.com>

* Kia: SCC is standard on Kia Niro PHEV 2018-19

https://cdn.dealereprocess.org/cdn/brochures/kia/2018-niro.pdf

Co-authored-by: Shane Smiskol <shane@smiskol.com>

* Kia: update required package on Optima Hybrid 2017

Similar to the Optima 2017, the ACC package on he Optima Hybrid 2017 is
named "Advanced Smart Cruise Control". It also doesn't have an LKAS
pacakge, only LDWS.

https://cdn.dealereprocess.org/cdn/brochures/kia/2017-optimahybrid.pdf

* update docs

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2022-09-17 00:24:57 -07:00
Shane Smiskol
747bcb013d Car docs: show more information about cars (#25415)
* back to actual information

* remove some star code

* round speeds

* Try out showing lateral acceleration

* remove that

* Fix speed units

* Add harness and try rounding to nearest half before scapping it

fix

^2

^2

* Add back steering torque star

* Fix static analysis

* auto-generate header

* fix static analysis. set to Harness.none by default

* rm
2022-08-18 15:12:18 -07:00
Shane Smiskol
574021a0ac Car docs: test for missing harnesses (#25444)
* All cars must have a harness

* except body

* skip test

* Q for IoniQ
2022-08-15 21:44:15 -07:00
Shane Smiskol
b30871daad CarInfo: parse out model years (#25208)
* add function

* split model and years

* typing and clean uop

* one function to split into make, model, years

* add test for bad years

* simpler re

* don't match only numbers

* clean up

* we can just use name

* clean up
2022-07-18 22:34:50 -07:00
Adeeb Shihadeh
500d16622c simplify compatibility docs (#25190)
* simplify tiers

* little more

* cleanup

* fix test
2022-07-18 17:53:00 -07:00
Shane Smiskol
789f2d195c compatibility docs: fixup steering torque star (#24940)
* Ascent has good torque, hard code Toyota, print all unexpected torque star cars

* update docs

* Use subtests

* hardcode CHR for now

generate

* Hard code Impreza

* update refs
2022-06-22 01:03:29 -07:00
HaraldSchafer
3066ad81a8 Car interface: set max lateral torque from table (#24789)
* json

* better naem

* Read from table

* formatting and default to nan

* Generate docs

* Read from table

* this should be the same

* Prius v is full

* test we always set the tunes correctly

add to release files

* Set for all cars

Set for all cars

* Revert tuning changes

Revert tuning changes

* remove that

* fixes

* update ref commit for new maxLateralAccels

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2022-06-10 17:57:23 -07:00
Shane Smiskol
3fbbb7f4b0 Common interface attribute function (#24731)
* replace get_attr_from_cars with get_interface_attr

* and not combining the brands

* explicit check

* minimize diff

* values
2022-06-03 04:16:39 -07:00
Shane Smiskol
b73d7cf3a5 CarInfo: Add test for missing platform info (#24607)
* Add test for missing car info

* Make optional
2022-05-23 14:22:10 -07:00
Shane Smiskol
bdaf174154 Support RAV4 2022 with stock longitudinal (#24367)
* support for ICE 2022 RAV4

* add to releases

* swap

* add fingerprints from a5c341bb250ca2f0

* update test route

* update docs

* add test for rav4

* values.py is a comma file
2022-05-18 19:04:11 -07:00
Shane Smiskol
dabcfd266e car info: function that sorts all car info into tiers (#24498)
* base function that returns all car info sorted by make model

* don't need to pass it in quite yet
2022-05-11 15:59:08 -07:00
Shane Smiskol
f3bcbb1b50 car docs test: check car name (#24193) 2022-04-12 12:45:31 -07:00
Shane Smiskol
433f649faa car docs: enforce naming conventions (#24116)
* assert car docs naming conventions

* fix static analysis

* It's actually Plug-in according to Hyundai (Google capitalizes it)

* fix docs
2022-04-04 15:50:27 -07:00
Shane Smiskol
85d8997a8a docs: support for automatically generating website vehicles page (#24020)
* add vehicles.vue template

* add original vue file

* stash

* stash

* clean up a bit

* add template for now

* implement footnotes and tier copy

* no more generator

* convert to 2 spaces

* should work, now onto vue

* does GH handle this html well?

* fix

* auto-generate descriptions and make tiers' maps non-str

* remove old files

* move template specific variable into templates, should be a bit simpler

* js template is simplier too now

js template is simplier too now

js template is simplier too now

* add video links from the nice car_info

* make rows attributes

* clean up

* fix

* remove template

* experiment with video links in GH

add image

how does this look?

fix

* Revert "experiment with video links in GH"

This reverts commit 8375e717b563f7b4ecf009ffae00174de1a0b8e9.

* sort tier_car_info in place

* unused Tuple

* no type check

* fix script
2022-03-23 13:42:53 -07:00
Shane Smiskol
31a6b141d6 Docs: auto-generate supported cars documentation (#23762)
* make CAR class enum, and values.py formatting

* Revert "make CAR class enum, and values.py formatting"

This reverts commit 04d9817e9d5d6ab5c027754018fc445f2cd3067a.

* stash

* add supported packages and model years

* don't change model years in fps

* move Lexus to info dict and make int enum

* remove sometimes wrong model years from name string

* use enum names

* convert Honda's values

* nice names

* use name

* GM

* Mazda, Ford

* Hyundai: WIP

* finish Hyundai

* fix

* Nissan

* Subaru

* Tesla

* formatting is for another PR

* Chrysler: todo: unify the Pacificas?

* do volkswagen

* this isn't a zoo

* skip enums for now

* Update selfdrive/car/volkswagen/values.py

Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com>

* set All

* temp cars

* auto-generate CARS.md

* update type hinting

* add generated file

* add longitudinal star to cars that support disabling radar

* add TODO

* add notes

* add min_steer_speed exception for hatchback

* add minimum steering speeds

* Add exceptions and run generator

* Missing Telluride

* fix Prius v

* missing Prius Prime

generate

* start to convert years to strings

* Fixup Hyundai

* convert year sets to strings

* handle this

* missing S3

* Fix and add all missing cars (verified with script

* Supported Package fixes

* add get_tiered_cars

* Check radarOffCan for removing most Honda from op long

* Update for Avalon stop and go update on master

* Fix missing car params

* add my temporary script i'm using to verify new generated DBC

add my temporary script i'm using to verify new generated DBC

* generate with jinja template

* add header and footer

* clean up

* rename

rename

* add exceptions. jinja is nice, but why are its loop indexes starting at 1?

* add list of known car videos

* See how these look

* Add nice table formatting for column description

Add nice table formatting for column description

* generate

* consisten br tag

* small clean up

* temp

* Move car videos into CarInfo

* add new copy and rename to footnotes

* Revert "temp"

This reverts commit 93c3fce1d3ab406f80cbfb9c00c2237d109c7846.

clean up

* generate

* replace with svg

* simplify a bit

* add footnotes to CarInfo

* move some variables to docs.py

* Add video link for Acadia

* Make Footnote an enum so we don't use random ints

* static analysis fixes

* move to CARS.md

* fix last missing footnote

* add to release files

* rm test file

* use svg

generate

* fix sorting

* not needed

* not sure how this got here

* remove Sedan/Couple and add Diesel footnote

* finish todos

* move make specific footnotes to selfdrive/car/*/values.py

rename

* change to zeros

* align bottom to center

* Apply some suggestions

* Update selfdrive/car/mock/values.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Update copy

* Try headers + bullet points

* somehow better

somehow better

* finish updating copy

* move template and add links to sups

* stars shouldn't be clickable

that didn't work

try this

try this

this is better

* add type hints to CarInfo

add more type hinting

* optional needs a type and any covers all (?)

* move good steering torque to */values.py

* dataclasses are much nicer than attr

* use tuple

* Update docs/cars.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* suggestions

* suggestions

* suggestions

remove

* clean up a bit

* add more type hints

* center stars and remove hardcoding from template

* update copy

* Add test

* Fix types

Fix types

* add supported cars documentation test

* clean up

* replace with docs_definitions

* Add back Footnote enums

* Ah so these are like fstrings!

* Update selfdrive/car/CARS_template.md

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Update selfdrive/car/docs.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Update year from master merge

* Fix longitudinal star from merge

* sort properly stars by Column enum

* clean up

* HKG: Sorry guys

* Prius V gets FSR star, like others

* Update selfdrive/car/docs.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* update comment

* No Prius docs change for now

Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-03-16 21:27:05 -07:00