Car ports: update PR template (#23996)

* update text for docs generator

* use docs.py

* Update .github/pull_request_template.md

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
pull/24000/head
Shane Smiskol 2022-03-18 17:47:43 -07:00 committed by GitHub
parent 7eb9416f6b
commit 99c02bdd29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 9 deletions

View File

@ -22,7 +22,7 @@ Route: [a route with the bug fix]
<!--- ***** Template: Car port *****
**Checklist**
- [ ] added to docs/CARS.md
- [ ] added entry to CarInfo in selfdrive/car/*/values.py and ran `selfdrive/car/docs.py` to generate new docs
- [ ] test route added to [routes.py](https://github.com/commaai/openpilot/blob/master/selfdrive/car/tests/routes.py)
- [ ] route with openpilot:
- [ ] route with stock system:

View File

@ -1,15 +1,13 @@
#!/usr/bin/env python3
import os
from collections import Counter
from pprint import pprint
from common.basedir import BASEDIR
from selfdrive.car.docs import get_tier_car_rows
with open(os.path.join(BASEDIR, "docs/CARS.md")) as f:
lines = f.readlines()
cars = [l for l in lines if l.strip().startswith("|") and l.strip().endswith("|") and
"Make" not in l and any(c.isalpha() for c in l)]
if __name__ == "__main__":
tiers = list(get_tier_car_rows())
cars = [car for tier_cars in tiers for car in tier_cars[1]]
make_count = Counter(l.split('|')[1].split('|')[0].strip() for l in cars)
print("\n", "*"*20, len(cars), "total", "*"*20, "\n")
make_count = Counter(l[0] for l in cars)
print("\n", "*" * 20, len(cars), "total", "*" * 20, "\n")
pprint(make_count)