Skip to content

Commit

Permalink
Sync: commaai/openpilot:master into sunnypilot/sunnypilot:master (c…
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnyhaibin committed Feb 8, 2024
2 parents 66df10f + 35a47f6 commit fa9a11c
Show file tree
Hide file tree
Showing 799 changed files with 23,669 additions and 19,520 deletions.
1 change: 0 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"DISPLAY": "${localEnv:DISPLAY}",
"PYTHONPATH": "${containerWorkspaceFolder}",
"TERM": "xterm-256color",
"CARLA_HOST": "host.docker.internal",
"force_color_prompt": "1"
},
"runArgs": [
Expand Down
12 changes: 9 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
* text=auto

# to move existing files into LFS:
# git add --renormalize .
*.dlc filter=lfs diff=lfs merge=lfs -text
*.onnx filter=lfs diff=lfs merge=lfs -text
*.svg filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.gif filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.wav filter=lfs diff=lfs merge=lfs -text

selfdrive/car/tests/test_models_segs.txt filter=lfs diff=lfs merge=lfs -text
selfdrive/assets/fonts/*.ttf filter=lfs diff=lfs merge=lfs -text
selfdrive/assets/training/*.png filter=lfs diff=lfs merge=lfs -text
system/hardware/tici/updater filter=lfs diff=lfs merge=lfs -text
selfdrive/ui/qt/spinner_larch64 filter=lfs diff=lfs merge=lfs -text
selfdrive/ui/qt/text_larch64 filter=lfs diff=lfs merge=lfs -text
third_party/**/*.a filter=lfs diff=lfs merge=lfs -text
third_party/**/*.so filter=lfs diff=lfs merge=lfs -text
third_party/**/*.so.* filter=lfs diff=lfs merge=lfs -text
third_party/**/*.dylib filter=lfs diff=lfs merge=lfs -text
third_party/acados/*/t_renderer filter=lfs diff=lfs merge=lfs -text
third_party/bootstrap/bootstrap-icons.svg filter=lfs diff=lfs merge=lfs -text
third_party/qt5/larch64/bin/lrelease filter=lfs diff=lfs merge=lfs -text
third_party/qt5/larch64/bin/lupdate filter=lfs diff=lfs merge=lfs -text
third_party/catch2/include/catch2/catch.hpp filter=lfs diff=lfs merge=lfs -text
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE/car_port.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ assignees: ''

**Checklist**

- [ ] added to README
- [ ] 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:
Expand Down
6 changes: 4 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE/fingerprint.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ labels: 'fingerprint'
assignees: ''
---

Discord username: []
**Car**
Which car (make, model, year) this fingerprint is for

Route: []
**Route**
A route with the fingerprint
3 changes: 1 addition & 2 deletions .github/PULL_REQUEST_TEMPLATE/tuning.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,4 @@ Longitudinal:
Lateral:
* Straight driving at ~25, ~45 and ~65mph
* Turns driving at ~25, ~45 and ~65mph
-->
-->
30 changes: 30 additions & 0 deletions .github/build.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import pathlib

GITHUB_FOLDER = pathlib.Path(__file__).parent

PULL_REQUEST_TEMPLATES = (GITHUB_FOLDER / "PULL_REQUEST_TEMPLATE")

order = ["fingerprint", "car_bugfix", "bugfix", "car_port", "refactor"]

def create_pull_request_template():
with open(GITHUB_FOLDER / "pull_request_template.md", "w") as f:
f.write("<!-- Please copy and paste the relevant template -->\n\n")

for t in order:
template = PULL_REQUEST_TEMPLATES / f"{t}.md"
text = template.read_text()

# Remove metadata for GitHub
start = text.find("---")
end = text.find("---", start+1)
text = text[end + 4:]

# Remove comments
text = text.replace("<!-- ", "").replace("-->", "")

f.write(f"<!--- ***** Template: {template.stem.replace('_', ' ').title()} *****\n")
f.write(text)
f.write("\n\n")
f.write("-->\n\n")

create_pull_request_template()
120 changes: 67 additions & 53 deletions .github/labeler.yaml
Original file line number Diff line number Diff line change
@@ -1,65 +1,79 @@
CI / testing:
- all:
- changed-files: ['.github/**', '**/test_*', 'Jenkinsfile']
- changed-files:
- any-glob-to-all-files: "{.github/**,**/test_*,Jenkinsfile}"

car:
- all:
- changed-files: ['selfdrive/car/**']
car:
- changed-files:
- any-glob-to-all-files: 'selfdrive/car/**'

body:
- all:
- changed-files: ['selfdrive/car/body/*']
- changed-files:
- any-glob-to-all-files: 'selfdrive/car/body/*'

chrysler:
- all:
- changed-files: ['selfdrive/car/chrysler/*']
ford:
- all:
- changed-files: ['selfdrive/car/ford/*']
gm:
- all:
- changed-files: ['selfdrive/car/gm/*']
honda:
- all:
- changed-files: ['selfdrive/car/honda/*']
hyundai:
- all:
- changed-files: ['selfdrive/car/hyundai/*']
mazda:
- all:
- changed-files: ['selfdrive/car/mazda/*']
nissan:
- all:
- changed-files: ['selfdrive/car/nissan/*']
subaru:
- all:
- changed-files: ['selfdrive/car/subaru/*']
tesla:
- all:
- changed-files: ['selfdrive/car/tesla/*']
toyota:
- all:
- changed-files: ['selfdrive/car/toyota/*']
volkswagen:
- all:
- changed-files: ['selfdrive/car/volkswagen/*']
- changed-files:
- any-glob-to-all-files: 'selfdrive/car/chrysler/*'

ford:
- changed-files:
- any-glob-to-all-files: 'selfdrive/car/ford/*'

gm:
- changed-files:
- any-glob-to-all-files: 'selfdrive/car/gm/*'

honda:
- changed-files:
- any-glob-to-all-files: 'selfdrive/car/honda/*'

hyundai:
- changed-files:
- any-glob-to-all-files: 'selfdrive/car/hyundai/*'

mazda:
- changed-files:
- any-glob-to-all-files: 'selfdrive/car/mazda/*'

nissan:
- changed-files:
- any-glob-to-all-files: 'selfdrive/car/nissan/*'

subaru:
- changed-files:
- any-glob-to-all-files: 'selfdrive/car/subaru/*'

tesla:
- changed-files:
- any-glob-to-all-files: 'selfdrive/car/telsa/*'

toyota:
- changed-files:
- any-glob-to-all-files: 'selfdrive/car/toyota/*'

volkswagen:
- changed-files:
- any-glob-to-all-files: 'selfdrive/car/volkswagen/*'

fingerprint:
- changed-files:
- any-glob-to-all-files: 'selfdrive/car/*/fingerprints.py'

simulation:
- all:
- changed-files: ['tools/sim/**']
- changed-files:
- any-glob-to-all-files: 'tools/sim/**'

ui:
- all:
- changed-files: ['selfdrive/ui/**']
tools:
- all:
- changed-files: ['tools/**']
- changed-files:
- any-glob-to-all-files: 'selfdrive/ui/**'

tools:
- changed-files:
- any-glob-to-all-files: 'tools/**'

multilanguage:
- all:
- changed-files: ['selfdrive/ui/translations/**']
- changed-files:
- any-glob-to-all-files: 'selfdrive/ui/translations/**'

research:
- all:
- changed-files: [
'selfdrive/modeld/models/**',
'selfdrive/test/process_replay/model_replay_ref_commit',
]
- changed-files:
- any-glob-to-all-files: "{selfdrive/modeld/models/**,selfdrive/test/process_replay/model_replay_ref_commit}"
38 changes: 29 additions & 9 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,59 @@ A route with the fingerprint
-->

<!--- ***** Template: Car bug fix *****
<!--- ***** Template: Car Bugfix *****
**Description** [](A description of the bug and the fix. Also link any relevant issues.)
**Description**
**Verification** [](Explain how you tested this bug fix.)
A description of the bug and the fix. Also link the issue if it exists.
**Verification**
Explain how you tested this bug fix.
**Route**
Route: [a route with the bug fix]
-->

<!--- ***** Template: Bug fix *****
<!--- ***** Template: Bugfix *****
**Description**
A description of the bug and the fix. Also link the issue if it exists.
**Verification**
**Description** [](A description of the bug and the fix. Also link any relevant issues.)
Explain how you tested this bug fix.
**Verification** [](Explain how you tested this bug fix.)
-->

<!--- ***** Template: Car port *****
<!--- ***** Template: Car Port *****
**Checklist**
- [ ] 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:
- [ ] car harness used (if comma doesn't sell it, put N/A):
-->

<!--- ***** Template: Refactor *****
**Description** [](A description of the refactor, including the goals it accomplishes.)
**Description**
A description of the refactor, including the goals it accomplishes.
**Verification**
Explain how you tested the refactor for regressions.
**Verification** [](Explain how you tested the refactor for regressions.)
-->

49 changes: 49 additions & 0 deletions .github/workflows/auto-cache/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: 'automatically cache based on current runner'

inputs:
path:
description: 'path to cache'
required: true
key:
description: 'key'
required: true
restore-keys:
description: 'restore-keys'
required: true
save:
description: 'whether to save the cache'
default: 'false'
required: false

runs:
using: "composite"
steps:
- name: setup namespace cache
if: ${{ contains(runner.name, 'nsc') }}
uses: namespacelabs/nscloud-cache-action@v1
with:
path: ${{ inputs.path }}

- name: setup github cache
if: ${{ !contains(runner.name, 'nsc') && inputs.save != 'false' }}
uses: 'actions/cache@v3'
with:
path: ${{ inputs.path }}
key: ${{ inputs.key }}
restore-keys: ${{ inputs.restore-keys }}

- name: setup github cache
if: ${{ !contains(runner.name, 'nsc') && inputs.save == 'false' }}
uses: 'actions/cache/restore@v3'
with:
path: ${{ inputs.path }}
key: ${{ inputs.key }}
restore-keys: ${{ inputs.restore-keys }}

# make the directory manually in case we didn't get a hit, so it doesn't fail on future steps
- id: scons-cache-setup
shell: bash
run: |
mkdir -p ${{ inputs.path }}
sudo chmod -R 777 ${{ inputs.path }}
sudo chown -R $USER ${{ inputs.path }}
Loading

0 comments on commit fa9a11c

Please sign in to comment.