replace python with python3 (#33303)

3
pull/33305/head
Maxime Desroches 8 months ago committed by GitHub
parent b9dec5e3b5
commit 406939b9c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      .github/workflows/badges.yaml
  2. 10
      .github/workflows/selfdrive_tests.yaml
  3. 2
      tools/cabana/streams/replaystream.cc
  4. 2
      tools/camerastream/README.md
  5. 4
      tools/car_porting/README.md
  6. 2
      tools/latencylogger/README.md
  7. 4
      tools/replay/README.md
  8. 2
      tools/sim/launch_openpilot.sh

@ -23,7 +23,7 @@ jobs:
- uses: ./.github/workflows/setup-with-retry
- name: Push badges
run: |
${{ env.RUN }} "scons -j$(nproc) && python selfdrive/ui/translations/create_badges.py"
${{ env.RUN }} "scons -j$(nproc) && python3 selfdrive/ui/translations/create_badges.py"
rm .gitattributes

@ -54,7 +54,7 @@ jobs:
timeout-minutes: ${{ ((steps.restore-scons-cache.outputs.cache-hit == 'true') && 10 || 30) }} # allow more time when we missed the scons cache
run: |
cd $STRIPPED_DIR
${{ env.RUN }} "python system/manager/build.py"
${{ env.RUN }} "python3 system/manager/build.py"
- name: Run tests
timeout-minutes: 3
run: |
@ -221,7 +221,7 @@ jobs:
- name: Upload reference logs
if: ${{ failure() && steps.print-diff.outcome == 'success' && github.repository == 'commaai/openpilot' && env.AZURE_TOKEN != '' }}
run: |
${{ env.RUN }} "unset PYTHONWARNINGS && AZURE_TOKEN='$AZURE_TOKEN' python selfdrive/test/process_replay/test_processes.py -j$(nproc) --upload-only"
${{ env.RUN }} "unset PYTHONWARNINGS && AZURE_TOKEN='$AZURE_TOKEN' python3 selfdrive/test/process_replay/test_processes.py -j$(nproc) --upload-only"
# PYTHONWARNINGS triggers a SyntaxError in onnxruntime
- name: Run model replay with ONNX
timeout-minutes: 4
@ -291,7 +291,7 @@ jobs:
- uses: ./.github/workflows/setup-with-retry
- name: Get base car info
run: |
${{ env.RUN }} "scons -j$(nproc) && python selfdrive/debug/dump_car_docs.py --path /tmp/openpilot_cache/base_car_docs"
${{ env.RUN }} "scons -j$(nproc) && python3 selfdrive/debug/dump_car_docs.py --path /tmp/openpilot_cache/base_car_docs"
sudo chown -R $USER:$USER ${{ github.workspace }}
- uses: actions/checkout@v4
with:
@ -303,7 +303,7 @@ jobs:
run: |
cd current
${{ env.RUN }} "scons -j$(nproc)"
output=$(${{ env.RUN }} "python selfdrive/debug/print_docs_diff.py --path /tmp/openpilot_cache/base_car_docs")
output=$(${{ env.RUN }} "python3 selfdrive/debug/print_docs_diff.py --path /tmp/openpilot_cache/base_car_docs")
output="${output//$'\n'/'%0A'}"
echo "::set-output name=diff::$output"
- name: Find comment
@ -348,7 +348,7 @@ jobs:
run: >
${{ env.RUN }} "PYTHONWARNINGS=ignore &&
source selfdrive/test/setup_xvfb.sh &&
python selfdrive/ui/tests/test_ui/run.py"
python3 selfdrive/ui/tests/test_ui/run.py"
- name: Upload Test Report
uses: actions/upload-artifact@v4
with:

@ -63,7 +63,7 @@ bool ReplayStream::loadRoute(const QString &route, const QString &data_dir, uint
QString message;
if (auth_content.empty()) {
message = "Authentication Required. Please run the following command to authenticate:\n\n"
"python tools/lib/auth.py\n\n"
"python3 tools/lib/auth.py\n\n"
"This will grant access to routes from your comma account.";
} else {
message = tr("Access Denied. You do not have permission to access route:\n\n%1\n\n"

@ -43,7 +43,7 @@ To actually display the stream, run `watch3` in separate terminal:
## compressed_vipc.py usage
```
$ python compressed_vipc.py -h
$ python3 compressed_vipc.py -h
usage: compressed_vipc.py [-h] [--nvidia] [--cams CAMS] [--silent] addr
Decode video streams and broadcast on VisionIPC

@ -21,7 +21,7 @@ Given a route and platform, automatically inserts FW fingerprints from the platf
Example:
```bash
> python tools/car_porting/auto_fingerprint.py '1bbe6bf2d62f58a8|2022-07-14--17-11-43' 'OUTBACK'
> python3 tools/car_porting/auto_fingerprint.py '1bbe6bf2d62f58a8|2022-07-14--17-11-43' 'OUTBACK'
Attempting to add fw version for: OUTBACK
```
@ -45,7 +45,7 @@ Given a route, runs most of the car interface to check for common errors like mi
#### Example: panda safety mismatch for gasPressed
```bash
> python tools/car_porting/test_car_model.py '4822a427b188122a|2023-08-14--16-22-21'
> python3 tools/car_porting/test_car_model.py '4822a427b188122a|2023-08-14--16-22-21'
=====================================================================
FAIL: test_panda_safety_carstate (__main__.CarModelTestCase.test_panda_safety_carstate)

@ -5,7 +5,7 @@ LatencyLogger is a tool to track the time from first pixel to actuation. Timesta
## Usage
```
$ python latency_logger.py -h
$ python3 latency_logger.py -h
usage: latency_logger.py [-h] [--relative] [--demo] [--plot] [route_or_segment_name]
A tool for analyzing openpilot's end-to-end latency

@ -6,7 +6,7 @@
```bash
# Log in via browser to have access to routes from your comma account
python tools/lib/auth.py
python3 tools/lib/auth.py
# Start a replay
tools/replay/replay <route-name>
@ -20,7 +20,7 @@ tools/replay/replay --demo
cd selfdrive/ui && ./ui
# or try out radar point visualization in Rerun:
python replay/rp_visualization.py
python3 replay/rp_visualization.py
# NOTE: To visualize radar points, make sure tools/replay/replay is running.
```

@ -12,7 +12,7 @@ if [[ "$CI" ]]; then
export BLOCK="${BLOCK},ui"
fi
python -c "from openpilot.selfdrive.test.helpers import set_params_enabled; set_params_enabled()"
python3 -c "from openpilot.selfdrive.test.helpers import set_params_enabled; set_params_enabled()"
SCRIPT_DIR=$(dirname "$0")
OPENPILOT_DIR=$SCRIPT_DIR/../../

Loading…
Cancel
Save