Skip to content

Commit 99c02bd

Browse files
Car ports: update PR template (commaai#23996)
* update text for docs generator * use docs.py * Update .github/pull_request_template.md Co-authored-by: Adeeb Shihadeh <[email protected]>
1 parent 7eb9416 commit 99c02bd

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Route: [a route with the bug fix]
2222
<!--- ***** Template: Car port *****
2323
2424
**Checklist**
25-
- [ ] added to docs/CARS.md
25+
- [ ] added entry to CarInfo in selfdrive/car/*/values.py and ran `selfdrive/car/docs.py` to generate new docs
2626
- [ ] test route added to [routes.py](https://github.com/commaai/openpilot/blob/master/selfdrive/car/tests/routes.py)
2727
- [ ] route with openpilot:
2828
- [ ] route with stock system:

scripts/count_cars.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
#!/usr/bin/env python3
2-
import os
32
from collections import Counter
43
from pprint import pprint
54

6-
from common.basedir import BASEDIR
5+
from selfdrive.car.docs import get_tier_car_rows
76

8-
with open(os.path.join(BASEDIR, "docs/CARS.md")) as f:
9-
lines = f.readlines()
10-
cars = [l for l in lines if l.strip().startswith("|") and l.strip().endswith("|") and
11-
"Make" not in l and any(c.isalpha() for c in l)]
7+
if __name__ == "__main__":
8+
tiers = list(get_tier_car_rows())
9+
cars = [car for tier_cars in tiers for car in tier_cars[1]]
1210

13-
make_count = Counter(l.split('|')[1].split('|')[0].strip() for l in cars)
14-
print("\n", "*"*20, len(cars), "total", "*"*20, "\n")
11+
make_count = Counter(l[0] for l in cars)
12+
print("\n", "*" * 20, len(cars), "total", "*" * 20, "\n")
1513
pprint(make_count)

0 commit comments

Comments
 (0)